riscv: kprobes: Fix build error when MMU=n

lkp reported a randconfig failure:

arch/riscv/kernel/probes/kprobes.c:90:22: error: use of undeclared identifier 'PAGE_KERNEL_READ_EXEC'

We implemented the alloc_insn_page() to allocate PAGE_KERNEL_READ_EXEC
page for kprobes insn page for STRICT_MODULE_RWX. But if MMU=n, we
should fall back to the generic weak alloc_insn_page() by generic
kprobe subsystem.

Fixes: cdd1b2bd358f ("riscv: kprobes: Implement alloc_insn_page()")
Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>

authored by Jisheng Zhang and committed by Palmer Dabbelt 02ccdeed 97a03108

Changed files
+2
arch
riscv
kernel
probes
+2
arch/riscv/kernel/probes/kprobes.c
··· 84 84 return 0; 85 85 } 86 86 87 + #ifdef CONFIG_MMU 87 88 void *alloc_insn_page(void) 88 89 { 89 90 return __vmalloc_node_range(PAGE_SIZE, 1, VMALLOC_START, VMALLOC_END, ··· 92 91 VM_FLUSH_RESET_PERMS, NUMA_NO_NODE, 93 92 __builtin_return_address(0)); 94 93 } 94 + #endif 95 95 96 96 /* install breakpoint in text */ 97 97 void __kprobes arch_arm_kprobe(struct kprobe *p)