diff options
author | Guo Ren <[email protected]> | 2021-05-26 05:49:20 +0000 |
---|---|---|
committer | Palmer Dabbelt <[email protected]> | 2021-05-29 18:17:23 -0700 |
commit | cba43c31f14b08f193ebb5b4a72751b0947436c1 (patch) | |
tree | 256eb70e8cfe3a32bfee547b78d7897d67330e96 | |
parent | 7fa865f5640a46ed9d3655dd19583fe750e85a8a (diff) |
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 <[email protected]>
Reviewed-by: Anup Patel <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
[Palmer: commit text]
Signed-off-by: Palmer Dabbelt <[email protected]>
-rw-r--r-- | arch/riscv/include/asm/pgtable.h | 3 |
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) |