Message ID | 20181010024523.4921-2-joel@jms.id.au (mailing list archive) |
---|---|
State | Accepted |
Commit | e8e132e6885962582784b6fa16a80d07ea739c0f |
Headers | show |
Series | powerpc/boot: Build wrapper with optimisations | expand |
Context | Check | Description |
---|---|---|
snowpatch_ozlabs/apply_patch | success | next/apply_patch Successfully applied |
snowpatch_ozlabs/checkpatch | success | Test checkpatch on branch next |
Joel Stanley <joel@jms.id.au> writes: > This will avoid auto-vectorisation when building with higher > optimisation levels. > > We don't know if the machine can support VSX and even if it's present > it's probably not going to be enabled at this point in boot. > > Signed-off-by: Joel Stanley <joel@jms.id.au> > --- > arch/powerpc/boot/Makefile | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile > index 0fb96c26136f..739ef8d43b91 100644 > --- a/arch/powerpc/boot/Makefile > +++ b/arch/powerpc/boot/Makefile > @@ -32,8 +32,8 @@ else > endif > > BOOTCFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \ > - -fno-strict-aliasing -Os -msoft-float -pipe \ > - -fomit-frame-pointer -fno-builtin -fPIC -nostdinc \ > + -fno-strict-aliasing -Os -msoft-float -mno-altivec -mno-vsx \ That's going to break if the compiler doesn't understand -mno-vsx isn't it? I'm not sure if "support" a compiler that old though. cheers
On Wed, 10 Oct 2018 at 22:41, Michael Ellerman <mpe@ellerman.id.au> wrote: > > Joel Stanley <joel@jms.id.au> writes: > > > This will avoid auto-vectorisation when building with higher > > optimisation levels. > > > > We don't know if the machine can support VSX and even if it's present > > it's probably not going to be enabled at this point in boot. > > > > Signed-off-by: Joel Stanley <joel@jms.id.au> > > --- > > arch/powerpc/boot/Makefile | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile > > index 0fb96c26136f..739ef8d43b91 100644 > > --- a/arch/powerpc/boot/Makefile > > +++ b/arch/powerpc/boot/Makefile > > @@ -32,8 +32,8 @@ else > > endif > > > > BOOTCFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \ > > - -fno-strict-aliasing -Os -msoft-float -pipe \ > > - -fomit-frame-pointer -fno-builtin -fPIC -nostdinc \ > > + -fno-strict-aliasing -Os -msoft-float -mno-altivec -mno-vsx \ > > That's going to break if the compiler doesn't understand -mno-vsx isn't it? > > I'm not sure if "support" a compiler that old though. Segher, the kernel mandates 4.6 as the minimum. Do we need to worry about the compiler not supporting -mno-altivec -mno-vsx?
On Thu, Oct 11, 2018 at 08:22:54AM +1030, Joel Stanley wrote: > On Wed, 10 Oct 2018 at 22:41, Michael Ellerman <mpe@ellerman.id.au> wrote: > > Joel Stanley <joel@jms.id.au> writes: > > > BOOTCFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \ > > > - -fno-strict-aliasing -Os -msoft-float -pipe \ > > > - -fomit-frame-pointer -fno-builtin -fPIC -nostdinc \ > > > + -fno-strict-aliasing -Os -msoft-float -mno-altivec -mno-vsx \ > > > > That's going to break if the compiler doesn't understand -mno-vsx isn't it? > > > > I'm not sure if "support" a compiler that old though. > > Segher, the kernel mandates 4.6 as the minimum. Do we need to worry > about the compiler not supporting -mno-altivec -mno-vsx? -mvsx is gcc 4.5 and later. https://www.gnu.org/software/gcc/gcc-4.5/changes.html -maltivec is... Hrm, not so easy to find... gcc 3.1 and later it seems. https://www.gnu.org/software/gcc/gcc-3.1/changes.html You should be fine. Segher
Segher Boessenkool <segher@kernel.crashing.org> writes: > On Thu, Oct 11, 2018 at 08:22:54AM +1030, Joel Stanley wrote: >> On Wed, 10 Oct 2018 at 22:41, Michael Ellerman <mpe@ellerman.id.au> wrote: >> > Joel Stanley <joel@jms.id.au> writes: >> > > BOOTCFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \ >> > > - -fno-strict-aliasing -Os -msoft-float -pipe \ >> > > - -fomit-frame-pointer -fno-builtin -fPIC -nostdinc \ >> > > + -fno-strict-aliasing -Os -msoft-float -mno-altivec -mno-vsx \ >> > >> > That's going to break if the compiler doesn't understand -mno-vsx isn't it? >> > >> > I'm not sure if "support" a compiler that old though. >> >> Segher, the kernel mandates 4.6 as the minimum. Do we need to worry >> about the compiler not supporting -mno-altivec -mno-vsx? > > -mvsx is gcc 4.5 and later. > https://www.gnu.org/software/gcc/gcc-4.5/changes.html > > -maltivec is... Hrm, not so easy to find... gcc 3.1 and later it seems. > https://www.gnu.org/software/gcc/gcc-3.1/changes.html Thanks. cheers
On Wed, 2018-10-10 at 02:45:22 UTC, Joel Stanley wrote: > This will avoid auto-vectorisation when building with higher > optimisation levels. > > We don't know if the machine can support VSX and even if it's present > it's probably not going to be enabled at this point in boot. > > Signed-off-by: Joel Stanley <joel@jms.id.au> Series applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/e8e132e6885962582784b6fa16a80d cheers
diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile index 0fb96c26136f..739ef8d43b91 100644 --- a/arch/powerpc/boot/Makefile +++ b/arch/powerpc/boot/Makefile @@ -32,8 +32,8 @@ else endif BOOTCFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \ - -fno-strict-aliasing -Os -msoft-float -pipe \ - -fomit-frame-pointer -fno-builtin -fPIC -nostdinc \ + -fno-strict-aliasing -Os -msoft-float -mno-altivec -mno-vsx \ + -pipe -fomit-frame-pointer -fno-builtin -fPIC -nostdinc \ -D$(compress-y) ifdef CONFIG_PPC64_BOOT_WRAPPER
This will avoid auto-vectorisation when building with higher optimisation levels. We don't know if the machine can support VSX and even if it's present it's probably not going to be enabled at this point in boot. Signed-off-by: Joel Stanley <joel@jms.id.au> --- arch/powerpc/boot/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)