Re: [PATCH 05/18] arm64: kbuild: reserve reg x18 from general allocation by the compiler
From: Ard Biesheuvel
Date: Mon Oct 21 2019 - 02:12:43 EST
On Fri, 18 Oct 2019 at 21:00, Sami Tolvanen <samitolvanen@xxxxxxxxxx> wrote:
> On Fri, Oct 18, 2019 at 10:32 AM 'Nick Desaulniers' via Clang Built
> Linux <clang-built-linux@xxxxxxxxxxxxxxxx> wrote:
> > > and remove the mention from
> > > the LL/SC compiler flag override.
> > was that cut/dropped from this patch?
> > >
> > > Link: https://patchwork.kernel.org/patch/9836881/
> > ^ Looks like it. Maybe it doesn't matter, but if sending a V2, maybe
> > the commit message to be updated?
> True. The original patch is from 2017 and the relevant part of
> arm64/lib/Makefile no longer exists. I'll update this accordingly.
> > I like how this does not conditionally reserve it based on the CONFIG
> > for SCS. Hopefully later patches don't wrap it, but I haven't looked
> > through all of them yet.
> In a later patch x18 is only reserved with SCS. I'm fine with dropping
> that patch and reserving it always, but wouldn't mind hearing thoughts
> from the maintainers about this first.
Why would you reserve x18 if SCS is disabled? Given that this is a
choice that is made at code generation time, there is no justification
for always reserving it, since it will never be used for anything. (Of
course, this applies to generated code only - .S files should simply
be updated to avoid x18 altogether)
Also, please combine this patch with the one that reserves it
conditionally, no point in having both in the same series.