request_percpu_irq_affinity(9)
π request_percpu_irq_affinity(9) π
okay so bestie, welcome to the Kernel API Manual β today's main character is request_percpu_irq_affinity(9), and she is literally here to allocate a percpu interrupt line. mouthful of a name? yes. iconic? also yes. let's get into it. β¨
πΈ NAME πΈ
request_percpu_irq_affinity β allocate a percpu interrupt line. that's the vibe, no cap. π
β¨ SYNOPSIS β¨
here's the signature, copied exactly so nobody gets creative with it:
int request_percpu_irq_affinity (unsigned int irq , irq_handler_t
handler , const char *devname , const cpumask_t *affinity , void
__percpu *dev_id );
π ARGUMENTS π
the cast, in order β no skips, bestie:
irqβ Interrupt line to allocate.handlerβ Function to be called when the IRQ occurs.devnameβ An ascii name for the claiming device.affinityβ Acpumaskdescribing the target CPUs for this interrupt.dev_idβ A percpu cookie passed back to the handler function.
π DESCRIPTION π
so here's the key tea: this call allocates interrupt resources, but it doesn't enable the interrupt on any CPU, because all percpu-devid interrupts are flagged with IRQ_NOAUTOEN. so don't just sit there waiting for it to turn on by itself, bestie π β it has to be done on each CPU using enable_percpu_irq.
also important: dev_id must be globally unique. it is a per-cpu variable, and the handler gets called with the interrupted CPU's instance of that variable. so yeah β the handler gets the right CPU's version, and that's the whole point. π«Ά
π¦ SEE ALSO π¦
the kernel file for this is ./kernel/irq/manage.c β that's where the lore lives β and here's the full SEE ALSO friend group, no skips, fr fr:
synchronize_hardirq(9)synchronize_irq(9)irq_can_set_affinity(9)irq_can_set_affinity_usr(9)irq_set_thread_affinity(9)irq_affinity_schedule_notify_work(9)irq_update_affinity_desc(9)irq_set_affinity(9)irq_force_affinity(9)irq_set_affinity_notifier(9)irq_set_vcpu_affinity(9)disable_irq_nosync(9)disable_irq(9)disable_hardirq(9)disable_nmi_nosync(9)enable_irq(9)enable_nmi(9)irq_set_irq_wake(9)irq_wake_thread(9)free_irq(9)request_threaded_irq(9)request_any_context_irq(9)request_nmi(9)irq_percpu_is_enabled(9)free_percpu_irq(9)request_percpu_nmi(9)prepare_percpu_nmi(9)teardown_percpu_nmi(9)irq_get_irqchip_state(9)irq_set_irqchip_state(9)irq_has_action(9)irq_check_status_bit(9)
mwah π β page source: ./kernel/irq; date: October 2026; function: request_percpu_irq_affinity(9). that's the footer, bestie, and we ate. πβ¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms