diff options
author | Will Deacon <will.deacon@arm.com> | 2015-09-11 13:22:02 -0400 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2015-09-14 07:28:45 -0400 |
commit | bf950040a53da35522e38066d9eb6ab7a1c9d136 (patch) | |
tree | c525e4411e969a2c070de72337a96c17775870f6 | |
parent | 62d96c71d248834af2891293dc23cc344ae2ec36 (diff) |
arm64: pgtable: use a single bit for PTE_WRITE regardless of DBM
Depending on CONFIG_ARM64_HW_AFDBM, we use either bit 57 or 51 of the
pte to represent PTE_WRITE. Given that bit 51 is reserved prior to
ARMv8.1, we can just use that bit regardless of the config option. That
also matches what happens if a kernel configured with ARM64_HW_AFDBM=y
is run on a CPU without the DBM functionality.
Cc: Julien Grall <julien.grall@citrix.com>
Tested-by: Julien Grall <julien.grall@citrix.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
-rw-r--r-- | arch/arm64/include/asm/pgtable.h | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h index 31df98adf005..b0329be95cb1 100644 --- a/arch/arm64/include/asm/pgtable.h +++ b/arch/arm64/include/asm/pgtable.h | |||
@@ -26,13 +26,9 @@ | |||
26 | * Software defined PTE bits definition. | 26 | * Software defined PTE bits definition. |
27 | */ | 27 | */ |
28 | #define PTE_VALID (_AT(pteval_t, 1) << 0) | 28 | #define PTE_VALID (_AT(pteval_t, 1) << 0) |
29 | #define PTE_WRITE (PTE_DBM) /* same as DBM (51) */ | ||
29 | #define PTE_DIRTY (_AT(pteval_t, 1) << 55) | 30 | #define PTE_DIRTY (_AT(pteval_t, 1) << 55) |
30 | #define PTE_SPECIAL (_AT(pteval_t, 1) << 56) | 31 | #define PTE_SPECIAL (_AT(pteval_t, 1) << 56) |
31 | #ifdef CONFIG_ARM64_HW_AFDBM | ||
32 | #define PTE_WRITE (PTE_DBM) /* same as DBM */ | ||
33 | #else | ||
34 | #define PTE_WRITE (_AT(pteval_t, 1) << 57) | ||
35 | #endif | ||
36 | #define PTE_PROT_NONE (_AT(pteval_t, 1) << 58) /* only when !PTE_VALID */ | 32 | #define PTE_PROT_NONE (_AT(pteval_t, 1) << 58) /* only when !PTE_VALID */ |
37 | 33 | ||
38 | /* | 34 | /* |