@@ -234,6 +234,8 @@ config PPC
234
234
select HAVE_DEBUG_STACKOVERFLOW
235
235
select HAVE_DYNAMIC_FTRACE
236
236
select HAVE_DYNAMIC_FTRACE_WITH_ARGS if ARCH_USING_PATCHABLE_FUNCTION_ENTRY || MPROFILE_KERNEL || PPC32
237
+ select HAVE_DYNAMIC_FTRACE_WITH_CALL_OPS if PPC_FTRACE_OUT_OF_LINE || (PPC32 && ARCH_USING_PATCHABLE_FUNCTION_ENTRY)
238
+ select HAVE_DYNAMIC_FTRACE_WITH_DIRECT_CALLS if HAVE_DYNAMIC_FTRACE_WITH_CALL_OPS
237
239
select HAVE_DYNAMIC_FTRACE_WITH_REGS if ARCH_USING_PATCHABLE_FUNCTION_ENTRY || MPROFILE_KERNEL || PPC32
238
240
select HAVE_EBPF_JIT
239
241
select HAVE_EFFICIENT_UNALIGNED_ACCESS
@@ -243,7 +245,7 @@ config PPC
243
245
select HAVE_FUNCTION_DESCRIPTORS if PPC64_ELF_ABI_V1
244
246
select HAVE_FUNCTION_ERROR_INJECTION
245
247
select HAVE_FUNCTION_GRAPH_TRACER
246
- select HAVE_FUNCTION_TRACER if PPC64 || (PPC32 && CC_IS_GCC)
248
+ select HAVE_FUNCTION_TRACER if !COMPILE_TEST && ( PPC64 || (PPC32 && CC_IS_GCC) )
247
249
select HAVE_GCC_PLUGINS if GCC_VERSION >= 50200 # plugin support on gcc <= 5.1 is buggy on PPC
248
250
select HAVE_GENERIC_VDSO
249
251
select HAVE_HARDLOCKUP_DETECTOR_ARCH if PPC_BOOK3S_64 && SMP
@@ -273,6 +275,8 @@ config PPC
273
275
select HAVE_REGS_AND_STACK_ACCESS_API
274
276
select HAVE_RELIABLE_STACKTRACE
275
277
select HAVE_RSEQ
278
+ select HAVE_SAMPLE_FTRACE_DIRECT if HAVE_DYNAMIC_FTRACE_WITH_DIRECT_CALLS
279
+ select HAVE_SAMPLE_FTRACE_DIRECT_MULTI if HAVE_DYNAMIC_FTRACE_WITH_DIRECT_CALLS
276
280
select HAVE_SETUP_PER_CPU_AREA if PPC64
277
281
select HAVE_SOFTIRQ_ON_OWN_STACK
278
282
select HAVE_STACKPROTECTOR if PPC32 && $(cc-option,$(m32-flag) -mstack-protector-guard=tls -mstack-protector-guard-reg=r2 -mstack-protector-guard-offset=0)
@@ -569,6 +573,22 @@ config ARCH_USING_PATCHABLE_FUNCTION_ENTRY
569
573
def_bool $(success,$(srctree)/arch/powerpc/tools/gcc-check-fpatchable-function-entry.sh $(CC) -mlittle-endian) if PPC64 && CPU_LITTLE_ENDIAN
570
574
def_bool $(success,$(srctree)/arch/powerpc/tools/gcc-check-fpatchable-function-entry.sh $(CC) -mbig-endian) if PPC64 && CPU_BIG_ENDIAN
571
575
576
+ config PPC_FTRACE_OUT_OF_LINE
577
+ def_bool PPC64 && ARCH_USING_PATCHABLE_FUNCTION_ENTRY
578
+ select ARCH_WANTS_PRE_LINK_VMLINUX
579
+
580
+ config PPC_FTRACE_OUT_OF_LINE_NUM_RESERVE
581
+ int "Number of ftrace out-of-line stubs to reserve within .text"
582
+ depends on PPC_FTRACE_OUT_OF_LINE
583
+ default 32768
584
+ help
585
+ Number of stubs to reserve for use by ftrace. This space is
586
+ reserved within .text, and is distinct from any additional space
587
+ added at the end of .text before the final vmlinux link. Set to
588
+ zero to have stubs only be generated at the end of vmlinux (only
589
+ if the size of vmlinux is less than 32MB). Set to a higher value
590
+ if building vmlinux larger than 48MB.
591
+
572
592
config HOTPLUG_CPU
573
593
bool "Support for enabling/disabling CPUs"
574
594
depends on SMP && (PPC_PSERIES || \
0 commit comments