powerpc/boot: Fix boot wrapper code generation with CONFIG_POWER10_CPU
authorNicholas Piggin <npiggin@gmail.com>
Fri, 7 Apr 2023 04:09:09 +0000 (14:09 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 20 Apr 2023 00:19:24 +0000 (10:19 +1000)
-mcpu=power10 will generate prefixed and pcrel code by default, which
we do not support. The general kernel disables these with cflags, but
those were missed for the boot wrapper.

Fixes: 4b2a9315f20d ("powerpc/64s: POWER10 CPU Kconfig build option")
Cc: stable@vger.kernel.org # v6.1+
Reported-by: Danny Tsen <dtsen@linux.ibm.com>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20230407040909.230998-1-npiggin@gmail.com
arch/powerpc/boot/Makefile

index 08071bac056d02e882898b8c19eb8db3f9594baf..129a1e190f25ab09e9bd103dae5207b207082731 100644 (file)
@@ -34,6 +34,8 @@ endif
 
 BOOTCFLAGS    := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
                 -fno-strict-aliasing -O2 -msoft-float -mno-altivec -mno-vsx \
+                $(call cc-option,-mno-prefixed) $(call cc-option,-mno-pcrel) \
+                $(call cc-option,-mno-mma) \
                 $(call cc-option,-mno-spe) $(call cc-option,-mspe=no) \
                 -pipe -fomit-frame-pointer -fno-builtin -fPIC -nostdinc \
                 $(LINUXINCLUDE)