aboutsummaryrefslogtreecommitdiffstats
path: root/arch/riscv/include/asm/pgtable.h
diff options
context:
space:
mode:
authorGuo Ren <guoren@linux.alibaba.com>2021-05-26 05:49:20 +0000
committerPalmer Dabbelt <palmerdabbelt@google.com>2021-05-29 18:17:23 -0700
commitcba43c31f14b08f193ebb5b4a72751b0947436c1 (patch)
tree256eb70e8cfe3a32bfee547b78d7897d67330e96 /arch/riscv/include/asm/pgtable.h
parentriscv: TRANSPARENT_HUGEPAGE: depends on MMU (diff)
downloadlinux-dev-cba43c31f14b08f193ebb5b4a72751b0947436c1.tar.xz
linux-dev-cba43c31f14b08f193ebb5b4a72751b0947436c1.zip
riscv: Use global mappings for kernel pages
We map kernel pages into all addresses spages, so they can be marked as global. This allows hardware to avoid flushing the kernel mappings when moving between address spaces. Signed-off-by: Guo Ren <guoren@linux.alibaba.com> Reviewed-by: Anup Patel <anup@brainfault.org> Reviewed-by: Christoph Hellwig <hch@lst.de> [Palmer: commit text] Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
Diffstat (limited to 'arch/riscv/include/asm/pgtable.h')
-rw-r--r--arch/riscv/include/asm/pgtable.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/riscv/include/asm/pgtable.h b/arch/riscv/include/asm/pgtable.h
index bde8ce3bfe7c..c103f0a278e5 100644
--- a/arch/riscv/include/asm/pgtable.h
+++ b/arch/riscv/include/asm/pgtable.h
@@ -134,7 +134,8 @@
| _PAGE_WRITE \
| _PAGE_PRESENT \
| _PAGE_ACCESSED \
- | _PAGE_DIRTY)
+ | _PAGE_DIRTY \
+ | _PAGE_GLOBAL)
#define PAGE_KERNEL __pgprot(_PAGE_KERNEL)
#define PAGE_KERNEL_READ __pgprot(_PAGE_KERNEL & ~_PAGE_WRITE)