diff options
author | Zong Li <zong.li@sifive.com> | 2020-03-09 17:55:37 +0100 |
---|---|---|
committer | Palmer Dabbelt <palmerdabbelt@google.com> | 2020-03-26 17:24:33 +0100 |
commit | 395a21ff859c9c2471ea62d7d56af8a85ec333f7 (patch) | |
tree | 9e3d35bc7de9b774b388dbfb154332fbf2751ebe /arch/riscv/include | |
parent | riscv: add ARCH_HAS_SET_MEMORY support (diff) | |
download | linux-395a21ff859c9c2471ea62d7d56af8a85ec333f7.tar.xz linux-395a21ff859c9c2471ea62d7d56af8a85ec333f7.zip |
riscv: add ARCH_HAS_SET_DIRECT_MAP support
Add set_direct_map_*() functions for setting the direct map alias for
the page to its default permissions and to an invalid state that cannot
be cached in a TLB. (See d253ca0c ("x86/mm/cpa: Add set_direct_map_*()
functions")) Add a similar implementation for RISC-V.
Signed-off-by: Zong Li <zong.li@sifive.com>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
Diffstat (limited to 'arch/riscv/include')
-rw-r--r-- | arch/riscv/include/asm/set_memory.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/riscv/include/asm/set_memory.h b/arch/riscv/include/asm/set_memory.h index 79a810f0f38b..620d81c372d9 100644 --- a/arch/riscv/include/asm/set_memory.h +++ b/arch/riscv/include/asm/set_memory.h @@ -21,4 +21,7 @@ static inline int set_memory_x(unsigned long addr, int numpages) { return 0; } static inline int set_memory_nx(unsigned long addr, int numpages) { return 0; } #endif +int set_direct_map_invalid_noflush(struct page *page); +int set_direct_map_default_noflush(struct page *page); + #endif /* _ASM_RISCV_SET_MEMORY_H */ |