Skip to content

Commit d4ff983

Browse files
committed
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 <[email protected]>
1 parent 4f22ca7 commit d4ff983

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

arch/xtensa/include/asm/pgtable.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,9 @@ static inline pte_t pte_mkyoung(pte_t pte)
280280
static inline pte_t pte_mkwrite(pte_t pte)
281281
{ pte_val(pte) |= _PAGE_WRITABLE; return pte; }
282282

283-
#define pgprot_noncached(prot) (__pgprot(pgprot_val(prot) & ~_PAGE_CA_MASK))
283+
#define pgprot_noncached(prot) \
284+
((__pgprot((pgprot_val(prot) & ~_PAGE_CA_MASK) | \
285+
_PAGE_CA_BYPASS)))
284286

285287
/*
286288
* Conversion functions: convert a page and protection to a page entry,

0 commit comments

Comments
 (0)