diff options
author | Max Filippov | 2021-02-17 01:36:57 -0800 |
---|---|---|
committer | Max Filippov | 2021-04-04 15:39:03 -0700 |
commit | d4ff983e323870478f04054c1ba817b481eb1f19 (patch) | |
tree | 0d182e56d8e09c0c6fb13b5c5b133c03f31e8087 /arch/xtensa | |
parent | 4f22ca7e192ee313a83f8093ba5b5b2ca72d10e4 (diff) |
xtensa: fix pgprot_noncached assumptions
pgprot_noncached assumes that cache bypass attribute is represented as
zero. This may not always be true. Fix pgprot_noncached definition by
adding _PAGE_CA_BYPASS to the result.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Diffstat (limited to 'arch/xtensa')
-rw-r--r-- | arch/xtensa/include/asm/pgtable.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/xtensa/include/asm/pgtable.h b/arch/xtensa/include/asm/pgtable.h index 4dc04e6c01d7..d7fc45c920c2 100644 --- a/arch/xtensa/include/asm/pgtable.h +++ b/arch/xtensa/include/asm/pgtable.h @@ -280,7 +280,9 @@ static inline pte_t pte_mkyoung(pte_t pte) static inline pte_t pte_mkwrite(pte_t pte) { pte_val(pte) |= _PAGE_WRITABLE; return pte; } -#define pgprot_noncached(prot) (__pgprot(pgprot_val(prot) & ~_PAGE_CA_MASK)) +#define pgprot_noncached(prot) \ + ((__pgprot((pgprot_val(prot) & ~_PAGE_CA_MASK) | \ + _PAGE_CA_BYPASS))) /* * Conversion functions: convert a page and protection to a page entry, |