summaryrefslogtreecommitdiff
path: root/Documentation/powerpc
diff options
context:
space:
mode:
authorNaveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>2022-08-09 13:54:25 +0300
committerMichael Ellerman <mpe@ellerman.id.au>2022-11-24 15:31:46 +0300
commit7af82ff90a2b0690c2c45818fcce4c4ac3b187f3 (patch)
tree9341d7604ef37c7ffb553beb221507e507009e85 /Documentation/powerpc
parent14b5d59a261b1947db287b3b52f4bb1dc496dede (diff)
downloadlinux-7af82ff90a2b0690c2c45818fcce4c4ac3b187f3.tar.xz
powerpc/ftrace: Ignore weak functions
Extend commit b39181f7c6907d ("ftrace: Add FTRACE_MCOUNT_MAX_OFFSET to avoid adding weak function") to ppc32 and ppc64 -mprofile-kernel by defining FTRACE_MCOUNT_MAX_OFFSET. For ppc64 -mprofile-kernel ABI, we can have two instructions at function entry for TOC setup followed by 'mflr r0' and 'bl _mcount'. So, the mcount location is at most the 4th instruction in a function. For ppc32, mcount location is always the 3rd instruction in a function, preceded by 'mflr r0' and 'stw r0,4(r1)'. With this patch, and with ppc64le_guest_defconfig and some ftrace/bpf config items enabled: # grep __ftrace_invalid_address available_filter_functions | wc -l 79 Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com> Acked-by: Steven Rostedt (Google) <rostedt@goodmis.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20220809105425.424045-1-naveen.n.rao@linux.vnet.ibm.com
Diffstat (limited to 'Documentation/powerpc')
0 files changed, 0 insertions, 0 deletions