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



I want to be able to call smp_processor_id() from user-space. Of
course the patch would be used by only me. (I am not asking someone to
write such to submit as an official patch.)

.