Re: How to write a kernel patch to expose a kernel-level function?



>http://altlinux.org/index.php?module=sisyphus&package=cpuid
Thx but no, it is not what I want. This package displays the CPU spec
like who the manufacturer is and what model it is, etc. What I want,
and what smp_processor_id() returns, is which logical processor the
calling thread is running on. Is CPU0, CPU1, or CPU2, for example?

>In both cases you need a piece of kernel code, a patch or a kernel module
So my question is How to write a kernel patch? Is it as simple as
adding a statement in the source like "EXPORT TO USER-SPACE
smp_processor_id"? Any pointer to how to do it? Ay more concrete
guideline?

.



Relevant Pages

  • Re: Wine 20041201 on FreeBSD 5.3-RELEASE
    ... (I apologize for replying to jason henson rather than the list; ... >> patch, rebuilt, and installed my kernel, and I continue to get the ... As I said in my original post, my ports tree was updated the day ... have tried both with and without the kernel patch, ...
    (freebsd-questions)
  • [scsi drivers summary]
    ... - manufacturer: ADAPTEC ... - kernel: 6.2.36/1.3.10 ... - arch: i386 ia64 powerpc ...
    (Linux-Kernel)
  • [summary] state of scsi drivers
    ... - manufacturer: ADAPTEC ... - kernel: 1.1.2 ... - arch: i386 ia64 powerpc ...
    (Linux-Kernel)
  • 2.6.17.9 new perfmon code base, libpfm, and pfmon packages
    ... I have released another version of the perfmon new code base package. ... This version of the kernel patch is relative to 2.6.17.9. ...
    (Linux-Kernel)
  • Re: Philips webcam
    ... I can see Linus' ... drivers out of the kernel. ... Yes - but then they have to buy hardware that's certified to work. ... I realize you did - but the manufacturer essentially lied. ...
    (Ubuntu)