linux/arch/powerpc
Michael Ellerman 9d63610951 powerpc/ftrace: Separate the heuristics for checking call sites
In __ftrace_make_nop() (the 64-bit version), we have code to deal with
two ftrace ABIs. There is the original ABI, which looks mostly like a
function call, and then the mprofile-kernel ABI which is just a branch.

The code tries to handle both cases, by looking for the presence of a
load to restore the TOC pointer (PPC_INST_LD_TOC). If we detect the TOC
load, we assume the call site is for an mcount() call using the old ABI.
That means we patch the mcount() call with a b +8, to branch over the
TOC load.

However if the kernel was built with mprofile-kernel, then there will
never be a call site using the original ftrace ABI. If for some reason
we do see a TOC load, then it's there for a good reason, and we should
not jump over it.

So split the code, using the existing CC_USING_MPROFILE_KERNEL. Kernels
built with mprofile-kernel will only look for, and expect, the new ABI,
and similarly for the original ABI.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2016-07-21 20:10:37 +10:00
..
boot powerpc/boot: Add OPAL console to epapr wrappers 2016-07-05 23:58:54 +10:00
configs powerpc/pseries: Auto-online hotplugged memory 2016-07-15 20:18:37 +10:00
crypto powerpc: Various typo fixes 2016-06-14 13:58:26 +10:00
include powerpc: Merge 32-bit and 64-bit setup_arch() 2016-07-21 19:17:46 +10:00
kernel powerpc/ftrace: Separate the heuristics for checking call sites 2016-07-21 20:10:37 +10:00
kvm powerpc/mm: Move hash table ops to a separate structure 2016-07-21 18:59:09 +10:00
lib powerpc: Factor do_feature_fixup calls 2016-07-21 18:51:42 +10:00
math-emu
mm powerpc/mm: Move hash table ops to a separate structure 2016-07-21 18:59:09 +10:00
net powerpc/ebpf/jit: Implement JIT compiler for extended BPF 2016-06-24 15:17:57 +10:00
oprofile powerpc: Various typo fixes 2016-06-14 13:58:26 +10:00
perf powerpc/perf: Export Power9 generic and cache events to sysfs 2016-07-05 23:49:48 +10:00
platforms powerpc: Get rid of ppc_md.init_early() 2016-07-21 19:07:26 +10:00
scripts powerpc/ftrace: Add Kconfig & Make glue for mprofile-kernel 2016-03-07 14:53:56 +11:00
sysdev powerpc/dart: Use a cachable DART 2016-07-21 18:55:54 +10:00
xmon powerpc/xmon: Dump ISA 2.07 SPRs 2016-07-14 20:26:24 +10:00
Kconfig powerpc/32: Remove RELOCATABLE_PPC32 2016-07-19 20:17:07 +10:00
Kconfig.debug powerpc/pseries: HVC early debug options should depend on HVC_CONSOLE 2016-07-15 15:02:26 +10:00
Makefile powerpc/sparse: Pass endianness to sparse 2016-07-14 20:44:03 +10:00
relocs_check.sh powerpc: Convert relocs_check to a shell script using grep 2015-03-23 14:47:39 +11:00