From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3ED93C83F17 for ; Thu, 31 Aug 2023 10:12:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242741AbjHaKMy (ORCPT ); Thu, 31 Aug 2023 06:12:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60440 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238116AbjHaKMy (ORCPT ); Thu, 31 Aug 2023 06:12:54 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 5AFDDE4A; Thu, 31 Aug 2023 03:12:48 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 5DF75C15; Thu, 31 Aug 2023 03:13:27 -0700 (PDT) Received: from FVFF77S0Q05N (unknown [10.57.3.201]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 5E2853F64C; Thu, 31 Aug 2023 03:12:42 -0700 (PDT) Date: Thu, 31 Aug 2023 11:12:34 +0100 From: Mark Rutland To: Douglas Anderson Cc: Catalin Marinas , Will Deacon , Sumit Garg , Daniel Thompson , Marc Zyngier , linux-arm-kernel@lists.infradead.org, Masayoshi Mizuma , "Rafael J . Wysocki" , Chen-Yu Tsai , Lecopzer Chen , Tomohiro Misono , Stephane Eranian , kgdb-bugreport@lists.sourceforge.net, Peter Zijlstra , Thomas Gleixner , Stephen Boyd , ito-yuichi@fujitsu.com, linux-perf-users@vger.kernel.org, Ard Biesheuvel , D Scott Phillips , Josh Poimboeuf , Valentin Schneider , linux-kernel@vger.kernel.org Subject: Re: [PATCH v12 5/7] arm64: smp: IPI_CPU_STOP and IPI_CPU_CRASH_STOP should try for NMI Message-ID: References: <20230830191314.1618136-1-dianders@chromium.org> <20230830121115.v12.5.Ifadbfd45b22c52edcb499034dd4783d096343260@changeid> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230830121115.v12.5.Ifadbfd45b22c52edcb499034dd4783d096343260@changeid> Precedence: bulk List-ID: X-Mailing-List: linux-perf-users@vger.kernel.org On Wed, Aug 30, 2023 at 12:11:26PM -0700, Douglas Anderson wrote: > There's no reason why IPI_CPU_STOP and IPI_CPU_CRASH_STOP can't be > handled as NMI. They are very simple and everything in them is > NMI-safe. Mark them as things to use NMI for if NMI is available. > > Suggested-by: Mark Rutland > Reviewed-by: Stephen Boyd > Reviewed-by: Misono Tomohiro > Reviewed-by: Sumit Garg > Signed-off-by: Douglas Anderson > --- > I don't actually have any good way to test/validate this patch. It's > added to the series at Mark's request. I've just sent out an LKDTM test that can be used to test this: http://lore.kernel.org/lkml/20230831101026.3122590-1-mark.rutland@arm.com So FWIW: Acked-by: Mark Rutland Tested-by: Mark Rutland Mark. > > (no changes since v10) > > Changes in v10: > - ("IPI_CPU_STOP and IPI_CPU_CRASH_STOP should try for NMI") new for v10. > > arch/arm64/kernel/smp.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c > index 28c904ca499a..800c59cf9b64 100644 > --- a/arch/arm64/kernel/smp.c > +++ b/arch/arm64/kernel/smp.c > @@ -946,6 +946,8 @@ static bool ipi_should_be_nmi(enum ipi_msg_type ipi) > return false; > > switch (ipi) { > + case IPI_CPU_STOP: > + case IPI_CPU_CRASH_STOP: > case IPI_CPU_BACKTRACE: > return true; > default: > -- > 2.42.0.283.g2d96d420d3-goog >