summaryrefslogtreecommitdiff
path: root/arch/arm/include/asm/pgtable-2level.h
diff options
context:
space:
mode:
authorWill Deacon <will.deacon@arm.com>2012-07-19 11:51:05 +0100
committerWill Deacon <will.deacon@arm.com>2012-11-09 14:13:19 +0000
commitdbf62d50067e55a782583fe53c3d2a3d98b1f6f3 (patch)
tree1bca43e9824e79d97bc32445182fe91a6600e035 /arch/arm/include/asm/pgtable-2level.h
parent0cbbbad63179652272cc5e18a68d69bfc8dd25ce (diff)
ARM: mm: introduce L_PTE_VALID for page table entries
For long-descriptor translation table formats, the ARMv7 architecture defines the last two bits of the second- and third-level descriptors to be: x0b - Invalid 01b - Block (second-level), Reserved (third-level) 11b - Table (second-level), Page (third-level) This allows us to define L_PTE_PRESENT as (3 << 0) and use this value to create ptes directly. However, when determining whether a given pte value is present in the low-level page table accessors, we only need to check the least significant bit of the descriptor, allowing us to write faulting, present entries which are required for PROT_NONE mappings. This patch introduces L_PTE_VALID, which can be used to test whether a pte should fault, and updates the low-level page table accessors accordingly. Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'arch/arm/include/asm/pgtable-2level.h')
-rw-r--r--arch/arm/include/asm/pgtable-2level.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/arm/include/asm/pgtable-2level.h b/arch/arm/include/asm/pgtable-2level.h
index 2317a71c8f8e..c44a1ecfc28a 100644
--- a/arch/arm/include/asm/pgtable-2level.h
+++ b/arch/arm/include/asm/pgtable-2level.h
@@ -115,6 +115,7 @@
* The PTE table pointer refers to the hardware entries; the "Linux"
* entries are stored 1024 bytes below.
*/
+#define L_PTE_VALID (_AT(pteval_t, 1) << 0) /* Valid */
#define L_PTE_PRESENT (_AT(pteval_t, 1) << 0)
#define L_PTE_YOUNG (_AT(pteval_t, 1) << 1)
#define L_PTE_FILE (_AT(pteval_t, 1) << 2) /* only when !PRESENT */