blob: bd39eb7e144ee300f7aa5e37c57d955e8b663d5e [file] [log] [blame]
b.liue9582032025-04-17 19:18:16 +08001From d59be41c014e2e17ea0aaa37d42f36548ad063b5 Mon Sep 17 00:00:00 2001
2From: Haiying Wang <Haiying.wang@freescale.com>
3Date: Sat, 8 Aug 2015 07:25:02 -0400
4Subject: [PATCH] arm64/pgtable: add support to map cacheable and non shareable
5 memory
6
7Signed-off-by: Haiying Wang <Haiying.wang@freescale.com>
8---
9 arch/arm64/include/asm/pgtable.h | 2 ++
10 1 file changed, 2 insertions(+)
11
12--- a/arch/arm64/include/asm/pgtable.h
13+++ b/arch/arm64/include/asm/pgtable.h
14@@ -431,6 +431,8 @@ static inline pmd_t pmd_mkdevmap(pmd_t p
15 #define pgprot_cached(prot) \
16 __pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_NORMAL) | \
17 PTE_PXN | PTE_UXN)
18+#define pgprot_cached_ns(prot) \
19+ __pgprot(pgprot_val(pgprot_cached(prot)) ^ PTE_SHARED)
20 #define pgprot_device(prot) \
21 __pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_DEVICE_nGnRE) | PTE_PXN | PTE_UXN)
22 /*