[PATCH] arm: mediatek: fix secondary CPU boot on Thumb-2 kernels with Clang

Nathan Chancellor nathan at kernel.org
Fri Aug 7 11:52:59 PDT 2026


On Sun, Jul 26, 2026 at 10:00:35PM +0200, Arnd Bergmann wrote:
> Working around it in the kernel is fine, but I'd prefer to wait for
> the fix to first get merged into llvm so we can reference the
> bugfix in the kernel commit.

This is now fixed in LLVM main:

  https://github.com/llvm/llvm-project/commit/261c025a03732ac6d3a26ad80e962481237de052

> A trivial workaround would be to have a dependency in
> CONFIG_THUMB2_KERNEL for !AS_IS_LLVM||CLANG_VERSION>=24
> (or whatever version), though fixing the .S code in all known
> instances is probably better if we want to ever have a chance
> to require IAS on all architectures.

I guess it is a question of how much maintenance will keeping up the .S
code take over time. Presumably this issue is not too common if we are
just now discovering it but maybe that is because CONFIG_THUMB2_KERNEL
is not too common? Is there a way to flag this at compile time? I don't
really have a strong opinion.

-- 
Cheers,
Nathan



More information about the linux-arm-kernel mailing list