title: Processor affinity settings for Linux kernel modules?
body: <p>In Windows, I can set the processor affinity of driver code using KeSetSystemAffinityThread, and check which processor my code is running on using KeGetCurrentProcessorNumber.</p>
  
  <p>I'm trying to do something similar in a Linux kernel module, but the only affinity calls I can see are for userland processes. Is there any way to do this, so that I can run assembly code on a specific processor? (i.e. sgdt)</p>
  
  <p>Edit:</p>
  
  <p>I think I've figured out how to <em>get</em> the current processor. smp_processor_id() seems like it should work.</p>