linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Nick Desaulniers <ndesaulniers@google.com>
Cc: Nathan Chancellor <nathan@kernel.org>,
	Arnd Bergmann <arnd@arndb.de>, Ard Biesheuvel <ardb@kernel.org>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org,
	"kernelci.org bot" <bot@kernelci.org>
Subject: Re: [PATCH] ARM: Reduce __thumb2__ definition to crypto files that require it
Date: Mon, 23 Jan 2023 10:48:24 +0000	[thread overview]
Message-ID: <Y85l+E22PJ8lhmcN@shell.armlinux.org.uk> (raw)
In-Reply-To: <CAKwvOd=WQ5cAL74z+gbGgxG9WrOcDJtrGXJWxEEcWnmyoypu0w@mail.gmail.com>

On Thu, Dec 22, 2022 at 11:52:27AM -0800, Nick Desaulniers wrote:
> On Thu, Dec 22, 2022 at 11:30 AM Nathan Chancellor <nathan@kernel.org> wrote:
> >
> > Commit 1d2e9b67b001 ("ARM: 9265/1: pass -march= only to compiler") added
> > a __thumb2__ define to ASFLAGS to avoid build errors in the crypto code,
> > which relies on __thumb2__ for preprocessing. Commit 59e2cf8d21e0 ("ARM:
> > 9275/1: Drop '-mthumb' from AFLAGS_ISA") followed up on this by removing
> > -mthumb from AFLAGS so that __thumb2__ would not be defined when the
> > default target was ARMv7 or newer.
> >
> > Unfortunately, the second commit's fix assumes that the toolchain
> > defaults to -mno-thumb / -marm, which is not the case for Debian's
> > arm-linux-gnueabihf target, which defaults to -mthumb:
> >
> >   $ echo | arm-linux-gnueabihf-gcc -dM -E - | grep __thumb
> >   #define __thumb2__ 1
> >   #define __thumb__ 1
> 
> Interesting, that was hard to foresee in review of 1d2e9b67b001 and
> 59e2cf8d21e0.
> 
> FWIW, their non-hf target does not.
> $ echo | arm-linux-gnueabi-gcc -dM -E - | grep __thumb
> $
> 
> >
> > This target is used by several CI systems, which will still see
> > redefined macro warnings, despite '-mthumb' not being present in the
> > flags:
> >
> >   <command-line>: warning: "__thumb2__" redefined
> >   <built-in>: note: this is the location of the previous definition
> >
> > Remove the global AFLAGS __thumb2__ define and move it to the crypto
> > folder where it is required by the imported OpenSSL algorithms; the rest
> > of the kernel should use the internal CONFIG_THUMB2_KERNEL symbol to
> > know whether or not Thumb2 is being used or not. Be sure that __thumb2__
> > is undefined first so that there are no macro redefinition warnings.
> >
> > Link: https://github.com/ClangBuiltLinux/linux/issues/1772
> > Reported-by: "kernelci.org bot" <bot@kernelci.org>
> > Suggested-by: Ard Biesheuvel <ardb@kernel.org>
> > Signed-off-by: Nathan Chancellor <nathan@kernel.org>
> 
> Thanks Nathan and Ard.

Shouldn't this also have a fixes tag?

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2023-01-23 10:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-22 19:30 [PATCH] ARM: Reduce __thumb2__ definition to crypto files that require it Nathan Chancellor
2022-12-22 19:52 ` Nick Desaulniers
2023-01-23 10:48   ` Russell King (Oracle) [this message]
2023-01-23 14:12     ` Nathan Chancellor

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=Y85l+E22PJ8lhmcN@shell.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=ardb@kernel.org \
    --cc=arnd@arndb.de \
    --cc=bot@kernelci.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nathan@kernel.org \
    --cc=ndesaulniers@google.com \
    /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;
as well as URLs for NNTP newsgroup(s).