LoongArch: Add ARCH_HAS_SET_MEMORY support
Add set_memory_ro/rw/x/nx architecture hooks to change the page
attribution.
Use own set_memory.h rather than generic set_memory.h (i.e.
include/asm-generic/set_memory.h), because we want to add other function
prototypes here.
Note: We can only set attributes for KVRANGE/XKVRANGE kernel addresses.
Signed-off-by:
Huacai Chen <chenhuacai@loongson.cn>
Showing
- arch/loongarch/Kconfig 1 addition, 0 deletionsarch/loongarch/Kconfig
- arch/loongarch/include/asm/set_memory.h 17 additions, 0 deletionsarch/loongarch/include/asm/set_memory.h
- arch/loongarch/mm/Makefile 2 additions, 1 deletionarch/loongarch/mm/Makefile
- arch/loongarch/mm/pageattr.c 158 additions, 0 deletionsarch/loongarch/mm/pageattr.c
Loading
Please register or sign in to comment