Skip to content

Commit 42e0e0b

Browse files
xhackerustcpalmer-dabbelt
authored andcommitted
riscv: code patching only works on !XIP_KERNEL
Some features which need code patching such as KPROBES, DYNAMIC_FTRACE KGDB can only work on !XIP_KERNEL. Add dependencies for these features that rely on code patching. Signed-off-by: Jisheng Zhang <[email protected]> Signed-off-by: Palmer Dabbelt <[email protected]>
1 parent 5e63215 commit 42e0e0b

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

arch/riscv/Kconfig

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,11 @@ config RISCV
6161
select GENERIC_TIME_VSYSCALL if MMU && 64BIT
6262
select HANDLE_DOMAIN_IRQ
6363
select HAVE_ARCH_AUDITSYSCALL
64-
select HAVE_ARCH_JUMP_LABEL
65-
select HAVE_ARCH_JUMP_LABEL_RELATIVE
64+
select HAVE_ARCH_JUMP_LABEL if !XIP_KERNEL
65+
select HAVE_ARCH_JUMP_LABEL_RELATIVE if !XIP_KERNEL
6666
select HAVE_ARCH_KASAN if MMU && 64BIT
6767
select HAVE_ARCH_KASAN_VMALLOC if MMU && 64BIT
68-
select HAVE_ARCH_KGDB
68+
select HAVE_ARCH_KGDB if !XIP_KERNEL
6969
select HAVE_ARCH_KGDB_QXFER_PKT
7070
select HAVE_ARCH_MMAP_RND_BITS if MMU
7171
select HAVE_ARCH_SECCOMP_FILTER
@@ -80,9 +80,9 @@ config RISCV
8080
select HAVE_GCC_PLUGINS
8181
select HAVE_GENERIC_VDSO if MMU && 64BIT
8282
select HAVE_IRQ_TIME_ACCOUNTING
83-
select HAVE_KPROBES
84-
select HAVE_KPROBES_ON_FTRACE
85-
select HAVE_KRETPROBES
83+
select HAVE_KPROBES if !XIP_KERNEL
84+
select HAVE_KPROBES_ON_FTRACE if !XIP_KERNEL
85+
select HAVE_KRETPROBES if !XIP_KERNEL
8686
select HAVE_PCI
8787
select HAVE_PERF_EVENTS
8888
select HAVE_PERF_REGS
@@ -231,11 +231,11 @@ config ARCH_RV64I
231231
bool "RV64I"
232232
select 64BIT
233233
select ARCH_SUPPORTS_INT128 if CC_HAS_INT128 && GCC_VERSION >= 50000
234-
select HAVE_DYNAMIC_FTRACE if MMU && $(cc-option,-fpatchable-function-entry=8)
234+
select HAVE_DYNAMIC_FTRACE if !XIP_KERNEL && MMU && $(cc-option,-fpatchable-function-entry=8)
235235
select HAVE_DYNAMIC_FTRACE_WITH_REGS if HAVE_DYNAMIC_FTRACE
236-
select HAVE_FTRACE_MCOUNT_RECORD
236+
select HAVE_FTRACE_MCOUNT_RECORD if !XIP_KERNEL
237237
select HAVE_FUNCTION_GRAPH_TRACER
238-
select HAVE_FUNCTION_TRACER
238+
select HAVE_FUNCTION_TRACER if !XIP_KERNEL
239239
select SWIOTLB if MMU
240240

241241
endchoice

0 commit comments

Comments
 (0)