irqentry_exi..._kernel_mode(9)
π irqentry_exit_to_kernel_mode(9) β like, the Kernel API Manual's main character β¨
okay so bestie, buckle up π this one's from the Kernel API Manual and it's giving "quietly doing the most important cleanup work in the whole kernel" energy. no cap.
πΈ NAME πΈ
irqentry_exit_to_kernel_mode β Run preempt checks and establish state after invoking the interrupt handler π
β¨ SYNOPSIS β¨
void irqentry_exit_to_kernel_mode (struct pt_regs *regs ,
irqentry_state_t state );
π¦ ARGUMENTS π¦
regsβ Pointer to current'spt_regs. literally just the regs for whoever's running rn π«Άstateβ the return value from the matching call toirqentry_enter_from_kernel_mode. matching!! as in they're a set, they're a duo, they're endgame π
π₯ DESCRIPTION π₯
So this is the counterpart of irqentry_enter_from_kernel_mode, and the way it works is it combines the calls to irqentry_exit_to_kernel_mode_preempt and irqentry_exit_to_kernel_mode_after_preempt for you. one function, two jobs, ate and left no crumbs π
The requirement for the CPU state? it can schedule. that's the vibe check, that's the entry fee, no exceptions π
After the function returns, the tracing, lockdep and RCU state transitions are completed β like fully done, wrapped up, finished β and the caller must return directly to the interrupted context. directly!! don't wander off, don't stop for a snack, go straight there πββοΈπ¨
β SEE ALSO β
- Kernel file
./include/linux/irq-entry-common.hπ 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_enter(9)irqentry_exit(9)irqentry_nmi_enter(9)irqentry_nmi_exit(9)
and that's the whole page bestie, hope it slayed for you ππ
sign-off time π: this one lives over in ./include/linux and the version stamp on it says October 2026 β so yeah, she's from the future, iconic behavior honestly πβ¨
π¦ 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