Skip to content

Commit cba43c3

Browse files
guoren83palmer-dabbelt
authored andcommitted
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]>
1 parent 7fa865f commit cba43c3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

arch/riscv/include/asm/pgtable.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,8 @@
134134
| _PAGE_WRITE \
135135
| _PAGE_PRESENT \
136136
| _PAGE_ACCESSED \
137-
| _PAGE_DIRTY)
137+
| _PAGE_DIRTY \
138+
| _PAGE_GLOBAL)
138139

139140
#define PAGE_KERNEL __pgprot(_PAGE_KERNEL)
140141
#define PAGE_KERNEL_READ __pgprot(_PAGE_KERNEL & ~_PAGE_WRITE)

0 commit comments

Comments
 (0)