]> git.ipfire.org Git - thirdparty/linux.git/commit
arm64: Disable branch profiling for all arm64 code
authorBreno Leitao <leitao@debian.org>
Tue, 6 Jan 2026 10:16:35 +0000 (02:16 -0800)
committerWill Deacon <will@kernel.org>
Thu, 8 Jan 2026 21:46:01 +0000 (21:46 +0000)
commitf22c81bebf8bda6e54dc132df0ed54f6bf8756f9
tree9dc757d49a76edadcd1f861956c9023edf4b9c2f
parent15dd20dda979ebab72f6df97845828e78d63ab91
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>
arch/arm64/Kbuild