irqentry_exit(9)
β¨ irqentry_exit β¨
okay so this is a page from the Kernel API Manual, section 9 β yes bestie, we're in the kernel internals now, hold my iced coffee π§
π NAME π
irqentry_exit β the girl whose whole job is handling the return from an exception that used irqentry_enter() π
π¦ SYNOPSIS π¦
void noinstr irqentry_exit (struct pt_regs *regs , irqentry_state_t state );
literally the whole signature, no notes π
πΈ ARGUMENTS πΈ
regsβ pointer topt_regs, aka the exception entry regs. it's giving "here's the receipts from when we came in" π§Ύstateβ the return value from the matching call toirqentry_enter. yes, it has to be the matching one, they're a set, don't split them up π
π«Ά DESCRIPTION π«Ά
so depending on the return target β kernel or user β this runs the necessary preemption and work checks if possible and required, and then it returns to the caller with interrupts disabled and no further work pending. slay β¨
this is the last action before returning to the low level ASM code, which honestly just needs to return to the appropriate context. it's the final vibe check before the handoff π¦
it's the counterpart to irqentry_enter β they're a duo, main character energy pair, iykyk π«
π¨ real talk: it hands control back with interrupts disabled and no further work pending. that's not a suggestion, that's the contract, periodt.
π₯ SEE ALSO π₯
kernel file ./include/linux/irq-entry-common.h β go read it, it's right there π
and the whole friend group:
arch_enter_from_user_mode(9)arch_in_rcu_eqs(9)enter_from_user_mode(9)arch_exit_to_user_mode_work(9)arch_exit_to_user_mode_prepare(9)arch_exit_to_user_mode(9)arch_do_signal_or_restart(9)__exit_to_user_mode_prepare(9)syscall_exit_to_user_mode_prepare(9)irqentry_exit_to_user_mode_prepare(9)exit_to_user_mode(9)irqentry_enter_from_user_mode(9)irqentry_exit_to_user_mode(9)struct irqentry_state(9)irqentry_enter_from_kernel_mode(9)irqentry_exit_to_kernel_mode_preempt(9)irqentry_exit_to_kernel_mode_after_preempt(9)irqentry_exit_to_kernel_mode(9)irqentry_enter(9)irqentry_nmi_enter(9)irqentry_nmi_exit(9)
like, the entire extended universe, we love a complete cast ππ
that's the whole page bestie, no crumbs left π this one lives in ./include/linux, dated October 2026 β mwah, go touch some registers ππ
π¦ 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