[PATCH] powerpc/64s: POWER10 CPU Kconfig build option

Michael Ellerman mpe at ellerman.id.au
Fri Oct 7 16:31:28 AEDT 2022


"Nicholas Piggin" <npiggin at gmail.com> writes:
> On Fri Oct 7, 2022 at 9:23 AM AEST, Segher Boessenkool wrote:
>> On Fri, Oct 07, 2022 at 07:56:09AM +1000, Nicholas Piggin wrote:
>> > On Fri Oct 7, 2022 at 5:54 AM AEST, Segher Boessenkool wrote:
>> > > On Fri, Sep 23, 2022 at 01:30:04PM +1000, Nicholas Piggin wrote:
...
>> > > > +# No AltiVec or VSX or MMA instructions when building kernel
>> > > >  KBUILD_CFLAGS += $(call cc-option,-mno-altivec)
>> > > >  KBUILD_CFLAGS += $(call cc-option,-mno-vsx)
>> > > > +KBUILD_CFLAGS += $(call cc-option,-mno-mma)
>> > >
>> > > MMA code is never generated unless the code asks for it explicitly.
>> > > This is fundamental, not just an implementations side effect.
>> > 
>> > Well, now it double won't be generated :)
>>
>> Yeah, but there are many other things you can unnecessarily disable as
>> well!  :-)
>>
>> VMX and VSX are disabled here because the compiler *will* use those
>> registers if it feels like it (that is, if it thinks that will be
>> faster).  MMA is a very different beast: the compiler can never know if
>> it will be faster, to start with.
>
> True, but now I don't have to find the exact clause and have my lawyer
> confirm that it definitely probably won't change in future and break
> things.

Right. If someone asks "does the kernel ever use MMA instructions?" we
can just point at that line and we have a definite answer. No need to
audit the behaviour of all GCC and Clang versions ever released.

cheers


More information about the Linuxppc-dev mailing list