From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: ARM atomics overhaul for musl
Date: Tue, 18 Nov 2014 19:19:36 +0000 [thread overview]
Message-ID: <20141118191936.GE4042@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <20141118181425.GY18842@arm.com>
On Tue, Nov 18, 2014 at 06:14:25PM +0000, Will Deacon wrote:
> The only way I can see hwcap working is if we follow what the architecture
> allows for in ARMv8, which is 4 bits per feature over (currently) around
> 10 32-bit registers. That would mean potentially exposing 1280 hwcaps,
> which is clearly insane.
Exactly my argument, which got called "rediculous" ! I'm glad that
someone with a similar visibility of the problem has come to the
same conclusion that I did.
> We've done a bit better with the crypto extensions, where we provide
> fine-grained sha1, sha2 etc hwcaps, but this is based on the relavant 4-bit
> fields in ISAR5 being positive values. I can't find any architectural
> guarantees that this will work on future cores (e.g. bumping the 4-bit
> field to indicate a subset of previous functionality).
This is the big problem. An example of this is the barrier bits, which
indicate whether dmb & dsb are present or not. It's not a single bit,
but a group of four. If we provide a single bit for dmb, and another
for dsb (to cater for a future possibility that dmb or dsb may be
separately indicated by a future 4-bit binary pattern), that's fine,
but should we then list every instruction which is conditional on any
ISAR bit pattern? That becomes a /very/ big space indeed.
If we don't do this, and (eg) we use a single bit for both dmb and dsb,
what if a future bit pattern indicates that (eg) dmb is obsolete, but
dsb hasn't.
Contary to what others assert, this is not a trivial problem, and it's
not trivial to just add additional hwcap bits to solve it.
There's also the problem in /knowing/ what information to export to
userspace, before userspace knows that they need it... which is exactly
what's happened with DMB (and this is not the first time it's happened.)
I suspect this won't be the last time either.
--
FTTC broadband for 0.8mile line: currently at 9.5Mbps down 400kbps up
according to speedtest.net.
next prev parent reply other threads:[~2014-11-18 19:19 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-16 5:56 ARM atomics overhaul for musl Rich Felker
2014-11-16 16:33 ` Russell King - ARM Linux
2014-11-16 16:50 ` Rich Felker
2014-11-16 17:10 ` Russell King - ARM Linux
2014-11-16 18:27 ` Andy Lutomirski
2014-11-16 18:56 ` Rich Felker
2014-11-16 19:02 ` Rich Felker
2014-11-17 13:54 ` Catalin Marinas
2014-11-17 14:11 ` Szabolcs Nagy
2014-11-17 14:47 ` Catalin Marinas
2014-11-17 14:39 ` Russell King - ARM Linux
2014-11-17 15:26 ` Catalin Marinas
2014-11-17 15:47 ` Russell King - ARM Linux
2014-11-17 16:19 ` Catalin Marinas
2014-11-17 16:53 ` Russell King - ARM Linux
2014-11-17 17:48 ` Catalin Marinas
2014-11-17 17:38 ` Andy Lutomirski
2014-11-18 10:56 ` Catalin Marinas
2014-11-18 18:14 ` Will Deacon
2014-11-18 18:24 ` Andy Lutomirski
2014-11-18 19:19 ` Russell King - ARM Linux [this message]
2014-11-19 18:32 ` Catalin Marinas
2014-11-17 11:48 ` Catalin Marinas
2014-11-17 12:21 ` Arnd Bergmann
2014-11-17 13:30 ` Szabolcs Nagy
2014-11-17 14:34 ` Catalin Marinas
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=20141118191936.GE4042@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--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).