From: "Rémi Denis-Courmont" <remi@remlab.net>
To: linux-arm-kernel@lists.infradead.org
Cc: Mark Rutland <mark.rutland@arm.com>
Subject: Re: [PATCH] arm64: relax jump label ASM constraints
Date: Wed, 04 Mar 2020 15:37:12 +0200 [thread overview]
Message-ID: <2592563.ryHoOe0dYf@basile.remlab.net> (raw)
In-Reply-To: <20200304123932.GA3575@lakrids.cambridge.arm.com>
Hi,
Le keskiviikkona 4. maaliskuuta 2020, 14.39.33 EET Mark Rutland a écrit :
> On Wed, Mar 04, 2020 at 11:34:19AM +0200, Rémi Denis-Courmont wrote:
> > From: Remi Denis-Courmont <remi.denis.courmont@huawei.com>
> >
> > The static key address is stored in the jump label table. It needs to
> > be a run-time constant. However, it does not need to be a constant
> > suitable for expansion as an immediate value, given that it is
> > expanded in a full 64-bits (.quad) statement.
>
> I'm not sure that's quite true,
It it indeed not true. Some time elapsed between writing the patch and
describing it, and I'd forgetten the exact details in the mean time :$
What's actually happening is that the current constraint wants a constant, but
in reality, either a constant or a symbol is acceptable. In the later case,
the .quad will be a constant.
> since it's used in an expression
> evaluated by the assembler. IIRC the "%c0 - ." expression cannot be
> represented by an AArch64 ELF relocation.
Changing the constraint won't affect the ability or inability of the compiler
and linker to generate a relocation. In this case, the value is essentially an
offset and it just works either way.
> Have I missed something that 'S' allows that 'i' does not, or is there a
> functional problem today?
No. I don't remember exactly which compiler or compiler flags and kernel
configuration I was trying to notice the inconsistency. But it's only a latent
issue as far as I am aware.
--
Rémi Denis-Courmont
http://www.remlab.net/
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
prev parent reply other threads:[~2020-03-04 13:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-04 9:34 [PATCH] arm64: relax jump label ASM constraints Rémi Denis-Courmont
2020-03-04 12:39 ` Mark Rutland
2020-03-04 13:37 ` Rémi Denis-Courmont [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=2592563.ryHoOe0dYf@basile.remlab.net \
--to=remi@remlab.net \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=mark.rutland@arm.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).