platform_restore_cleanup(9)
π platform_restore_cleanup(9) π
okay so bestie, welcome to the Kernel API Manual β¨ β today's main character is platform_restore_cleanup, and she is literally the cleanup crew for when a restore goes sideways. no cap.
πΈ NAME πΈ
platform_restore_cleanup β switch to the working state after failing restore π«Ά
like, the restore flopped and now we gotta get the system back to normal mode. that's her whole job. iconic.
β¨ SYNOPSIS β¨
void platform_restore_cleanup (int platform_mode );
that's the whole signature, bestie β nothing sneaky hiding in there π
π¦ ARGUMENTS π¦
platform_modeβ whether or not to use the platform driver π that's it. that's the argument. she's a simple girl.
π₯ DESCRIPTION π₯
so here's the vibe π β you use the platform driver to switch the system to the normal mode of operation after a failing restore. like, the restore did not slay, and now we need to get back to a working state so everything isn't just sitting there being weird.
β οΈ okay listen, this part is important so pay attention: ifplatform_pre_restorehas been called before the failing restore, then this function must be called too β no exceptions, no "but bestie I didn't feel like it" β and that's true regardless of the result ofplatform_pre_restore. like even ifplatform_pre_restorewas a total flop, you still call this. periodt. π
π SEE ALSO π
- Kernel file
./kernel/power/hibernate.cπ pm_hibernation_mode_is_suspend(9)hibernation_set_ops(9)platform_begin(9)platform_end(9)platform_pre_snapshot(9)platform_leave(9)platform_finish(9)platform_pre_restore(9)platform_recover(9)swsusp_show_speed(9)create_image(9)hibernation_snapshot(9)resume_target_kernel(9)hibernation_restore(9)hibernation_platform_enter(9)power_down(9)hibernate(9)hibernate_quiet_exec(9)software_resume_initcall(9)
that's the whole squad, go read them too, iykyk π§π
and that's the page!! mwah π this little manual page lives in ./kernel/power and it's dated October 2026 β yeah she's from the future, we stan a forward-thinking queen ππΈ β¨
π¦ 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