Message ID | 1542023835-21446-12-git-send-email-julien.thierry@arm.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 55FBB14E2 for <patchwork-linux-arm@patchwork.kernel.org>; Mon, 12 Nov 2018 12:00:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3FA9A29D5B for <patchwork-linux-arm@patchwork.kernel.org>; Mon, 12 Nov 2018 12:00:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 309D629E9B; Mon, 12 Nov 2018 12:00:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A66F129D5B for <patchwork-linux-arm@patchwork.kernel.org>; Mon, 12 Nov 2018 12:00:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=V9ZeB+vR40voDjJg/cO4adh0W6KJ1/XQV40v4VMeGj0=; b=GAggK7XaoxyPrJuJsquYUGuRss XEHOZ7QvjT9un0RWyfm+lWat6kOdJJvepT2aYzIU2BFj7r8vOxWedePTAFCItpl0/LJe+c5tG+0+i CyPoXeKzSxSVY0Kf5Di23ToM0y7OwNOtgB5iag1y8gg4pNq9yA0rPsdE2Vkh9usU0IzrOrUqdzv8A yX/OBLZsxKCg7NIfxMGFya0K7X6LKSzFSwAsizu+rl1OOr24TvbH0UeUiWLwcGX68+iUt5IsLha+b FfIVFt2+cS7FemPtFrA4SNl3fJGYxiM8mBg3lt+MOZDxR1YXjZclJIaMnjNcLX34eFWu6vnrYwj6Z GgAUR22w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gMAtc-0008Gp-5A; Mon, 12 Nov 2018 12:00:48 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gMAqo-0004Me-GQ for linux-arm-kernel@bombadil.infradead.org; Mon, 12 Nov 2018 11:57:54 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=3a7yybkfFw/gM17opdoGb472xuxbdSWusXHWU9BdW64=; b=UUzpp9j7QLCih0nCDu/TUz93F T/XTny2Z/FxCy65A1tK+V3F6zHD06CaEfmXOkAsqBIk11WB2HfFk97yGmJk2+xcrO4aRdbJFiEQWV 2daL/WP0AogBCo8ieNoIoDAaWgcRSfXzPNcnbZIQX529VOf1MGV9L61Fn2Ovpk9VJx5295zzvWsem LbHLLi7U7CIiqnTA1YOXP5rpyaCy03NnRGZW3+trVQ45aaQpZw1iLN4ZMAQ5yb14qvGxsfeUL3z85 3U674IQKgFIlsf1aXtYSbsfSqLtt7pXO0wn1Jp/tsbJOC/cKzcGIzqckut9gmMSktkoZQmUFKt/gJ A3SWq0zvA==; Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70] helo=foss.arm.com) by merlin.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gMAql-0008TC-ON for linux-arm-kernel@lists.infradead.org; Mon, 12 Nov 2018 11:57:52 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 745BA15BF; Mon, 12 Nov 2018 03:57:51 -0800 (PST) Received: from e112298-lin.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 9F8573F5A0; Mon, 12 Nov 2018 03:57:49 -0800 (PST) From: Julien Thierry <julien.thierry@arm.com> To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v6 11/24] arm64: daifflags: Include PMR in daifflags restore operations Date: Mon, 12 Nov 2018 11:57:02 +0000 Message-Id: <1542023835-21446-12-git-send-email-julien.thierry@arm.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1542023835-21446-1-git-send-email-julien.thierry@arm.com> References: <1542023835-21446-1-git-send-email-julien.thierry@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181112_065751_892542_3F1A3725 X-CRM114-Status: GOOD ( 13.49 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Cc: daniel.thompson@linaro.org, Julien Thierry <julien.thierry@arm.com>, marc.zyngier@arm.com, catalin.marinas@arm.com, will.deacon@arm.com, linux-kernel@vger.kernel.org, christoffer.dall@arm.com, james.morse@arm.com, joel@joelfernandes.org MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP |
Series |
arm64: provide pseudo NMI with GICv3
|
expand
|
diff --git a/arch/arm64/include/asm/daifflags.h b/arch/arm64/include/asm/daifflags.h index 546bc39..31936b3 100644 --- a/arch/arm64/include/asm/daifflags.h +++ b/arch/arm64/include/asm/daifflags.h @@ -18,8 +18,14 @@ #include <linux/irqflags.h> -#define DAIF_PROCCTX 0 -#define DAIF_PROCCTX_NOIRQ PSR_I_BIT +#include <asm/cpufeature.h> + +#define DAIF_PROCCTX MAKE_ARCH_FLAGS(0, GIC_PRIO_IRQON) + +#define DAIF_PROCCTX_NOIRQ \ + (system_supports_irq_prio_masking() ? \ + MAKE_ARCH_FLAGS(0, GIC_PRIO_IRQOFF) : \ + MAKE_ARCH_FLAGS(PSR_I_BIT, GIC_PRIO_IRQON)) /* mask/save/unmask/restore all exceptions, including interrupts. */ static inline void local_daif_mask(void)
The addition of PMR should not bypass the semantics of daifflags. When DA_F are set, I bit is also set as no interrupts (even of higher priority) is allowed. When DA_F are cleared, I bit is cleared and interrupt enabling/disabling goes through ICC_PMR_EL1. Signed-off-by: Julien Thierry <julien.thierry@arm.com> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Will Deacon <will.deacon@arm.com> Cc: James Morse <james.morse@arm.com> --- arch/arm64/include/asm/daifflags.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)