STRUCT MIPS_STATIC_SUSPEND_STATE(9)
πΈ STRUCT MIPS_STATIC_SUSPEND_STATE(9) πΈ
okay so bestie, welcome to the Kernel API Manual, section 9 β this is the page for struct mips_static_suspend_state, and honestly? it's giving "tiny but crucial." π
β¨ NAME β¨
struct mips_static_suspend_state β the core saved CPU state that survives across S2R. π«Ά
π¦ SYNOPSIS π¦
struct mips_static_suspend_state {
#ifdef CONFIG_EVA;
unsigned long segctl[3];
#endif;
unsigned long sp;
};
π MEMBERS π
segctlβ the CP0 Segment control registers. literally the segment control vibes, saved for later. β¨spβ the stack frame where the GP register context is saved. yep, that's where the context lives. π
π DESCRIPTION π
So here's the tea: this structure holds the minimal CPU state that has to be saved in static kernel data so that the rest of the state can actually be restored later. no cap. π§
That includes the segmentation configuration when EVA is enabled β and this part is important, bestie β because those registers must be restored before any kmalloc'd memory is referenced, including even the stack pointer itself. π like, the stack pointer. the whole thing. periodt.
π₯ SEE ALSO π₯
- Kernel file
./arch/mips/include/asm/pm.hβ go read it, iykyk π
and that's the whole page, bestie β slay. π
source/version: ./arch/mips/include/asm Β· date: October 2026 Β· struct mips_...uspend_state(9) π β mwah, go save some CPU state ππΈ
π¦ 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