[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Y2PzVOzuuKU7r6Lz@sirena.org.uk>
Date: Thu, 3 Nov 2022 16:59:00 +0000
From: Mark Brown <broonie@...nel.org>
To: Linus Walleij <linus.walleij@...aro.org>
Cc: george pee <georgepee@...il.com>,
Russell King <linux@...linux.org.uk>,
Ard Biesheuvel <ardb@...nel.org>,
"Russell King (Oracle)" <rmk+kernel@...linux.org.uk>,
Nicolas Pitre <nico@...xnic.net>,
Keith Packard <keithpac@...zon.com>,
Austin Kim <austindh.kim@...il.com>,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] ARM : Support for optional ARMv8.2 half-precision
floating point extension
On Thu, Nov 03, 2022 at 05:18:21PM +0100, Linus Walleij wrote:
> Please CC Mark Brown om FP extensions, he is looking after these.
For arm64 anyway, though this is targetted at 32 bit kernels running on
v8 hardware so still somewhere around my wheelhouse.
> On Mon, Sep 12, 2022 at 3:25 PM george pee <georgepee@...il.com> wrote:
> > Report feature /proc/cpuinfo as fphp to be consistent with arm64
Well, more so that applications can discover and use this feature when
running on a system that has it in a way that's consistent with how they
might do this when running on arm64 kernels. It's also adding a hwcap
as well as updating /proc/cpuinfo.
> > index 990199d8b7c6..5d635dce8853 100644
> > --- a/arch/arm/include/uapi/asm/hwcap.h
> > +++ b/arch/arm/include/uapi/asm/hwcap.h
> > @@ -37,5 +37,6 @@
> > #define HWCAP2_SHA1 (1 << 2)
> > #define HWCAP2_SHA2 (1 << 3)
> > #define HWCAP2_CRC32 (1 << 4)
> > +#define HWCAP2_FPHP (1 << 5)
This is adding a hwcap for the feature in arm, if we're addding this we
should also do so for compat mode for arm64 (as a second patch in the
series probably). That will ensure that everything is consistent no
matter if the kernel is 32 or 64 bit.
> > + if ((fmrx(MVFR1) & 0x0f000000) == 0x03000000)
> > + elf_hwcap2 |= HWCAP2_FPHP;
I'm not super familiar with the 32 bit code here but the change looks
reasonable and seems to match up with how DDI0487I.a describes things,
arm64 checks ID_AA64PFR0_EL1.FPHP but there's also requirements which
mean that the 32 bit ID register MVFR1 be in sync with that.
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists