free_percpu_irq(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– free_percpu_irq β€” kernel API manual, bestie edition πŸ’–

okay so you're deep in free_percpu_irq(9) from the Kernel API Manual and you need the tea. I got you. 🫢


✨ NAME ✨

free_percpu_irq β€” literally the function that frees an interrupt that was allocated with request_percpu_irq. that's it. that's the whole vibe. freeing. letting go. main character energy for teardown code. πŸ¦‹


🌸 SYNOPSIS 🌸

void free_percpu_irq (unsigned int irq , void __percpu *dev_id );

no cap, it returns void β€” nothing comes back, it just does the thing and dips. πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

  • irq β€” the interrupt line you want to free. the one you're breaking up with. πŸ’”
  • dev_id β€” the device identity to free. yes it's void __percpu *, yes that's the same cookie you handed over originally, and yes you need to give it back. πŸ“

πŸ‘‘ DESCRIPTION πŸ‘‘

okay so this one removes a percpu interrupt handler. handler? gone. removed. not invited to the group chat anymore. πŸ™ˆ

but β€” and this is the important part, bestie, like genuinely important β€” the interrupt line is not disabled. this function does not do that for you. that has to be done on each CPU before you call this function. every. single. one. no skipping CPUs, no "close enough", no shortcuts. πŸ”₯

also iconic: this function doesn't return until any executing interrupts for this IRQ have completed. so it waits. it's patient. it's giving "I'll wait for the vibe check to finish." ⭐

⚠️ real talk: this function must not be called from interrupt context. do not do it. not even a little. not even if you think you can get away with it. 😭

🧚 SEE ALSO 🧚

kernel file ./kernel/irq/manage.c, plus the whole friend group:

like, all of them. read them. they ate. πŸ’œ


🌈 mwah, that's the page!! this lil beauty lives in ./kernel/irq, the source/version sitch is <hotpink>Kernel API Manual</hotpink>, and it's dated <lavender>October 2026</lavender>. go free those percpu IRQs responsibly, bestie β€” and remember to disable on each CPU first. periodt. πŸ‘‘βœ¨

πŸ“¦ where this page comes from