diff options
author | Jeremy Linton <jeremy.linton@arm.com> | 2015-10-07 12:00:21 -0500 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2015-10-08 18:39:19 +0100 |
commit | 93ef666a094ff9c9fc8d7cf1774ef0b92e270a75 (patch) | |
tree | 17d5e2155735604e4fa6f686dff02dea31541e76 | |
parent | ecf35a237a85d747ef1d6f713888c782f42064ac (diff) | |
download | talos-obmc-linux-93ef666a094ff9c9fc8d7cf1774ef0b92e270a75.tar.gz talos-obmc-linux-93ef666a094ff9c9fc8d7cf1774ef0b92e270a75.zip |
arm64: Macros to check/set/unset the contiguous bit
Add the supporting macros to check if the contiguous bit
is set, set the bit, or clear it in a PTE entry.
Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
-rw-r--r-- | arch/arm64/include/asm/pgtable.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h index 5043a84e724e..1a1a6efa75e5 100644 --- a/arch/arm64/include/asm/pgtable.h +++ b/arch/arm64/include/asm/pgtable.h @@ -140,6 +140,7 @@ extern struct page *empty_zero_page; #define pte_special(pte) (!!(pte_val(pte) & PTE_SPECIAL)) #define pte_write(pte) (!!(pte_val(pte) & PTE_WRITE)) #define pte_exec(pte) (!(pte_val(pte) & PTE_UXN)) +#define pte_cont(pte) (!!(pte_val(pte) & PTE_CONT)) #ifdef CONFIG_ARM64_HW_AFDBM #define pte_hw_dirty(pte) (pte_write(pte) && !(pte_val(pte) & PTE_RDONLY)) @@ -202,6 +203,16 @@ static inline pte_t pte_mkspecial(pte_t pte) return set_pte_bit(pte, __pgprot(PTE_SPECIAL)); } +static inline pte_t pte_mkcont(pte_t pte) +{ + return set_pte_bit(pte, __pgprot(PTE_CONT)); +} + +static inline pte_t pte_mknoncont(pte_t pte) +{ + return clear_pte_bit(pte, __pgprot(PTE_CONT)); +} + static inline void set_pte(pte_t *ptep, pte_t pte) { *ptep = pte; |