From: mka@chromium.org (Matthias Kaehlcke)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm/arm64: smccc: Use xN for arm64 register constraints with clang
Date: Thu, 22 Mar 2018 16:58:11 -0700 [thread overview]
Message-ID: <20180322235811.GC78232@google.com> (raw)
In-Reply-To: <fc921bfb-1f49-08f9-515c-07bd442a1e11@google.com>
El Thu, Mar 22, 2018 at 04:19:42PM -0700 Greg Hackmann ha dit:
> On 03/22/2018 03:44 PM, Matthias Kaehlcke wrote:
> > El Thu, Mar 22, 2018 at 10:26:18PM +0000 Nick Desaulniers ha dit:
> >
> >> Note that a patch in this form has previously been implemented by:
> >>
> >> Andrey Konovalov <andreyknvl@google.com>:
> >> https://gist.github.com/xairy/ee11682ea86044a45c0291c528cd936f
> >>
> >> and another by:
> >>
> >> Greg Hackmann <ghackmann@google.com>:
> >> https://android-review.googlesource.com/c/kernel/common/+/645181
> >>
> >> If you used either as a reference, you may want to credit them with a
> >> `Suggested-by:` in the commit message.
> >
> > Not really, but I think I prefer Greg's version over mine and might
> > use it in a respin if nobody raises objections.
>
> NAK. There's a reason I didn't send my change upstream.
>
> As Marc pointed out (https://lkml.org/lkml/2018/3/16/987), the "r"
> prefix tells gcc to pick the appropriate register width. "x" makes it
> unconditionally use the entire 64-bit register width. Just swapping out
> one for the other changes the macro's semantics.
>
> Unfortunately since this was breaking builds in android-4.14 and we
> didn't have an immediate-term fix, I bit the bullet and added the above
> commit -- but *only* as a short-term workaround. For the one caller we
> currently have in 4.14.y, gcc was using the entire 64-bit width for all
> its inputs anyway, so "r" vs. "x" didn't make a difference. But that
> might not be true if/when someone introduces other SMCCC 1.1 callers.
>
> Unfortunately I don't see a better way to deal with this than waiting
> for clang to support "r"-style constraints on ARM64.
Thanks for the clarification! From the other thread
(https://lkml.org/lkml/2018/3/1/268) I had the impression that ARM
folks saw the option of a mergeable fix.
Given the fact that clang support for kernel builds is still
recent/WIP I guess it's not the end of the world if we have to raise
the minimum clang version to 7.x for newer kernels.
next prev parent reply other threads:[~2018-03-22 23:58 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-22 21:27 [PATCH] arm/arm64: smccc: Use xN for arm64 register constraints with clang Matthias Kaehlcke
2018-03-22 22:26 ` Nick Desaulniers
2018-03-22 22:44 ` Matthias Kaehlcke
2018-03-22 23:19 ` Greg Hackmann
2018-03-22 23:58 ` Matthias Kaehlcke [this message]
2018-04-05 18:43 ` Nick Desaulniers
2018-04-05 19:21 ` Matthias Kaehlcke
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=20180322235811.GC78232@google.com \
--to=mka@chromium.org \
--cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).