From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Ard Biesheuvel <ardb@kernel.org>
Cc: "Jason A. Donenfeld" <Jason@zx2c4.com>,
kernel test robot <lkp@intel.com>,
"Justin M. Forbes" <jforbes@fedoraproject.org>,
llvm@lists.linux.dev, kbuild-all@lists.01.org,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
"Jason A. Donenfeld" <zx2c4@kernel.org>
Subject: Re: [linux-stable-rc:linux-5.15.y 6874/8723] arch/arm/lib/xor-neon.c:30:2: warning: This code requires at least version 4.6 of GCC
Date: Mon, 25 Jul 2022 14:59:07 +0200 [thread overview]
Message-ID: <Yt6Tm4teRfNEvwcw@kroah.com> (raw)
In-Reply-To: <CAMj1kXGPjFAY0y-SPZv64CRhpo9s1+__z4bya86aMcTs9=f8pw@mail.gmail.com>
On Mon, Jul 25, 2022 at 02:41:42PM +0200, Ard Biesheuvel wrote:
> On Mon, 25 Jul 2022 at 10:49, Greg Kroah-Hartman
> <gregkh@linuxfoundation.org> wrote:
> >
> > On Mon, Jul 25, 2022 at 07:42:07AM +0200, Ard Biesheuvel wrote:
> > > On Mon, 25 Jul 2022 at 00:40, Jason A. Donenfeld <Jason@zx2c4.com> wrote:
> > > >
> > > > Hi Ard,
> > > >
> > > > On Mon, Jul 25, 2022 at 04:14:48AM +0800, kernel test robot wrote:
> > > > > All warnings (new ones prefixed by >>):
> > > > >
> > > > > >> arch/arm/lib/xor-neon.c:30:2: warning: This code requires at least version 4.6 of GCC [-W#warnings]
> > > > > #warning This code requires at least version 4.6 of GCC
> > > > > ^
> > > > > 1 warning generated.
> > > > >
> > > > >
> > > > > vim +30 arch/arm/lib/xor-neon.c
> > > > >
> > > > > 01956597cbc46d Ard Biesheuvel 2013-05-17 16
> > > > > 01956597cbc46d Ard Biesheuvel 2013-05-17 17 /*
> > > > > 01956597cbc46d Ard Biesheuvel 2013-05-17 18 * Pull in the reference implementations while instructing GCC (through
> > > > > 01956597cbc46d Ard Biesheuvel 2013-05-17 19 * -ftree-vectorize) to attempt to exploit implicit parallelism and emit
> > > > > 01956597cbc46d Ard Biesheuvel 2013-05-17 20 * NEON instructions.
> > > > > 01956597cbc46d Ard Biesheuvel 2013-05-17 21 */
> > > > > 01956597cbc46d Ard Biesheuvel 2013-05-17 22 #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
> > > > > 01956597cbc46d Ard Biesheuvel 2013-05-17 23 #pragma GCC optimize "tree-vectorize"
> > > > > 01956597cbc46d Ard Biesheuvel 2013-05-17 24 #else
> > > > > 01956597cbc46d Ard Biesheuvel 2013-05-17 25 /*
> > > > > 01956597cbc46d Ard Biesheuvel 2013-05-17 26 * While older versions of GCC do not generate incorrect code, they fail to
> > > > > 01956597cbc46d Ard Biesheuvel 2013-05-17 27 * recognize the parallel nature of these functions, and emit plain ARM code,
> > > > > 01956597cbc46d Ard Biesheuvel 2013-05-17 28 * which is known to be slower than the optimized ARM code in asm-arm/xor.h.
> > > > > 01956597cbc46d Ard Biesheuvel 2013-05-17 29 */
> > > > > 01956597cbc46d Ard Biesheuvel 2013-05-17 @30 #warning This code requires at least version 4.6 of GCC
> > > > > 01956597cbc46d Ard Biesheuvel 2013-05-17 31 #endif
> > > > > 01956597cbc46d Ard Biesheuvel 2013-05-17 32
> > > >
> > > > Does this file need a depends on ≥4.6 thing in Kconfig? Or is something
> > > > else happening here since 4.6 isn't even supported by the kernel these
> > > > days?
> > > >
> > >
> > > Hi Jason,
> > >
> > > This is explained/fixed in
> > >
> > > commit a69cb445f7d129abf7c50d48c8a8eca7c8d5df15
> > > Author: Ard Biesheuvel <ardb@kernel.org>
> > > Date: Sat Feb 5 16:23:46 2022 +0100
> > >
> > > crypto: arm/xor - make vectorized C code Clang-friendly
> > >
> > > The ARM version of the accelerated XOR routines are simply the 8-way C
> > > routines passed through the auto-vectorizer with SIMD codegen enabled.
> > > This used to require GCC version 4.6 at least, but given that 5.1 is now
> > > the baseline, this check is no longer necessary, and actually
> > > misidentifies Clang as GCC < 4.6 as Clang defines the GCC major/minor as
> > > well, but makes no attempt at doing this in a way that conveys feature
> > > parity with a certain version of GCC (which would not be a great idea in
> > > the first place).
> > >
> > > which landed in v5.18. Note that the patch depends on its parent,
> > > which touches many different architectures, so it may not be
> > > backportable cleanly.
> >
> > I would love to backport this as it bugs me to no end on some various
> > gerrit systems all the time. I'll look into it later this week unless
> > someone beats me to it :)
> >
>
> If backporting is an issue, we could just drop this warning - GCC
> before 4.6 hasn't been supported for a while anyway, and Clang never
> had the SIMD accelerated XOR to begin with (it needs the __restrict
> annotations that the parent patch introduces)
I would love to drop the warning, as it triggers when clang tries to
build this file.
thanks,
greg k-h
prev parent reply other threads:[~2022-07-25 12:59 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-24 20:14 [linux-stable-rc:linux-5.15.y 6874/8723] arch/arm/lib/xor-neon.c:30:2: warning: This code requires at least version 4.6 of GCC kernel test robot
2022-07-24 22:39 ` Jason A. Donenfeld
2022-07-25 5:42 ` Ard Biesheuvel
2022-07-25 8:49 ` Greg Kroah-Hartman
2022-07-25 12:41 ` Ard Biesheuvel
2022-07-25 12:55 ` Arnd Bergmann
2022-07-25 14:35 ` Arnd Bergmann
2022-07-30 14:33 ` Greg Kroah-Hartman
2022-07-30 23:15 ` Jason A. Donenfeld
2022-07-31 10:13 ` Greg Kroah-Hartman
2022-07-25 12:59 ` Greg Kroah-Hartman [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Yt6Tm4teRfNEvwcw@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=Jason@zx2c4.com \
--cc=ardb@kernel.org \
--cc=jforbes@fedoraproject.org \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=llvm@lists.linux.dev \
--cc=zx2c4@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox