]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
arm64: add POIndex defines
authorJoey Gouly <joey.gouly@arm.com>
Thu, 22 Aug 2024 15:10:56 +0000 (16:10 +0100)
committerWill Deacon <will@kernel.org>
Wed, 4 Sep 2024 11:52:40 +0000 (12:52 +0100)
The 3-bit POIndex is stored in the PTE at bits 60..62.

Signed-off-by: Joey Gouly <joey.gouly@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Link: https://lore.kernel.org/r/20240822151113.1479789-14-joey.gouly@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/include/asm/pgtable-hwdef.h

index 1f60aa1bc750cb6485e9b407fbc9b78ee1f50d38..3f0c3f5c5cefcf426a91fde03d151998c00e13eb 100644 (file)
 #define PTE_PI_IDX_2   53      /* PXN */
 #define PTE_PI_IDX_3   54      /* UXN */
 
+/*
+ * POIndex[2:0] encoding (Permission Overlay Extension)
+ */
+#define PTE_PO_IDX_0   (_AT(pteval_t, 1) << 60)
+#define PTE_PO_IDX_1   (_AT(pteval_t, 1) << 61)
+#define PTE_PO_IDX_2   (_AT(pteval_t, 1) << 62)
+
+#define PTE_PO_IDX_MASK                GENMASK_ULL(62, 60)
+
+
 /*
  * Memory Attribute override for Stage-2 (MemAttr[3:0])
  */