irq_create_mapping_affinity(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… irq_create_mapping_affinity(9) β€” Kernel API Manual, but make it make sense πŸŽ€

okay bestie, so this one's from the Kernel API Manual and it's literally about giving your hardware interrupt a cute little home in linux irq space. it's giving matchmaker energy fr fr. let me walk you through it 🫢


✨ NAME ✨

irq_create_mapping_affinity β€” Map a hardware interrupt into linux irq space 🌈


πŸ¦‹ SYNOPSIS πŸ¦‹

unsigned int irq_create_mapping_affinity (struct irq_domain *domain ,
irq_hw_number_t hwirq , const struct irq_affinity_desc *affinity );

like, that's the whole signature. iconic. don't touch it ✨


🌸 ARGUMENTS 🌸

  • domain β€” the domain that owns this hardware interrupt, or NULL if you want the default domain. no domain? no problem, the default one's got you πŸ’–
  • hwirq β€” the hardware irq number, as it lives inside that domain's space. that's its home address basically 🏠
  • affinity β€” the irq affinity. the whole vibe check of where this interrupt wants to hang out πŸ”₯

πŸ‘‘ DESCRIPTION πŸ‘‘

k so, the rule here is only one mapping per hardware interrupt is permitted β€” no double-booking, no sharing, that's the law πŸ’€ and then it returns a linux irq number, slay ✨

one little heads-up tho: if you need to specify the sense/trigger, you gotta call set_irq_type on the number that came back from that call. like, after. on the returned number. don't skip that step bestie πŸŽ€


🧚 SEE ALSO 🧚

all the sibling functions, in the flesh, no cap:


and that's the page 🫢 this one's filed under ./kernel/irq, dated October 2026, and it's irq_create_mapping_affinity(9) all the way down. go map some interrupts, main character πŸ’œβœ¨

πŸ“¦ where this page comes from