android_kernel_oneplus_msm8998/arch/arm64
Mark Rutland 2d6f9a86cd arm64: ftrace: don't adjust the LR value
[ Upstream commit 6e803e2e6e367db9a0d6ecae1bd24bb5752011bd ]

The core ftrace code requires that when it is handed the PC of an
instrumented function, this PC is the address of the instrumented
instruction. This is necessary so that the core ftrace code can identify
the specific instrumentation site. Since the instrumented function will
be a BL, the address of the instrumented function is LR - 4 at entry to
the ftrace code.

This fixup is applied in the mcount_get_pc and mcount_get_pc0 helpers,
which acquire the PC of the instrumented function.

The mcount_get_lr helper is used to acquire the LR of the instrumented
function, whose value does not require this adjustment, and cannot be
adjusted to anything meaningful. No adjustment of this value is made on
other architectures, including arm. However, arm64 adjusts this value by
4.

This patch brings arm64 in line with other architectures and removes the
adjustment of the LR value.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: AKASHI Takahiro <takahiro.akashi@linaro.org>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Torsten Duwe <duwe@suse.de>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-02-20 10:13:07 +01:00
..
boot arm64: dts: stratix10: Correct System Manager register size 2018-11-21 09:27:37 +01:00
configs arm64 fixes and clean-ups: 2015-11-12 15:33:11 -08:00
crypto crypto: arm64/sha - avoid non-standard inline asm tricks 2018-11-27 16:07:58 +01:00
include arm64: Don't trap host pointer auth use to EL2 2019-01-26 09:42:49 +01:00
kernel arm64: ftrace: don't adjust the LR value 2019-02-20 10:13:07 +01:00
kvm arm64/kvm: consistently handle host HCR_EL2 flags 2019-01-26 09:42:49 +01:00
lib arm64: add KASAN support 2015-10-12 17:46:36 +01:00
mm arm64: mm: remove page_mapping check in __sync_icache_dcache 2019-02-06 19:43:05 +01:00
net bpf, arm64: fix jit branch offset related to ldimm64 2017-05-14 13:32:58 +02:00
xen
Kconfig arm64: Add work around for Arm Cortex-A55 Erratum 1024718 2018-05-26 08:48:49 +02:00
Kconfig.debug arm64: remove redundant FRAME_POINTER kconfig option and force to select it 2015-11-10 10:36:00 +00:00
Kconfig.platforms ARM: tegra: select USB_ULPI from EHCI rather than platform 2018-02-25 11:03:51 +01:00
Makefile arm64: remove no-op -p linker flag 2018-12-01 09:46:36 +01:00