linux-stable/arch/powerpc
Naveen N Rao 9b445804b1 powerpc/ftrace: Fix dropping weak symbols with older toolchains
commit f6834c8c59 upstream.

The minimum level of gcc supported for building the kernel is v5.1.
v5.x releases of gcc emitted a three instruction sequence for
-mprofile-kernel:
	mflr	r0
	std	r0, 16(r1)
	bl	_mcount

It is only with the v6.x releases that gcc started emitting the two
instruction sequence for -mprofile-kernel, omitting the second store
instruction.

With the older three instruction sequence, the actual ftrace location
can be the 5th instruction into a function. Update the allowed offset
for ftrace location from 12 to 16 to accommodate the same.

Cc: stable@vger.kernel.org
Fixes: 7af82ff90a ("powerpc/ftrace: Ignore weak functions")
Signed-off-by: Naveen N Rao <naveen@kernel.org>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/7b265908a9461e38fc756ef9b569703860a80621.1687166935.git.naveen@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-09-13 09:48:39 +02:00
..
boot powerpc: dts: turris1x.dts: Fix PCIe MEM size for pci2 node 2023-07-19 16:36:46 +02:00
configs powerpc updates for 6.4 2023-04-28 16:24:32 -07:00
crypto powerpc/crypto: Fix aes-gcm-p10 link errors 2023-05-30 15:50:32 +10:00
include powerpc/ftrace: Fix dropping weak symbols with older toolchains 2023-09-13 09:48:39 +02:00
kernel powerpc/iommu: Fix notifiers being shared by PCI and VIO buses 2023-09-13 09:48:24 +02:00
kexec
kvm powerpc: Don't include lppaca.h in paca.h 2023-09-13 09:48:24 +02:00
lib powerpc/64: vmlinux support building with PCREL addresing 2023-04-20 12:59:21 +10:00
math-emu
mm powerpc: Don't include lppaca.h in paca.h 2023-09-13 09:48:24 +02:00
net powerpc/bpf: populate extable entries only during the last pass 2023-05-15 15:40:31 +10:00
perf powerpc/perf: Convert fsl_emb notifier to state machine callbacks 2023-09-13 09:48:23 +02:00
platforms powerpc/pseries: Fix hcall tracepoints with JUMP_LABEL=n 2023-09-13 09:48:24 +02:00
purgatory powerpc/purgatory: remove PGO flags 2023-06-12 11:31:50 -07:00
sysdev powerpc/mpc5xxx: Add missing fwnode_handle_put() 2023-09-13 09:48:24 +02:00
tools powerpc: Move script to check relocations at compile time in scripts/ 2023-04-19 07:46:31 -07:00
xmon powerpc: Don't include lppaca.h in paca.h 2023-09-13 09:48:24 +02:00
Kbuild
Kconfig powerpc/mm: Convert to using lock_mm_and_find_vma() 2023-07-01 13:12:39 +02:00
Kconfig.debug powerpc: allow PPC_EARLY_DEBUG_CPM only when SERIAL_CPM=y 2023-07-19 16:36:46 +02:00
Makefile powerpc: Fail build if using recordmcount with binutils v2.37 2023-07-23 13:53:55 +02:00
Makefile.postlink