From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fout-a1-smtp.messagingengine.com (fout-a1-smtp.messagingengine.com [103.168.172.144]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3CD17320CCC for ; Fri, 5 Jun 2026 21:46:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.144 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780695973; cv=none; b=Bl5vjE8/DEjJqVIMN4GTMCA6HIHM/E7SxumepU8VEzUICVTLor3V85LKI/G4fagFMbm21Kl3hrw5FGU9epnOZF/Hjf5oe1GmoYp6GPxrKmc0+y83pK0sn9TlwAM/EU3Q5QTnMidOkb/RE1rk3RUT7v7n9u6TmpRnyRRybl9NMCo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780695973; c=relaxed/simple; bh=4CfH/ZUEV9tW50/uGF+4/kjWDW3gwkm5bCi2/qIfQfg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=fkGZSJu3rnpWoP4ab98YMtrKAE+/vL4mVAWDXm9/eB6CcR/lnBsDdW+n55IHPX8QqdYZlOZsXizgUzW2d5c32tW6AIQUhoIP9sN29hs2zJnYRBF1yhNicvt6GVsFKSwbBBthfPYU2voiMx4gDNj3PqFF+jN4w1rGxVrn8arNZ9c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=shutemov.name; spf=pass smtp.mailfrom=shutemov.name; dkim=pass (2048-bit key) header.d=shutemov.name header.i=@shutemov.name header.b=23cjWCnC; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=jTVlvPX9; arc=none smtp.client-ip=103.168.172.144 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=shutemov.name Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=shutemov.name Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=shutemov.name header.i=@shutemov.name header.b="23cjWCnC"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="jTVlvPX9" Received: from phl-compute-01.internal (phl-compute-01.internal [10.202.2.41]) by mailfout.phl.internal (Postfix) with ESMTP id 71CB9EC01CE; Fri, 5 Jun 2026 17:46:11 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-01.internal (MEProxy); Fri, 05 Jun 2026 17:46:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shutemov.name; h=cc:cc:content-type:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to; s=fm2; t=1780695971; x= 1780782371; bh=1+3OWqiUrkFxJENq9oUtcFjYhrvK0bni0JrOu1K6jSU=; b=2 3cjWCnCrrBfr26y/w07U1sneFXm6ziJuzaNuwTTTxQSKZBSsHr8/dyT6HM/F0lZQ S2Qb7wDh2EVuuZT9ux9gW3iKG4BgG1E3IGA5GH10BUy0Ii8KoJejmqK7Dcz6xuk5 HG5OhGATGZzKadzXxJkxWyfkXexNFIhkwUCgFrvAIItmosD4DqCYByo/zMHKlApr vi0p/vneA3rxr4rvdbDcrG1zZG1T4YL2MihtA0xIhE4fp+NyouDSYU0KrO3PCCry JlSIVBzf45YPtDgUzP0JQgjF9GrC3Pu1prIgQbTcUIuVCND/AU3Ivc8uTekoQ7qQ FYjXvD5msA8/nCEXmvJLA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1780695971; x=1780782371;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mbizrHoy3JxZb7a+/+Sl62ltawrkQ X-ME-Proxy: Feedback-ID: ie3994620:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 5 Jun 2026 17:46:10 -0400 (EDT) Date: Fri, 5 Jun 2026 22:46:09 +0100 From: Kiryl Shutsemau To: Doug Anderson Cc: Catalin Marinas , Will Deacon , James Morse , Mark Rutland , Marc Zyngier , Petr Mladek , Thomas Gleixner , Andrew Morton , Baoquan He , Puranjay Mohan , Usama Arif , Breno Leitao , Julien Thierry , Lecopzer Chen , Sumit Garg , kernel-team@meta.com, kexec@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 4/4] arm64: route crash_smp_send_stop() last resort through SDEI Message-ID: References: <54cb99db3c981dc39eb3031aff5caeaadb09e8b9.1780496779.git.kas@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Fri, Jun 05, 2026 at 01:42:57PM -0700, Doug Anderson wrote: > > + sdei_nmi_crash_smp_send_stop(); > > It feels weird to me that you're adding SDEI for "crash stop" but not > for regular "stop". It feels like you should modify smp_send_stop() to > fall back to SDEI if sending the NMI failed, instead of adding this > separate path. Fair. A wedged CPU ignores the reboot-path stop just the same, and the escalation logic already lives in smp.c, so I'll restructure in v2. One thing to sort out there: this patch parks the stopped CPU inside its SDEI handler without completing the event, which is fine for the crash case (nothing expects the CPU back before reset), but a generic stop path probably wants SDEI_EVENT_COMPLETE_AND_RESUME into a parking stub instead, so that e.g. a regular kexec can bring all CPUs back up in the new kernel. I'll look into that as part of the rework. > > + cpu_park_loop(); > > + /* unreachable */ > > Any chance we could avoid duplicating stuff from ipi_cpu_crash_stop()? Yes -- falls out of the above. I will look into this. Maybe pull the save/offline/park body into a shared helper that both the IPI handler and the SDEI handler call. > > +bool sdei_nmi_crash_smp_send_stop(void) > > +{ > > + unsigned int this_cpu, cpu, remaining; > > + unsigned long timeout; > > + cpumask_t mask; > > The above will probably get you a yell. Putting "cpumask_t" on the > stack is a no-no since it can be quite large under certain CONFIG > options. This is why it's nearly always defined as "static". Doh! Will make it static in v2 -- safe here since the path is serialized by the crash_stop guard. -- Kiryl Shutsemau / Kirill A. Shutemov