mcpm_loopback(9)
π« 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 π:
mcpm_is_available(9)mcpm_cpu_power_up(9)mcpm_cpu_power_down(9)mcpm_wait_for_cpu_powerdown(9)mcpm_cpu_suspend(9)mcpm_cpu_powered_up(9)mcpm_platform_register(9)mcpm_sync_init(9)
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
- 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