From patchwork Thu Aug 24 15:30:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 13364384 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 161C8C27C40 for ; Thu, 24 Aug 2023 15:34:01 +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=6ThHziErb1TppdqzpbAY8pgOD5snKnMO3jC06ixV478=; b=bRvLpHQiEd42jz E6XH70Nu7nMc93qJlEyxaBLVpwQKD+QIpQkBZZ0pMjtbVpPTf9r/N6tLZKbyVp9usRxxGV7eVkuC6 F+aW2vyS8xfrU+V2lztRHtv+fJNx2oMdBdWUDQUw0PJp2AkACqCCJ45hi1WYsPjwXsLYt9HYpAEYv 2HbHnw/sd5ay5LY12kyQ5XXq42obzl/15IxjxBqTuIuGW7fBLaEbBN3NwrKYqeKn7L8e9CTVWt92B Wv7psxfeDkyJa6qYmfl1zL1gGdwm0smGfWJwoETooxOuA413DB72zynUUtPkobTZ/R/4i67IA27Z4 xJaD8dFWrdWIBF2eUNTA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qZCKn-003NN3-17; Thu, 24 Aug 2023 15:33:21 +0000 Received: from mail-pf1-x42f.google.com ([2607:f8b0:4864:20::42f]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qZCKe-003NJo-0y for linux-arm-kernel@lists.infradead.org; Thu, 24 Aug 2023 15:33:13 +0000 Received: by mail-pf1-x42f.google.com with SMTP id d2e1a72fcca58-68a402c1fcdso3409091b3a.1 for ; Thu, 24 Aug 2023 08:33:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1692891190; x=1693495990; 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=+U+ZFko4eaNVS/k5E5YRzxI9X7/KmekX/8rZmWNkCMw=; b=cS5jIetqAgvoNwttMKW4WTIdVltP+nOpZ6stPUmuzAoBmw/eX/rT/dZLOJ/PnUdndx 3mg0vSOMLBUhFA54TJJKRCLbXxOTgJJLu2+gL3A90a8w+BPukvfIq7bN6HtW0VmGnhFw 6NSUkj9cgyvYTfuGsfZ/V/hb/l98o3t6zQmQI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692891190; x=1693495990; 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=+U+ZFko4eaNVS/k5E5YRzxI9X7/KmekX/8rZmWNkCMw=; b=Sp/ezyB1pAp3S5CsMK4arQ0x9HWSUC9tA6JrkGaJ+Lks4wqWYcRfOwG4mHTmMBgAXU XpuJcLZsj8a89hBP4p/FvCOlZ5g9qsIlN0jJ6utVPgBD+RsKcJfDCKUQcZ21vLRXK/Bg 21pApTrv17W2d0rqidjV4kpv03zcdOxkudITJnauUjWiqqiA6IubUbwMflSAckx1KFOS B6YTBmmwbp00fN82sLXED4dFP+alJknJZOIUV5BEaXcWj4SuWRDovV9S5G7ePwfnq4pG p4u5VQKKiXVbOJcj57ZCI5jicbNa6eSA2u4EKkR6PFhuDXrmAfX6tHHl/EGNWZXgxxwC u48Q== X-Gm-Message-State: AOJu0YzKe6faGt0NLOUf5BlLWaz5MxfEgTKa/gmvFoCV0xg9a9cfakvx KSDlb2XyX2d3Vov8Zs/ra1S46A== X-Google-Smtp-Source: AGHT+IHaSpjbeAQ9UzHqXXC2nf4Z9xB3fbVm9xxQZ6RsAAdQhINpMo2utUL4uLzKK7MxM211qE78FA== X-Received: by 2002:a05:6a00:124b:b0:68a:582b:44c4 with SMTP id u11-20020a056a00124b00b0068a582b44c4mr9603241pfi.3.1692891190414; Thu, 24 Aug 2023 08:33:10 -0700 (PDT) Received: from tictac2.mtv.corp.google.com ([2620:15c:9d:2:afa3:fcf5:1b7f:f7e2]) by smtp.gmail.com with ESMTPSA id m30-20020a63711e000000b0056365ee8603sm11631337pgc.67.2023.08.24.08.33.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Aug 2023 08:33:09 -0700 (PDT) From: Douglas Anderson To: Mark Rutland , Catalin Marinas , Will Deacon , Sumit Garg , Daniel Thompson , Marc Zyngier Cc: "Rafael J . Wysocki" , Ard Biesheuvel , Thomas Gleixner , kgdb-bugreport@lists.sourceforge.net, Lecopzer Chen , linux-perf-users@vger.kernel.org, Masayoshi Mizuma , Chen-Yu Tsai , linux-arm-kernel@lists.infradead.org, ito-yuichi@fujitsu.com, Stephen Boyd , Peter Zijlstra , Douglas Anderson , D Scott Phillips , Ingo Molnar , Josh Poimboeuf , Valentin Schneider , linux-kernel@vger.kernel.org Subject: [PATCH v11 5/6] arm64: smp: IPI_CPU_STOP and IPI_CPU_CRASH_STOP should try for NMI Date: Thu, 24 Aug 2023 08:30:31 -0700 Message-ID: <20230824083012.v11.5.Ifadbfd45b22c52edcb499034dd4783d096343260@changeid> X-Mailer: git-send-email 2.42.0.rc1.204.g551eb34607-goog In-Reply-To: <20230824153233.1006420-1-dianders@chromium.org> References: <20230824153233.1006420-1-dianders@chromium.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230824_083312_374774_4E2E0B3E X-CRM114-Status: GOOD ( 12.52 ) 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 Signed-off-by: Douglas Anderson Reviewed-by: Sumit Garg --- I don't actually have any good way to test/validate this patch. It's added to the series at Mark's request. (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 c8896cbc5327..4566934aaf9f 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: