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

Alexey Kardashevskiy aik at ozlabs.ru
Fri Jan 7 13:47:29 AEDT 2022



On 06/01/2022 03:22, Cédric Le Goater wrote:
> By default, SLOF would implement the cpu_to_le64() helper with
> the 'stdbrx' instruction which is invalid under POWER5+ and 970

A nit: slof uses __builtin_bswap64() which gcc turns into stdbrx unless 
-mcpu=power5.

I'll fix this up and push out if nobody objects. Thanks,


> 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
>   


More information about the SLOF mailing list