[SLOF] [PATCH] make.rules: Compile SLOF for power5

Cédric Le Goater clg at kaod.org
Thu Jan 6 03:22:38 AEDT 2022


By default, SLOF would implement the cpu_to_le64() helper with
the 'stdbrx' instruction which is invalid under POWER5+ and 970
CPUs. This breaks the QEMU pseries machine with such CPUs when
virtio or USB devices or in use.

Signed-off-by: Cédric Le Goater <clg at kaod.org>
---
 make.rules | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/make.rules b/make.rules
index eeff4f4a4117..aea57fe36f1e 100644
--- a/make.rules
+++ b/make.rules
@@ -76,7 +76,7 @@ WARNFLAGS = -Wall -Wmissing-prototypes -Wstrict-prototypes -Wformat-security -We
 CFLAGS ?= -g -O2 -fno-builtin -ffreestanding -nostdinc -msoft-float \
 	  -fno-strict-aliasing -mno-altivec -mabi=no-altivec \
 	  -fno-stack-protector -fno-asynchronous-unwind-tables $(WARNFLAGS) \
-	  -fshort-wchar
+	  -fshort-wchar -mcpu=power5
 
 export CC AS LD CLEAN OBJCOPY OBJDUMP STRIP AR RANLIB CFLAGS
 
-- 
2.31.1



More information about the SLOF mailing list