arm64_nmi_cpu_stop(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ NAME ✨

okay so bestie, welcome to arm64_nmi_cpu_stop(9) β€” the Kernel API Manual page you didn't know you needed πŸŽ€ β€” and here's the whole vibe in one line: arm64_nmi_cpu_stop β€” stop the local CPU after it is told to stop. literally that's it, that's the function πŸ’…


🌸 SYNOPSIS 🌸

void __noreturn arm64_nmi_cpu_stop (struct pt_regs *regs , bool
die_on_crash );

no cap, it returns void, it's __noreturn (like, it does NOT come back, don't wait up 😭), and it takes exactly two things. let's meet them 🫢


πŸ’œ ARGUMENTS πŸ’œ

  • regs β€” the register state you wanna record in the vmcore on a crash stop. OR, plot twist, pass NULL for panic_smp_self_stop, because that path has no interrupted context to save. it's giving "nothing to see here" πŸ™ˆ
  • die_on_crash β€” on the kdump crash path, this tells the CPU to power itself off via PSCI CPU_OFF (so a capture kernel can come reclaim it) instead of just parking it. powered off vs. parked, iconic difference πŸ‘‘

πŸ”₯ DESCRIPTION πŸ”₯

so this function is the single point that every arm64 stop path funnels through πŸŒ€ β€” it keeps all the bookkeeping in one place so nobody's out here duplicating chores:

  • mask interrupts
  • save the crash context
  • mark offline
  • mask SDEI
  • optionally power off

one function, all the errands, main character energy fr fr πŸ’…

and the paths that funnel into it are:

  • the regular IPI_CPU_STOP and pseudo-NMI IPI_CPU_STOP_NMI handlers;
  • panic_smp_self_stop, which is a CPU just parking itself on a parallel panic (she's doing her own thing, respectfully);
  • the SDEI cross-CPU NMI handler (drivers/firmware/arm_sdei_nmi.c), which reaches CPUs the stop IPIs could not. lowkey the outreach team of this whole operation πŸ“‘

now the important bit, bestie, listen up πŸ‘€ β€” the IPI stop handlers pass die_on_crash as true. the SDEI handler and panic_smp_self_stop pass false and only park. and for SDEI that's required, not just being conservative:

it runs inside an SDEI event that is deliberately never completed (completing it has firmware resume the wedged context), and a CPU_OFF from that not-yet-completed context wedges EL3 on some firmware β€” a documented follow-up. πŸ˜¬πŸ’€

so yeah, that's a whole "do not do this" situation. parking also matches this path's own fallback for when CPU_OFF isn't available anyway, so it's consistent AND safe. slay 🌈


πŸ¦‹ SEE ALSO πŸ¦‹

  • Kernel file ./arch/arm64/kernel/smp.c β€” go read it, iykyk πŸ“–βœ¨

and that's the page, bestie πŸŽ€ this cutie came from ./arch/arm64/kernel, dated October 2026, page name arm64_nmi_cpu_stop(9) β€” go forth and stop those CPUs safely, mwah πŸ’–πŸ«Ά

πŸ“¦ where this page comes from