On Sun, 13 Jun 2021 08:44:52 +0200
Matthieu Herrb <[email protected]> wrote:

> I'm suggesting the patch below to force machdep.altivec=0 if kernel
> support is not there.
> 
> With this patch on a kernel without 'option ALTIVEC', the pixman
> tests pass (while they get SIGILL without the patch)
> 
> PS: To run the pixman tests, build pixman with make -f
> Makefile.bsd-wrapper and then: cd obj/tests ; make check
> (the tests are sorted by run time and running all of them can take
> hours; I've interrupted them after cover-test)

ok gkoehler@

After I applied your patch and built a no-ALTIVEC kernel, pixman's
"make check" reached, "All 33 tests passed", in < 1.5 hours on a
relatively fast 999 MHz G4.

--George

> Index: cpu.c
> ===================================================================
> RCS file: /cvs/OpenBSD/src/sys/arch/macppc/macppc/cpu.c,v
> retrieving revision 1.83
> diff -u -p -u -r1.83 cpu.c
> --- cpu.c     29 May 2020 04:42:24 -0000      1.83
> +++ cpu.c     13 Jun 2021 06:23:38 -0000
> @@ -275,6 +275,9 @@ cpuattach(struct device *parent, struct 
>               snprintf(cpu_model, sizeof(cpu_model), "Version %x", cpu);
>               break;
>       }
> +#ifndef ALTIVEC                      /* altivec support absent from kernel */
> +     ppc_altivec = 0;
> +#endif
>       snprintf(cpu_model + strlen(cpu_model),
>           sizeof(cpu_model) - strlen(cpu_model),
>           " (Revision 0x%x)", pvr & 0xffff);
> 
> -- 
> Matthieu Herrb


-- 
George Koehler <[email protected]>

Reply via email to