irq_force_affinity(9)
π irq_force_affinity(9) β the Kernel API Manual, but make it fashion β¨
okay so bestie, this is a page from the Kernel API Manual. it's irq_force_affinity(9) and it's giving very specific, very low-level, very "don't try this at home unless you're literally writing CPU hotplug code" energy. buckle up π
β¨ NAME β¨
irq_force_affinity β Force the irq affinity of a given irq. no cap, that's literally what it does π
π¦ SYNOPSIS π¦
int irq_force_affinity (unsigned int irq , const struct cpumask *cpumask );
πΈ ARGUMENTS πΈ
irqβ the interrupt to set affinity for. yes, that one. the interrupt. you know the one π«Άcpumaskβ it's acpumask. that's the whole description. iconic minimalism, we stan a mysterious parameter π
π DESCRIPTION π
okay so it's the same as irq_set_affinity, but β and this is the main character moment β it does not check the mask against online cpus. nope. zero vibe check on the mask. it just goes. π₯
it's solely for low level cpu hotplug code, where we need to make per cpu interrupts affine before the cpu becomes online. like, before the cpu even shows up to the party, its interrupts are already assigned to the right seats. that's the whole point. that's the assignment. periodt. π
lowkey a warning bestie: this is for low level cpu hotplug code only. do not just casually reach for this one. it skips a check. that check exists for a reason. π
π SEE ALSO π
okay this list is long and honestly? it ate. every single one of these, no skips:
Kernel file ./kernel/irq/manage.c
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_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_irq_affinity(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)
Kernel file ./kernel/irq
like I said. the whole friend group. π«Ά
and that's the page bestie! this was brought to you by the ./kernel/irq source, from October 2026, in the one and only Kernel API Manual. go forth and be affine, but like, only in low level cpu hotplug code. mwah ππ
π¦ 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