alloc_irq_cpu_rmap(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ alloc_irq_cpu_rmap πŸ’…

okay so this is from the Kernel API Manual (that's the 9 section bestie, kernel dev territory πŸ‘‘) and it's literally the page for alloc_irq_cpu_rmap β€” the function that allocates a CPU affinity reverse-map for IRQs. yes that's a whole mouthful, we'll get to it 🫢


🌸 NAME 🌸

alloc_irq_cpu_rmap β€” allocate CPU affinity reverse-map for IRQs ✨

no cap, that's the whole vibe: you're building the reverse-map so you can go from an IRQ back to the CPUs that are down with it πŸ’–


πŸŽ€ SYNOPSIS πŸŽ€

struct cpu_rmap * alloc_irq_cpu_rmap (unsigned int size );

it hands you back a struct cpu_rmap * pointer, and you feed it one unsigned int size. that's the whole signature, iconic and simple 🌟


πŸ¦‹ ARGUMENTS πŸ¦‹

  • size β€” Number of objects to be mapped. literally that many things getting mapped, so like, pick your number wisely bestie πŸ’…

πŸ”₯ DESCRIPTION πŸ”₯

so here's the thing β€” Must be called in process context. periodt. not interrupt context, not some random atomic corner, process context only. the way this is a hard requirement and not a suggestion 😭 take it seriously fr fr πŸ™ˆ


πŸ’œ SEE ALSO πŸ’œ

  • Kernel file ./include/linux/cpu_rmap.h β€” the header where all this lives, go read it, it's giving source of truth πŸŽ€
  • struct cpu_rmap(9) β€” the struct itself, the main character of this whole story πŸ‘‘

πŸ“ lowkey reminder: size = number of objects to be mapped, and process context is non-negotiable. that's it, that's the page πŸ’€βœ¨

and that's a wrap bestie!! 🌈 this lil page comes to you from ./include/linux, dated October 2026 β€” mwah, go map those IRQs, you're gonna slay πŸ’–πŸ§šβ€β™€οΈβ­

πŸ“¦ where this page comes from