Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 288AB606A31C for ; Mon, 30 Nov 2026 17:43:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=zlVK5GBP; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=foss header.b=EkUPDqgc DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Unsubscribe-Post: List-Owner; bh=e0N5e+4TzGm3TiKZLmGdAnkF+W+LyfZP4LJQrrPE5J4=; b=zlVK5GBPdrhg1s 0jjAwbdKaX5XQ00jkYbJl6ijII0U5ib9fhxgfZPs1FfSxrF4usd2yZZpjw4VVWoSr1nPumXL8bHYR /9cUo5B8G/TZ6s3PouJDMht2+vY0csHzCDkyQYzVW9xm0qP+hYX+0WANNDH9VRZW4tITbLbgpkPK+ 7nNkhFjxOcWMK6Lac/gNP52g9ek+opCtf0z+SYXusgbOtrEr7HtuLa2y3+mq5Hx3RlY4oQRFlLVhf 28dN9UkN9VDu/ATLv2BJrU4jPrCQM3JMOAmT5IQyTzRpVFEKgdqyk6Q9KkVvEQBRixiQmuINbr5LM MzjCq8mudUlf2RcJ+z2g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xY3kp-0000000573q-1fQg; Mon, 30 Nov 2026 15:57:23 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xY3jk-000000056Qw-0EYG for linux-arm-kernel@lists.infradead.org; Mon, 30 Nov 2026 15:56:17 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 9BE07169C; Mon, 30 Nov 2026 07:56:12 -0800 (PST) Received: from login2.euhpc2.arm.com (login2.euhpc2.arm.com [10.58.100.22]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id ED38D3F86F; Mon, 30 Nov 2026 07:56:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arm.com; s=foss; t=1796054175; bh=70tsAPMkqW1vkKq5VgkmhXRBIU974CVsIhAkRCl1O7s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EkUPDqgcnMjazXVAqbqLwLSBgETaf+jEFGrJmkttL9YcsAmr889E0L8xePLhgG7xW y/ggSEUo77CbeKUyz/qLVubQM7Wv1hxTIJ0I760USFJ7nb77ebHERmYxQqfbLHHyJf SCwhizaSWz7sB9JmhNb2Q/JfEArZEzUx5BuWUT8U= From: Vladimir Murzin To: linux-arm-kernel@lists.infradead.org Cc: catalin.marinas@arm.com, will@kernel.org, mark.rutland@arm.com, lpieralisi@kernel.org, ruanjinjie@huawei.com, liaochang1@huawei.com, ashok.raj@oss.qualcomm.com, maz@kernel.org, kas@kernel.org Subject: [PATCH v3 17/44] arm64: gicv3: remove GIC_PRIO_PSR_I_SET Date: Mon, 30 Nov 2026 15:54:39 +0000 Message-Id: <20261130155506.118408-18-vladimir.murzin@arm.com> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20261130155506.118408-1-vladimir.murzin@arm.com> References: <20261130155506.118408-1-vladimir.murzin@arm.com> X-Archived-By: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261130_075616_653882_72232060 X-CRM114-Status: GOOD ( 12.63 ) X-Spam-Score: -4.4 (----) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" X-Spam-Status: No, score=-18.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 From: Ada Couprie Diaz `GIC_PRIO_PSR_I_SET` was used to keep track of sections of the kernel where interrupts always need to reach the CPU and could not be masked via interrupt priorities, or DAIF bypassed the status of the PMR. This flag unmasked IRQs when OR'd to GIC_PRIO_IRQON and ensured that that IRQs were seen as disabled by the `local_irqs_...` functions, as they would only check the PMR if pseudo-NMIs were enabled. This is not needed anymore as our IRQ masking APIs now know how to handle interrupt priorities properly and in parallel with DAIF : remove it. Signed-off-by: Ada Couprie Diaz Signed-off-by: Vladimir Murzin Reviewed-by: Jinjie Ruan Tested-by: Jinjie Ruan --- arch/arm64/include/asm/ptrace.h | 2 -- include/linux/irqchip/arm-gic-v3-prio.h | 8 -------- 2 files changed, 10 deletions(-) diff --git a/arch/arm64/include/asm/ptrace.h b/arch/arm64/include/asm/ptrace.h index 7d7b54308b90..a64eb588a781 100644 --- a/arch/arm64/include/asm/ptrace.h +++ b/arch/arm64/include/asm/ptrace.h @@ -24,8 +24,6 @@ #define GIC_PRIO_IRQON GICV3_PRIO_UNMASKED #define GIC_PRIO_IRQOFF GICV3_PRIO_IRQ -#define GIC_PRIO_PSR_I_SET GICV3_PRIO_PSR_I_SET - #if ARM64_S390_COMMON == 1 /* Additional SPSR bits not exposed in the UABI */ diff --git a/include/linux/irqchip/arm-gic-v3-prio.h b/include/linux/irqchip/arm-gic-v3-prio.h index 44157c9abb78..464bf1d29453 100644 --- a/include/linux/irqchip/arm-gic-v3-prio.h +++ b/include/linux/irqchip/arm-gic-v3-prio.h @@ -20,17 +20,11 @@ * GICV3_PRIO_NMI is the PMR view of the priority of pseudo-NMIs. This can be * written to the PMR to mask pseudo-NMIs. * - * On arm64 some code sections either automatically switch back to PSR.I or - * explicitly require to not use priority masking. If bit GICV3_PRIO_PSR_I_SET - * is included in the priority mask, it indicates that PSR.I should be set and - * interrupt disabling temporarily does not rely on IRQ priorities. */ #define GICV3_PRIO_UNMASKED 0xe0 #define GICV3_PRIO_IRQ 0xc0 #define GICV3_PRIO_NMI 0x80 -#define GICV3_PRIO_PSR_I_SET (1 << 4) - #ifndef __ASSEMBLER__ #define __gicv3_prio_to_ns(p) (0xff & ((p) << 1)) @@ -45,8 +39,6 @@ static_assert(__gicv3_prio_valid_ns(GICV3_PRIO_IRQ)); static_assert(GICV3_PRIO_NMI < GICV3_PRIO_IRQ); static_assert(GICV3_PRIO_IRQ < GICV3_PRIO_UNMASKED); -static_assert(GICV3_PRIO_IRQ < (GICV3_PRIO_IRQ | GICV3_PRIO_PSR_I_SET)); - #endif /* __ASSEMBLER */ #endif /* __LINUX_IRQCHIP_ARM_GIC_V3_PRIO_H */ -- 2.34.1