Skip to content

Commit f22c81b

Browse files
leitaowilldeacon
authored andcommitted
arm64: Disable branch profiling for all arm64 code
The arm64 kernel doesn't boot with annotated branches (PROFILE_ANNOTATED_BRANCHES) enabled and CONFIG_DEBUG_VIRTUAL together. Bisecting it, I found that disabling branch profiling in arch/arm64/mm solved the problem. Narrowing down a bit further, I found that physaddr.c is the file that needs to have branch profiling disabled to get the machine to boot. I suspect that it might invoke some ftrace helper very early in the boot process and ftrace is still not enabled(!?). Rather than playing whack-a-mole with individual files, disable branch profiling for the entire arch/arm64 tree, similar to what x86 already does in arch/x86/Kbuild. Cc: stable@vger.kernel.org Signed-off-by: Breno Leitao <leitao@debian.org> Acked-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Will Deacon <will@kernel.org>
1 parent 15dd20d commit f22c81b

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

arch/arm64/Kbuild

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
# SPDX-License-Identifier: GPL-2.0-only
2+
3+
# Branch profiling isn't noinstr-safe
4+
subdir-ccflags-$(CONFIG_TRACE_BRANCH_PROFILING) += -DDISABLE_BRANCH_PROFILING
5+
26
obj-y += kernel/ mm/ net/
37
obj-$(CONFIG_KVM) += kvm/
48
obj-$(CONFIG_XEN) += xen/

0 commit comments

Comments
 (0)