From patchwork Tue Aug 22 21:27: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: 13361467 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 1AEA0EE49AF for ; Tue, 22 Aug 2023 21:31:56 +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=M5U5/3Vz8vMlQXGfHOsLleK6KJSioo7l4KOA1874Ous=; b=gIsS/b6fwzX/wd zK+88nXQilpLPlpMzO1hfg6Bf+/Hrp+t0ub7P3lKs0UPp3twsQXVskBFmD2VVh3Ha5h7ra3Sp/HBb 9PuyG7UXGUOYzcKgbvc1ZHu3dES1PV0kNrcXUdaL4XOYfn/1RfPBxObYtXew5Sks01GJFC9oPet5x OSSND1UHMfEkT/24yI3yOk3CXX4ikLkq3bKfIxR+LlGZxPnemn3eliOVk1NqhNO8ee770ktukR8H8 M/i1F6cN7f9QOjeB6WnSJJEYoq2raIKB4fzid9YsCarf97sPrFXC93V6MaByV73FVa8FoI/GlTdgy mtbViTuRrxE9AqOoBMBA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qYYyC-00Gorb-1f; Tue, 22 Aug 2023 21:31:24 +0000 Received: from mail-pl1-x62f.google.com ([2607:f8b0:4864:20::62f]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qYYxj-00GoiT-1U for linux-arm-kernel@lists.infradead.org; Tue, 22 Aug 2023 21:30:56 +0000 Received: by mail-pl1-x62f.google.com with SMTP id d9443c01a7336-1bf0b24d925so32454535ad.3 for ; Tue, 22 Aug 2023 14:30:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1692739855; x=1693344655; 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=sHNo52jMQHCTTXv1njx0att1y1oc+xWVwUeLIRRfBAg=; b=YC0PScEPND5aZfA24ZoaI8wC1TSlRy2EYibMqFd2iUs8w7ZRXT3RKFlha3o6KDnWYU nghvF99uhQidPrOCTS7kFbZPlAlehSol1ZWc0mEDaepO6A4obV5tBwUEQIFSbbZWPuUB UgSIx4tkrAH1Cw/lnH0Vt27I3n+AIHy+x0WXA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692739855; x=1693344655; 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=sHNo52jMQHCTTXv1njx0att1y1oc+xWVwUeLIRRfBAg=; b=A9Yfzy3yLB2x8LKoGvrDdp/Xogpk0Ff8MAj2fzk6SQdm3eEO+B0t8cIOKIRtLvK/4A /+xt13tflZK6gwRL8TYAE/7gMGc6z9DbEMqor4vOK9iRl65jIDHVbvuy3ROi6V/NYHyR 3T0LhxxiUMjTp5kZdhLIEGrfP+fWOPYYqYuXZWpyMPsOProilWcMDKFIugwc+JbK7jYz S+kxdodceMa5Fg/3TkdikqwMfgamZWojeBbzFAW7Y9TkqPfwkDdOzjSPHK45W/yBQsPG qdFx06AWGd5TDKfcH7SpHWqh5tG75ByXUf9LIUkCNnZkqfmHKY7cBrvE5ZdyAxDmjEgg T8IA== X-Gm-Message-State: AOJu0YxqgWzrwd4u+l0G3dMutSqmo5mOsddX0ZpolayeIbZCD1lCBI5O 1bkuWeRC7pKpA++5liQCqeWPvA== X-Google-Smtp-Source: AGHT+IHswwKksNgSxyqElMvXEh66yr67LTxIGthRXPjy6R7WvznnHL9O4TkqksLBbcEBtlvUxYpXTg== X-Received: by 2002:a17:902:e842:b0:1b8:63c6:84ab with SMTP id t2-20020a170902e84200b001b863c684abmr9273364plg.61.1692739854952; Tue, 22 Aug 2023 14:30:54 -0700 (PDT) Received: from tictac2.mtv.corp.google.com ([2620:15c:9d:2:83f0:2bc5:38c4:a9de]) by smtp.gmail.com with ESMTPSA id t7-20020a170902e84700b001befac3b3cbsm9451475plg.290.2023.08.22.14.30.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Aug 2023 14:30:54 -0700 (PDT) From: Douglas Anderson To: Mark Rutland , Catalin Marinas , Will Deacon , Sumit Garg , Daniel Thompson , Marc Zyngier Cc: Lecopzer Chen , linux-arm-kernel@lists.infradead.org, linux-perf-users@vger.kernel.org, Peter Zijlstra , kgdb-bugreport@lists.sourceforge.net, ito-yuichi@fujitsu.com, Stephen Boyd , Thomas Gleixner , Chen-Yu Tsai , Ard Biesheuvel , "Rafael J . Wysocki" , Masayoshi Mizuma , Douglas Anderson , D Scott Phillips , Ingo Molnar , Josh Poimboeuf , Valentin Schneider , linux-kernel@vger.kernel.org Subject: [PATCH v10 5/6] arm64: smp: IPI_CPU_STOP and IPI_CPU_CRASH_STOP should try for NMI Date: Tue, 22 Aug 2023 14:27:00 -0700 Message-ID: <20230822142644.v10.5.Ifadbfd45b22c52edcb499034dd4783d096343260@changeid> X-Mailer: git-send-email 2.42.0.rc1.204.g551eb34607-goog In-Reply-To: <20230822212927.249645-1-dianders@chromium.org> References: <20230822212927.249645-1-dianders@chromium.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230822_143055_495736_CA231C26 X-CRM114-Status: GOOD ( 12.39 ) 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 Signed-off-by: Douglas Anderson Reviewed-by: Stephen Boyd --- I don't actually have any good way to test/validate this patch. It's added to the series at Mark's request. 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 15b66dc1391b..c51d54019f5f 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: