From patchwork Wed Aug 30 19:11:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 13370706 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 9409DC83F15 for ; Wed, 30 Aug 2023 19:14:32 +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=eQB1X46+itgPYjPjCorNaLDORWYeRCHTCr5wVbq3Iog=; b=SwSplYVsemvgg+ aL+7+TaFiA9Yj1VfAK9fcXOnXzmoHHUprbQi0ukNdRwCmqAC9F+wf19rs5TEEDS6VQTLAvDsNH8sR eg1Rpak3Sl5UuLLNA4pYlXaUOn+XSAF7PwR9OnodIKb3Lh2fi5X7cgzjeDIr4S8tvo1oV3qbsYOkc UITieueL+2hgwq/oSJ2Vh/n0Nhv5y8/BbNPPcDeDPrzoXJEP1ctDsWfYJP5oiIa7DZHoFFy5Gt4Iu gzN1zl3IDE2xTgzEqx8IvWs8cBlhxs31N9rQ8mTgASWFTIHUZ267pKMise5vkpzTZhgt5v94lrnDO JGjNPMTgsclab6Gz7auQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qbQde-00E3Ea-2Y; Wed, 30 Aug 2023 19:14:02 +0000 Received: from mail-pf1-x42d.google.com ([2607:f8b0:4864:20::42d]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qbQdU-00E38Q-0P for linux-arm-kernel@lists.infradead.org; Wed, 30 Aug 2023 19:13:55 +0000 Received: by mail-pf1-x42d.google.com with SMTP id d2e1a72fcca58-68a529e1974so919b3a.3 for ; Wed, 30 Aug 2023 12:13:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1693422827; x=1694027627; 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=qbk9s2ed2Gi+5NJ1qOCnDItkdATQhrhodWS8k0Aq0HQ=; b=Ri+sg6ogfPhPr7hLpUg7Ld36c3clCZ/SLla3lr+jq5C8llUOrG1NrBipjugRXfi1h0 S56ObQ3ZlJu8QJ5c/6ut5utHDtnsb91OmSBb59EkaqYlIexnRT9e1oUhlgBNPXzmI3cT clHjw02SJofUF7Q5tA0efgn3ehSZBce20izag= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693422827; x=1694027627; 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=qbk9s2ed2Gi+5NJ1qOCnDItkdATQhrhodWS8k0Aq0HQ=; b=A9x9QUIT/peCQHVZCihLRK8W2kY/BDugxna9jJwIuXFIGFpirt7B+owu1bHf5pcP/G kFCkEdPphnH25YbgZlqJkAZ/MNLtWF+oQlEHjRRNl+/jQgAlK55ycNMWuIsMDJu1+2dG KtNsfPMo+uk7U13MgloJMVLsJs14weIUFzllUwLrroTMlWOww7Ou5xAaHlaBjw0YgJG+ g3kIcX5l7PAFh4XPRqDkRVXIgGtA/m5UDh+hO1hcAIMWIMphA2Map4jZipYM/JMu6cbb 0IC9M0yds3FJF5FmJ84RiMWKMzFNYe7mQ4oViNqNRXc/33qRmVTAbXXTZBqwdJxna5za +/rQ== X-Gm-Message-State: AOJu0YzUZ+pH01USVpK0094kFnOI4T8S7inmjTU4miO1C61fSZ6wXLrJ bRYIwNbED5oM9IEKwBHJFANZmA== X-Google-Smtp-Source: AGHT+IHxDYoiWwRcFzk/j68VpzJh4FWcDcrG2boIQK6MYRCAWrovwACH3eHvWMJCrnBJyQGiUD8tUw== X-Received: by 2002:a05:6a20:7f9b:b0:14c:40d1:e911 with SMTP id d27-20020a056a207f9b00b0014c40d1e911mr3916569pzj.42.1693422827426; Wed, 30 Aug 2023 12:13:47 -0700 (PDT) Received: from tictac2.mtv.corp.google.com ([2620:15c:9d:2:e315:dec6:467c:83c5]) by smtp.gmail.com with ESMTPSA id c15-20020a170902d48f00b001bbdf32f011sm11338928plg.269.2023.08.30.12.13.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Aug 2023 12:13:46 -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, 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 , Douglas Anderson , D Scott Phillips , Josh Poimboeuf , Valentin Schneider , linux-kernel@vger.kernel.org Subject: [PATCH v12 5/7] arm64: smp: IPI_CPU_STOP and IPI_CPU_CRASH_STOP should try for NMI Date: Wed, 30 Aug 2023 12:11:26 -0700 Message-ID: <20230830121115.v12.5.Ifadbfd45b22c52edcb499034dd4783d096343260@changeid> X-Mailer: git-send-email 2.42.0.283.g2d96d420d3-goog In-Reply-To: <20230830191314.1618136-1-dianders@chromium.org> References: <20230830191314.1618136-1-dianders@chromium.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230830_121352_221222_68079CDC X-CRM114-Status: GOOD ( 11.99 ) 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 Signed-off-by: Douglas Anderson Acked-by: Mark Rutland Tested-by: Mark Rutland --- 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 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: