Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "William A. Kennington III" <william@wkennington.com>
To: Tomer Maimon <tmaimon77@gmail.com>
Cc: Andrew Jeffery <andrew@codeconstruct.com.au>,
	Avi Fishman <avifishman70@gmail.com>,
	Tali Perry <tali.perry1@gmail.com>,
	Russell King <linux@armlinux.org.uk>,
	Patrick Venture <venture@google.com>,
	Nancy Yuen <yuenn@google.com>,
	Benjamin Fair <benjaminfair@google.com>,
	openbmc@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] ARM: npcm: Add CPU hotplug callbacks for kexec support
Date: Fri,  4 Dec 2026 23:13:58 +0000	[thread overview]
Message-ID: <20261204231358.3790643-1-william@wkennington.com> (raw)
In-Reply-To: <CAP6Zq1hd+6c+Nvn6jO25G+oarp=b0PFApcJi+fT3iLzWUVTiUg@mail.gmail.com>

On Thu, Dec 03, 2026 at 08:17:31PM +0200, Tomer Maimon wrote:
> Hi William,
>
> Sorry for the late reply, and thanks for updating the patch.
> What workflow are you looking to enable with kexec on NPCM7xx? It
> would help to understand where a normal reboot isn't sufficient.

The primary use case is kdump. Even for crash dumps, kexec -p goes
through machine_kexec_prepare(), which fails with -EINVAL on SMP ARM
platforms that do not implement CPU hotplug callbacks. A normal reboot
loses the crashed kernel's memory state instead of letting a crash
kernel boot and save a vmcore.

We don't need regular kexec over a normal reboot in production; kdump is
the real motivation. Rather than resending the old v2 WFI stub (which
leaves CPU1 stuck in kernel text and breaks CPU hotplug and full kexec),
it turned out to be straightforward to hand CPU1 back to the boot ROM
and make full kexec and CPU hotplug work properly.

> Have you tested repeated CPU1 offline/online cycles and a kexec into a
> second kernel that successfully brings CPU1 online?

Yes, I tested this v3 patch on an NPCM730 board running Linux 7.3.6:

- CPU1 offline/online: 20 cycles before kexec and 50 cycles after kexec,
  with 0 failures. On each offline, SCRPAD transitioned to the boot ROM
  parking address (0xffff0218) and CPU1 came back online cleanly. (An
  earlier revision of the ROM-parking path also passed 200 cycles under
  load.)
- SMP kexec: loaded the same 7.3.6 kernel with live /sys/firmware/fdt
  and initrd via kexec -l and ran kexec -e. The second kernel booted
  cleanly with both CPUs online ("smp: Brought up 1 node, 2 CPUs") and
  then passed the 50 post-kexec CPU1 hotplug cycles.
- kdump: loaded a crash kernel with kexec -p, triggered a panic via
  sysrq, and captured a vmcore cleanly.

Thanks,
William


      reply	other threads:[~2026-12-04 23:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-28  9:52 [PATCH v3] ARM: npcm: Add CPU hotplug callbacks for kexec support William A. Kennington III
2026-12-03 18:17 ` Tomer Maimon
2026-12-04 23:13   ` William A. Kennington III [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261204231358.3790643-1-william@wkennington.com \
    --to=william@wkennington.com \
    --cc=andrew@codeconstruct.com.au \
    --cc=avifishman70@gmail.com \
    --cc=benjaminfair@google.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=openbmc@lists.ozlabs.org \
    --cc=tali.perry1@gmail.com \
    --cc=tmaimon77@gmail.com \
    --cc=venture@google.com \
    --cc=yuenn@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox