pm_runtime_irq_safe(9)
π pm_runtime_irq_safe(9) π
okay bestie, welcome to the Kernel API Manual β yes, that's the manual name, we're fancy here β¨ this page is legit called pm_runtime_irq_safe, and honestly? it's giving "small function, huge consequences" energy. let's get into it π
β¨ NAME β¨
pm_runtime_irq_safe β the one where we leave interrupts disabled during callbacks π yeah. that's the whole vibe. no cap.
πΈ SYNOPSIS πΈ
void pm_runtime_irq_safe (struct device *dev );
literally one line, one argument, zero mercy π
π¦ ARGUMENTS π¦
devβ the device we're handling, aka the main character of this whole operation π
she's a struct device * and she's the only one invited to this function. periodt.
π DESCRIPTION π
so here's the tea, bestie β this function sets the power.irq_safe flag. and what does that flag do? it tells the PM core that the ->runtime_suspend and ->runtime_resume callbacks for this device should always be invoked with the spinlock held and interrupts disabled π«Ά like, every single time, no exceptions, that's just how it is now.
and that's not even the whole story. it also causes the parent's usage counter to be permanently incremented β which means the parent can never runtime suspend. ever. π³ and why? because otherwise an irq-safe child might have to wait for a non-irq-safe parent, and that would be a whole mess. so the kernel just... keeps the parent awake forever. iconic, honestly π
tl;dr: you're making a permanent commitment here. the parent is locked in. iykyk.
π₯ SEE ALSO π₯
π§ the source file
- Kernel file
./drivers/base/power/runtime.c
β the whole friend group (go say hi)
update_pm_runtime_accounting(9)pm_runtime_deactivate_timer(9)pm_runtime_cancel_pending(9)rpm_check_suspend_allowed(9)pm_runtime_release_supplier(9)__rpm_callback(9)rpm_callback(9)rpm_idle(9)rpm_suspend(9)rpm_resume(9)pm_runtime_work(9)pm_suspend_timer_fn(9)pm_schedule_suspend(9)__pm_runtime_idle(9)__pm_runtime_suspend(9)__pm_runtime_resume(9)pm_runtime_get_conditional(9)pm_runtime_get_if_active(9)pm_runtime_get_if_in_use(9)__pm_runtime_set_status(9)__pm_runtime_barrier(9)pm_runtime_barrier(9)pm_runtime_enable(9)devm_pm_runtime_set_active_enabled(9)devm_pm_runtime_enable(9)devm_pm_runtime_get_noresume(9)pm_runtime_forbid(9)pm_runtime_allow(9)pm_runtime_no_callbacks(9)update_autosuspend(9)pm_runtime_set_autosuspend_delay(9)__pm_runtime_use_autosuspend(9)pm_runtime_init(9)pm_runtime_reinit(9)pm_runtime_remove(9)pm_runtime_get_suppliers(9)pm_runtime_put_suppliers(9)pm_runtime_drop_link(9)pm_runtime_force_suspend(9)pm_runtime_force_resume(9)
like, that's a whole squad right there π you're never gonna be lonely in this header file, that's for sure π«Ά
π friendly reminder: irq_safe = interrupts stay off in those callbacks. if your callback was planning to sleep? it cannot. it simply cannot. don't do it. respect the flag π
π okay that's the page!! brought to you by ./drivers/base/power, dated October 2026, and signed off by pm_runtime_irq_safe(9) herself β she said stan her or else β¨π byeee π¦
π¦ 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