mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: george pee <georgepee@gmail.com>,
	Russell King <linux@armlinux.org.uk>,
	Ard Biesheuvel <ardb@kernel.org>,
	"Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>,
	Nicolas Pitre <nico@fluxnic.net>,
	Keith Packard <keithpac@amazon.com>,
	Austin Kim <austindh.kim@gmail.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] ARM : Support for optional ARMv8.2 half-precision floating point extension
Date: Thu, 3 Nov 2022 16:59:00 +0000	[thread overview]
Message-ID: <Y2PzVOzuuKU7r6Lz@sirena.org.uk> (raw)
In-Reply-To: <CACRpkdY96uPTKgxK_LkQjTuqtd3GU=VYmGDg1zWqsyoxo0Twog@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1618 bytes --]

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@gmail.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.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

      reply	other threads:[~2022-11-03 16:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-12 13:24 george pee
2022-11-03 13:40 ` George Pee
2022-11-03 16:18 ` Linus Walleij
2022-11-03 16:59   ` Mark Brown [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=Y2PzVOzuuKU7r6Lz@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=ardb@kernel.org \
    --cc=austindh.kim@gmail.com \
    --cc=georgepee@gmail.com \
    --cc=keithpac@amazon.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=nico@fluxnic.net \
    --cc=rmk+kernel@armlinux.org.uk \
    /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

all inboxes | Powered by JetHome®