From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.215.173 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796426043; b=K3LN3Zq0EfFlhkRgSlKgpTzBL4zCJ/to9XrzwFFjs3x2ZUIMds8IN8jPxF3/U9DAvU9U CiNV5PcElX2SYc1lGzwUVZpz4HwbV77vnBbeWwgaBKvBGQlwklWiKpIaENwxQuG6aMd3Y NbZmoxOTJ0986Q8Zgj12XHjtNvmjf4ocgLQlvfrl5ZVcukhawK5WOdx4FPyf2gWv6craB XfkoYJvo++MO4c34M8Sdm1Yf9ZjVpYaDchTLsIQ2+Y2z7CSY6I1fl2m8Iu5M/K+/sWbAR t7Y1Kr4CSKRxYBawbRfly86ReNXvZZFf2BU7oD6Yc5iuMQ/Qlyln5Fp0bHSmClv7FOQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796426043; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Transfer-Encoding; bh=wfgyGuVQpHXcE47L95b8LHmUgJ/zewdwiF+HexXSNDY=; b=xC8Z0rKTuPpySSytH7eewp5IKXYcGlETbiieo1y0z2FUZfUhKpmsEzaWF06/oVyi211v wLpyVUWXXC0pKjBj8gbavlgko1N5EhFm8QwVhotWov/w72Yg0xawzPvcIkAPGW6EvWFul 7M3+trtOm+oy4+wk7ftA7IC7QilQbxovxe3kbH/S58gzQ9dpuNErjapMjKYy8/2kbKZue eGbO8XWj9rEZWAIzmXUgqMVIgcHwVICHk3dl+bu5Nz/WlkjQK+xUOAkt51w+jH8p3obq+ qLcgTfzor5+oWXrhVjOmhCEmlvYCKugjxuPljL0VwYbfp8DaJg5ZgBNOJ3QWysJM/RA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none header.from=wkennington.com; spf=none smtp.mailfrom=wkennington.com; dkim=pass header.d=wkennington-com.20260707.gappssmtp.com header.i=@wkennington-com.20260707.gappssmtp.com header.a=rsa-sha256 header.s=20260707 header.b=anxGV1vx; arc=none smtp.remote-ip=209.85.215.173 Received: from mail-pg1-f173.google.com (mail-pg1-f173.google.com [209.85.215.173]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 524A1606A322 for ; Fri, 4 Dec 2026 23:14:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 524A1606A322 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=wkennington.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=wkennington.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=wkennington-com.20260707.gappssmtp.com header.i=@wkennington-com.20260707.gappssmtp.com header.a=rsa-sha256 header.s=20260707 header.b=anxGV1vx Received: by mail-pg1-f173.google.com with SMTP id 41be03b00d2f7-cdb2dfcca94so733030a12.1 for ; Fri, 04 Dec 2026 15:14:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wkennington-com.20260707.gappssmtp.com; s=20260707; t=1796426041; x=1797030841; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=wfgyGuVQpHXcE47L95b8LHmUgJ/zewdwiF+HexXSNDY=; b=anxGV1vxt4Sc3cabM5U9HChXRnZdSI4bo4ArTGRgdYh73sABdKjs4PxHnb5QrXQcaN ewWMCcQOaDs6eWxDFRrpmxznH+vihMWuEpO2nhkA/yeyrfQuwAh6hxu1t97n//fzywo5 f2XwBJ95tZSiCD/EQ3maOS0HkQwKj1qWrhw61/tqkQMBAztB+CVYJQQ6KScufUUMj7Ry GrXbFogupEbgI/an6JydSNpK0KU35Q5CZSv6oQuAKVn1qOj4bly2Cv2HLLInwgJWQ6T2 dtvaFX1S//mojSLpg+5SMGHqdLLbQTmUrFAKljBvdjlNxo7PotU8m0ajCjkaqVlC6FP/ LKow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796426041; x=1797030841; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=wfgyGuVQpHXcE47L95b8LHmUgJ/zewdwiF+HexXSNDY=; b=VNtLRxI8OmpkI2Lg4zYwUzt3D3PfYYV9sThC/GUSRN0HLJ43ZZrpPddeLlqkOZUJn2 WQiOpZWgGufVzmjLBb2YiKEZwxbyWyW18ivKRDZqM6FFgyMTHHEMU5HSNnmwPvj8RbZ1 WgCQ7P0e9qqCV2ALn+zbSTYHzcjvNhk4D3flpiI5mck+RVKDHsYfJHTKta2djsuBGkj0 UHgs0xEZ0OpuhgKio16iJeA/n/d9qgIJm5WLtb/9ZNozxSIsDgFv4ztXHkcU9oYKX9s7 XcyoyEbNeqg0FKzDeCRwS9uqljGuCqlapRA4XIUBGzk3IqLrfYAQqLHzyOoFjsz3/Mkb FnFw== X-Forwarded-Encrypted: i=1; AL+hErEG6v/bhHVIOjEFkkdSUxnVAZaoWt1kMp+p9d/IKkSwby9N2MTWskA9C1P1Q5KilFswLSRk7hGOSaQDxas=@vger.kernel.org X-Gm-Message-State: AB4q+uGjxE9jHsudgtLU8m9PFxVnDIgief3m8djkZIHswnDkynNaxnZL s2NcgsTpRe5dg03srUlFF+gxPGPffFbYVDgVM2rJitN89J6Fi46v8opEa4Q91ciIcVI= X-Gm-Gg: AZFdTZcSAdDVNmMQf4Kb5E/i0mL/o1mEcHWmSSMbeNWAzoq2iD3pO83y28gJt4kif9q Ntef/HEY9VzVtqWjfIPUzC9tp387ABMcepXrPbU3jvXpy037Suky566cVFYBgVRUObBYDS6waUH KxkrR8tGPcZUfwlw950L1aaHtJqPfNRCMq+3O11tDbf69dzN8e7U0YF9K7S4LzMt7a5kvpzUYPf KvVoF+oP4LWdaG+w1lVdzLNSNrBToEzhBtRYqOlXkRyjWwSjZM+MluCZfiVi+cG2V0TJazz47Kj iMOUeF93OWBO9Hdg2qO2c72EDVkSKnuuy4YJyXo9OK4PjMvNMKHEKg/wc1sO+Pn7AQxuwqaNMtX sqgN0ri8cGhsHGTVMKBprotK9ky0yExCIjsBV1aadf8F5FUT+fLv6jfG8iKHHGMZKNzzlbe0z04 Bp/64FmW15sa3poydoj9lmsx+go+IdN3Tdt1SXChlQOTQFA94xpGgjfazw+Gbpf4THLfkt4stTc ADXpKe1ol1m9YvTqJNKWFGnKGXOX7OaZXQUnMCNlmwsAoFXKHldZrKNW+0MulLqW5SsOyJ5pR2Z sqZQO8Rfk5j65xSsNMzS9glhoDAonE1KQcGFDDe8j85ilVRK4KKXke7g3RW+z+GTpEOUMJUD440 kDdfIuoAhiqHtwg== X-Received: by 2002:a17:90b:5488:b0:3b1:64d3:f308 with SMTP id 98e67ed59e1d1-3b5e0626213mr3313446a91.43.1796426041271; Fri, 04 Dec 2026 15:14:01 -0800 (PST) Received: from wak.c.googlers.com.com (246.21.127.34.bc.googleusercontent.com. [34.127.21.246]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3b5ddc35aecsm5872158a91.9.2026.12.04.15.14.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Dec 2026 15:14:00 -0800 (PST) From: "William A. Kennington III" To: Tomer Maimon Cc: Andrew Jeffery , Avi Fishman , Tali Perry , Russell King , Patrick Venture , Nancy Yuen , Benjamin Fair , 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 Message-ID: <20261204231358.3790643-1-william@wkennington.com> In-Reply-To: References: <20261128095254.358131-1-william@wkennington.com> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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