STRUCT MIPS_STATIC_SUSPEND_STATE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 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