Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp1129766pxb; Wed, 4 Nov 2020 00:19:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJwJDuw4TFZwDfaNks+Y6TauJRoL50o7C0oZyyq+AY0ve4BHFbB/819rL9notD814LIx4nUy X-Received: by 2002:a05:6402:143:: with SMTP id s3mr24794981edu.267.1604477990720; Wed, 04 Nov 2020 00:19:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604477990; cv=none; d=google.com; s=arc-20160816; b=PsC0XBp5mahYNPLlmYPlLXd+k0MBq509x/NqGT5OhSBTFERNy5FKD4okG1/XndwcM6 NRfpNMxCTwx4c31mV3wLO324CSqRsrC6mY7Gr3SD2qf407GYvZshmq6WDHGGu2CS+qdL UIWXR6aorQEksaHynhzKfb+Ix+zq9fMKNt+CwRQG0ryZ37r/4ijaW2iIRoZEtb5t2rQW dFFw172NNAHa4i9AdcG2ARVXlcrmlRBNbw0PRW16b9xb6Nr4DV1oQjsX5MNt9zURdCp7 9sJsVBB/+mEzUlz2VJi05NzseyLK2S+aV5LagPxZEnkTviWV6oqInrsKDpOWhfT0u8wK BSFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :ironport-sdr; bh=+vclKF3so6Vju2q5zBjteFly4s76fzMs1A4QZGAxMhM=; b=ItY/4TCNcmZEdqyKSbY/FFoMFpG3SzsB0r0FcEAlApaIX0j5+rBptihTHkmEQudL5X T8s7WsiI6AuzjglMeQyb8SOBCVCsrUIkoj07lsC//9WPfgRRfC7lOcQrRstVLCAEEZgY vXHDQzQwTxWUeH7NIKLE5BSYaZ8eRMoBlEzNU7l4dmnbfPO/kvisAOudsgzAwuoC0cnF r8a3v+XFnBOhrt+Io5negKVCkMKUDnvbURLSOx00A8pAoTtpPv5RwJV7QiszpqAJAuKx 2+HzI2rsvy588au9v3e8VdWRiiI8pfmUSHO3JsEDjgUUarDyJOLF4N4t8/0uJvEUYn9y TrLg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p18si1000413eja.627.2020.11.04.00.19.27; Wed, 04 Nov 2020 00:19:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728564AbgKDIRy (ORCPT + 99 others); Wed, 4 Nov 2020 03:17:54 -0500 Received: from esa1.hc1455-7.c3s2.iphmx.com ([207.54.90.47]:64471 "EHLO esa1.hc1455-7.c3s2.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725812AbgKDIRw (ORCPT ); Wed, 4 Nov 2020 03:17:52 -0500 X-Greylist: delayed 427 seconds by postgrey-1.27 at vger.kernel.org; Wed, 04 Nov 2020 03:17:52 EST IronPort-SDR: VK6qtypJl4kOt9mmetILz4DvPTk28+dhVSBdnXcwOsVwGqsWJoKTKccfTF1mtgtINWzo5uQbLP o9U5skKvXVuuq69L2Et7YtdnNGWxEvlOKYDvCt5P0pRRZ8Rt2gQ6PxAEwgnu8IohguRJBg6um9 K41Agz1LWckxrzvwYA0rC9aiWzfRKLi7kYx2UrbslKHpGRVpBeG8y2CHvw972Ae7jZs8hhQBwh TMFFX7fcO5DquFunW2JzEw5IPgUA8kukkc24zUkFVHEV6HrinDTZ8FAhFxpXZtyY78Lm5+4WcD ZQ0= X-IronPort-AV: E=McAfee;i="6000,8403,9794"; a="2258702" X-IronPort-AV: E=Sophos;i="5.77,450,1596466800"; d="scan'208";a="2258702" Received: from unknown (HELO yto-r2.gw.nic.fujitsu.com) ([218.44.52.218]) by esa1.hc1455-7.c3s2.iphmx.com with ESMTP; 04 Nov 2020 17:10:44 +0900 Received: from yt-mxoi1.gw.nic.fujitsu.com (unknown [192.168.83.48]) by yto-r2.gw.nic.fujitsu.com (Postfix) with ESMTP id A8363A80C0 for ; Wed, 4 Nov 2020 17:10:42 +0900 (JST) Received: from pumpkin.openstacklocal (pumpkin.fct.css.fujitsu.com [10.130.70.189]) by yt-mxoi1.gw.nic.fujitsu.com (Postfix) with ESMTP id A248FAC0144 for ; Wed, 4 Nov 2020 17:10:41 +0900 (JST) Received: by pumpkin.openstacklocal (Postfix, from userid 1016) id 46F05B9A9; Wed, 4 Nov 2020 17:08:03 +0900 (JST) From: Yuichi Ito To: maz@kernel.org, sumit.garg@linaro.org, tglx@linutronix.de, jason@lakedaemon.net, catalin.marinas@arm.com, will@kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Yuichi Ito Subject: [PATCH v2 3/3] arm64: smp: Disable priority masking when NMI is enable on PSR.I section Date: Wed, 4 Nov 2020 17:05:39 +0900 Message-Id: <20201104080539.3205889-4-ito-yuichi@fujitsu.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201104080539.3205889-1-ito-yuichi@fujitsu.com> References: <20201104080539.3205889-1-ito-yuichi@fujitsu.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org It should be prohibitted to use priority masking in NMI context. Using local_irq_disable() under the above conditions causes a WARNING. Then, there will be also a mismatch between the PSR.I values and PMR GIC_PRIO_PSR_I_SET. Signed-off-by: Yuichi Ito --- arch/arm64/kernel/smp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c index fd59bc7..3c49f06 100644 --- a/arch/arm64/kernel/smp.c +++ b/arch/arm64/kernel/smp.c @@ -872,7 +872,9 @@ static void ipi_cpu_crash_stop(unsigned int cpu, struct pt_regs *regs) atomic_dec(&waiting_for_crash_ipi); - local_irq_disable(); + if(!in_nmi()) + local_irq_disable(); + sdei_mask_local_cpu(); if (IS_ENABLED(CONFIG_HOTPLUG_CPU)) -- 1.8.3.1