63366ee221e3d5c26959bcd7624ba3274f005c67
[openwrt/staging/nbd.git] /
1 From d59be41c014e2e17ea0aaa37d42f36548ad063b5 Mon Sep 17 00:00:00 2001
2 From: Haiying Wang <Haiying.wang@freescale.com>
3 Date: Sat, 8 Aug 2015 07:25:02 -0400
4 Subject: [PATCH] arm64/pgtable: add support to map cacheable and non shareable
5 memory
6
7 Signed-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 @@ -425,6 +425,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 /*