From patchwork Wed Sep 6 16:03:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 13375781 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3D419EE14B0 for ; Wed, 6 Sep 2023 16:06:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=gGBqhrXkTPPOvT/PINr92BG7ZubQCjgY8mF4jlGi5dA=; b=UsYXeeg2vpzrfi MrMW2Pzw2FRUhh6jcAH08+TnYQnvm2eVPKMMo2O566Pr8+FKOIcUdoEVtLGsIejUKbFsvNjhWWPh/ DAjj1pDcoKSilFVdVJq8Se66iF3hpHa37WuA5qejG8avnMD7XMBtUFrUCOaBuH6P2FcVaXkCDoRNl 4hHWpcOhPspLk7cRSep4G+OdEMFVT1JcW2/V5rBI3KOZq1KJmbG+LIRcrJEA1wewCLspoZBOsihrC a6T6b94Xq1inghGbCQZYV5OalS3faFRss98mCUHO0pCQnijpm468RW0B5T1k79i9CdDj+GjSZpD7M 2YAHg/oX7RVK4BqU9V+Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qdv2p-00ATef-2f; Wed, 06 Sep 2023 16:06:19 +0000 Received: from mail-pl1-x629.google.com ([2607:f8b0:4864:20::629]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qdv2l-00ATbQ-0R for linux-arm-kernel@lists.infradead.org; Wed, 06 Sep 2023 16:06:16 +0000 Received: by mail-pl1-x629.google.com with SMTP id d9443c01a7336-1c1f7f7151fso22300685ad.1 for ; Wed, 06 Sep 2023 09:06:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1694016374; x=1694621174; darn=lists.infradead.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; bh=Qj/cLRwqRCqHI6A0+VpIGgNKYM1V9qr45vJe0jTCZJg=; b=RMir7WR976tFWPBjC94iA6i+ug+kd+hPRKQwF6aqKhH8KjnWv3fP6tsotMcn7U8RHv FfSqC4FVazsjx7pTRE0eMa9/+JsGBdDwNnRfo4EiYor4xBiQSvWfeIKCIn1cvW+9jpxy Afk1vp0y+xSieUE3zf9wpfItWtwnn2RQexceQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694016374; x=1694621174; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Qj/cLRwqRCqHI6A0+VpIGgNKYM1V9qr45vJe0jTCZJg=; b=c6mDQZCRAdHOTHZpefcGBrX5KhkFwglvlvUqWOh6Bbih4w1nNK7sgQor6lSzAJFxRE jSp0v/LaMKZlfuwgwZd0CzK6prpJQtZbxn6UuX9CE3GQ49dOh53c3wDq4UoO9DByaF+K qdJc3swadiPwhB7bzv8xC9o90ZOCIunpe9rgPGZ/VXe12IqkWvoY1SIwbO7xpLmJ80ya 2xR2xiS5EcBJzfXPAQ5XDHyIb9IiZsDnGzyzjSWCJ+PLyQsL5NHa+/g3D28JfaJ0aelM M9uUpGGyz4OC+heSYVUcakEOrpC1sL8XBrahExtJ0dmQ4GPMQ2uwub6wCc2FroGQDuPH 2J2Q== X-Gm-Message-State: AOJu0YwLOXWdG+zMnvWRk21GjN3Hc47mk0nz1oWUj2fPDJS3YasKtMW2 6eYN+cCc3cqLP4PsBG+cRXHZCQ== X-Google-Smtp-Source: AGHT+IH8tU2R8ed2JHyL2LLKGxknTebDB1XNgq+5JhdlRzNQTuRPiDweqaRM4tYwRz/RnbnKvuWVOQ== X-Received: by 2002:a17:903:32c6:b0:1bd:c931:8c32 with SMTP id i6-20020a17090332c600b001bdc9318c32mr15979784plr.62.1694016374620; Wed, 06 Sep 2023 09:06:14 -0700 (PDT) Received: from tictac2.mtv.corp.google.com ([2620:15c:9d:2:4a07:e00a:fdae:750b]) by smtp.gmail.com with ESMTPSA id ju19-20020a170903429300b001b8c689060dsm11338859plb.28.2023.09.06.09.06.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Sep 2023 09:06:13 -0700 (PDT) From: Douglas Anderson To: Mark Rutland , Catalin Marinas , Will Deacon , Sumit Garg , Daniel Thompson , Marc Zyngier Cc: linux-arm-kernel@lists.infradead.org, "Rafael J . Wysocki" , Lecopzer Chen , Chen-Yu Tsai , Tomohiro Misono , Peter Zijlstra , Masayoshi Mizuma , Stephane Eranian , Ard Biesheuvel , kgdb-bugreport@lists.sourceforge.net, Stephen Boyd , linux-perf-users@vger.kernel.org, Thomas Gleixner , ito-yuichi@fujitsu.com, Douglas Anderson , Chen-Yu Tsai , jpoimboe@kernel.org, linux-kernel@vger.kernel.org, scott@os.amperecomputing.com, vschneid@redhat.com Subject: [PATCH v13 5/7] arm64: smp: IPI_CPU_STOP and IPI_CPU_CRASH_STOP should try for NMI Date: Wed, 6 Sep 2023 09:03:00 -0700 Message-ID: <20230906090246.v13.5.Ifadbfd45b22c52edcb499034dd4783d096343260@changeid> X-Mailer: git-send-email 2.42.0.283.g2d96d420d3-goog In-Reply-To: <20230906160505.2431857-1-dianders@chromium.org> References: <20230906160505.2431857-1-dianders@chromium.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230906_090615_188581_B6B3986D X-CRM114-Status: GOOD ( 11.74 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 Acked-by: Mark Rutland Tested-by: Mark Rutland Tested-by: Chen-Yu Tsai Signed-off-by: Douglas Anderson --- This patch is tested by Mark Rutland's LKDTM test [1]. [1] http://lore.kernel.org/lkml/20230831101026.3122590-1-mark.rutland@arm.com (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: