OpenCloudOS-Kernel/arch/riscv/mm
Geert Uytterhoeven 8d91b09733
riscv: Consistify protect_kernel_linear_mapping_text_rodata() use
The various uses of protect_kernel_linear_mapping_text_rodata() are
not consistent:
  - Its definition depends on "64BIT && !XIP_KERNEL",
  - Its forward declaration depends on MMU,
  - Its single caller depends on "STRICT_KERNEL_RWX && 64BIT && MMU &&
    !XIP_KERNEL".

Fix this by settling on the dependencies of the caller, which can be
simplified as STRICT_KERNEL_RWX depends on "MMU && !XIP_KERNEL".
Provide a dummy definition, as the caller is protected by
"IS_ENABLED(CONFIG_STRICT_KERNEL_RWX)" instead of "#ifdef
CONFIG_STRICT_KERNEL_RWX".

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Tested-by: Alexandre Ghiti <alex@ghiti.fr>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
2021-05-06 09:40:15 -07:00
..
Makefile riscv: Fixup patch_text panic in ftrace 2021-01-14 15:09:04 -08:00
cacheflush.c mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00
context.c RISC-V: Implement ASID allocator 2021-02-18 23:18:06 -08:00
extable.c riscv: abstract out CSR names for supervisor vs machine mode 2019-11-05 09:20:42 -08:00
fault.c RISC-V Patches for the 5.13 Merge Window, Part 1 2021-05-06 09:24:18 -07:00
hugetlbpage.c hugetlbfs: remove hugetlb_add_hstate() warning for existing hstate 2020-06-03 20:09:46 -07:00
init.c riscv: Consistify protect_kernel_linear_mapping_text_rodata() use 2021-05-06 09:40:15 -07:00
kasan_init.c RISC-V Patches for the 5.13 Merge Window, Part 1 2021-05-06 09:24:18 -07:00
pageattr.c RISC-V Patches for the 5.11 Merge Window, Part 1 2020-12-18 10:43:07 -08:00
physaddr.c riscv: Move kernel mapping outside of linear mapping 2021-04-26 08:25:04 -07:00
ptdump.c riscv: Remove 32b kernel mapping from page table dump 2021-05-01 08:53:32 -07:00
tlbflush.c RISC-V: Issue a tlb page flush if possible 2019-10-29 11:32:18 -07:00