linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 0/4] arm64: advertise availability of CRC and crypto instructions
Date: Wed, 18 Dec 2013 10:03:22 +0000	[thread overview]
Message-ID: <20131218100321.GC4360@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <CAKv+Gu824T1vx=O9taLaDSB-HE3OLSpwnpWMn4z+x8YdmLuM+A@mail.gmail.com>

On Wed, Dec 18, 2013 at 10:50:38AM +0100, Ard Biesheuvel wrote:
> On 17 December 2013 13:25, Catalin Marinas <catalin.marinas@arm.com> wrote:
> > On Mon, Dec 16, 2013 at 09:04:34PM +0000, Ard Biesheuvel wrote:
> >> This series is an expansion of the patch posted by Steve Capper about 6 weeks
> >> ago that allocates hwcaps bits for CRC and Crypto Extensions instructions so
> >> userland can discover whether the current CPU has any of those capabilities.
> >>
> >> Patch #1 is a cleanup patch for read_cpuid(), which allowed me to skip adding
> >> yet another #define to asm/cputype.h (for ID_ISAR5_EL1)
> >>
> >> Patch #2 is Steve's original patch, but slightly tweaked because hwcaps bit 2
> >> has been allocated for something else in the mean time.
> >>
> >> Patch #3 allocates the capability bits in the arch/arm tree. This is necessary
> >> because 32-bit ARM binaries can execute both under ARM and under arm64 kernels,
> >> so there should be agreement about the meaning of feature bits, even if those
> >> features don't actually exist on systems covered by the arch/arm tree.
> >>
> >> @Russell: if this looks ok to you, could you please indicate whether you prefer
> >> to take this patch separately, or ack it and let it be merged as part of the
> >> series.
> >>
> >> Patch #4 advertises the CRC and Crypto Extensions to 32-bit binaries running
> >> under an arm64 kernel.
> >
> > The series look fine to me. I'm happy to take all the patches if Russell
> > Acks the arm one (or it can send it via the patch system).
> >
> 
> Hello Russell,
> 
> Care to share your take on this? I imagine new hwcaps bits take a
> while to percolate and make their way into a stable glibc, so I would
> like to have these changes in sooner rather than later, and 3.14 seems
> feasible.

I'm not all that happy as it gobbles up a load of bits in the hwcap that
will never be set for ARM, and we only have 32 of them (limited by the
size of elf_addr_t).  On ARM64, it's less of a problem because the hwcap
is 64-bit there.

If we allocate the ARM64 private never-will-appear-on-ARM hwcaps in bit
32 and above, they'll be hidden from 32-bit stuff.  Hopefully, glibc
doesn't concatenate the HWCAP and HWCAP2 fields though - someone should
check that.

Since the bits in the ARM64 hwcap are different from the ARM32 hwcap, I
don't see any point in defining them for ARM32 - userspace needs to make
the definition conditional anyway, and can't interpret the bits as-is
because ARM64 already omits many of the ARM32 ones.

  reply	other threads:[~2013-12-18 10:03 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-16 21:04 [PATCH 0/4] arm64: advertise availability of CRC and crypto instructions Ard Biesheuvel
2013-12-16 21:04 ` [PATCH 1/4] arm64: drop redundant macros from read_cpuid() Ard Biesheuvel
2013-12-17 12:04   ` Catalin Marinas
2013-12-17 12:10     ` Will Deacon
2013-12-17 12:12       ` Catalin Marinas
2013-12-16 21:04 ` [PATCH 2/4] arm64: Add hwcaps for crypto and CRC32 extensions Ard Biesheuvel
2013-12-17 12:08   ` Catalin Marinas
2013-12-17 12:11     ` Catalin Marinas
2013-12-16 21:04 ` [PATCH 3/4] ARM: allocate hwcaps bits for v8 crypto extensions Ard Biesheuvel
2013-12-16 21:04 ` [PATCH 4/4] arm64: add 32-bit compat hwcaps " Ard Biesheuvel
2013-12-17 12:25 ` [PATCH 0/4] arm64: advertise availability of CRC and crypto instructions Catalin Marinas
2013-12-18  9:50   ` Ard Biesheuvel
2013-12-18 10:03     ` Russell King - ARM Linux [this message]
2013-12-18 10:25       ` Ard Biesheuvel
2013-12-18 10:55         ` Russell King - ARM Linux
2013-12-18 11:15           ` Ard Biesheuvel
2013-12-18 11:27             ` Catalin Marinas
2013-12-18 11:34               ` Catalin Marinas
2013-12-18 11:42               ` Russell King - ARM Linux
2013-12-18 11:59                 ` Ard Biesheuvel
2013-12-18 12:03                 ` Catalin Marinas
2013-12-18 14:27                   ` Christopher Covington
2013-12-18 16:13                     ` Ard Biesheuvel
2013-12-18 17:29                       ` Catalin Marinas
2013-12-18 18:50                         ` Ard Biesheuvel
2013-12-19 11:11                           ` Catalin Marinas
2013-12-18 19:57                       ` Nicolas Pitre
2013-12-18 20:26                         ` Ard Biesheuvel
2013-12-18 21:18                           ` Nicolas Pitre
2013-12-18 21:57                             ` Ard Biesheuvel
2013-12-19  6:48                               ` Siarhei Siamashka
2013-12-19 11:48                                 ` Catalin Marinas
2013-12-20  6:29                                   ` Siarhei Siamashka
2013-12-20 11:27                                     ` Catalin Marinas
2013-12-19 17:33                                 ` Ard Biesheuvel
2013-12-20  1:35                                   ` Siarhei Siamashka
2013-12-19 18:07                               ` Nicolas Pitre

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=20131218100321.GC4360@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).