mcpm_loopback(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’« mcpm_loopback(9) β€” the kernel API manual, bestie edition πŸ’«

okay so you found the mcpm_loopback(9) page, iconic. this is the MCPM one. MCPM stands for Multi-Cluster Power Management and honestly the page is basically "we're gonna soft reset the CPU and see what happens" but, like, in a controlled way. let's get into it 🫢


✨ NAME ✨

mcpm_loopback β€” make a run through the MCPM low-level code πŸ’…

like, you're literally doing a little lap through the MCPM machinery. a vibe check for the low-level code, if you will.


🌸 SYNOPSIS 🌸

int mcpm_loopback (void (*cache_disable)(void) );

that's it. one function pointer, one return value, no drama. πŸŽ€


πŸ¦‹ ARGUMENTS πŸ¦‹

  • cache_disable β€” a pointer to function performing cache disabling. yes bestie, you have to bring your own cache-disabling function. it's giving "bring your own snacks to the party". πŸ“

πŸ”₯ DESCRIPTION πŸ”₯

okay so here's the whole thing. mcpm_loopback exercises the MCPM machinery by soft resetting the CPU and branching to the MCPM low-level entry code before returning to the caller. so the CPU takes a little trip, hits the low-level MCPM entry code, and then comes right back to you like nothing happened. main character energy, honestly. πŸ’€

the cache_disable function must do the necessary cache disabling to let the regular kernel init code turn it back on as if the CPU was hotplugged in. so like β€” you disable it, kernel init re-enables it, and everybody pretends the CPU just got plugged in fresh. no cap, that's the whole bit. πŸ”

the MCPM state machine gets set as if the cluster was initialized, meaning the power_up_setup callback passed to mcpm_sync_init will be invoked for all affinity levels. all of them. every single affinity level. it's thorough like that. πŸ‘‘

and why would you even want this? glad you asked:

  • it may be useful to initialize some resources β€” for example, enabling the CCI that requires the cache to be off πŸ‘€
  • or simply for testing purposes β€” sometimes you just gotta poke the machinery and see if it pokes back 🧚
⚠️ real talk: the cache has to be off for this to be correct. that's why cache_disable is your job and not the function's. don't skimp on it. πŸ™ˆ

🌈 SEE ALSO 🌈

the kernel file ./arch/arm/include/asm/mcpm.h β€” go read it, it's literally right there, iykyk πŸ“–:

the whole MCPM friend group fr fr πŸ’–


anyway that's the page!! slay πŸ’…βœ¨

this little love letter to the MCPM subsystem comes to you from ./arch/arm/include/asm, dated October 2026, and it's page mcpm_loopback(9) β€” go forth and loop back, bestie πŸŽ€πŸ¦‹πŸ’œ

πŸ“¦ where this page comes from