[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 9 Sep 2022 08:35:07 -0500
From: George Pee <georgepee@...il.com>
To: Catalin Marinas <catalin.marinas@....com>
Cc: Russell King <linux@...linux.org.uk>,
"Russell King (Oracle)" <rmk+kernel@...linux.org.uk>,
"Kirill A. Shutemov" <kirill.shtuemov@...ux.intel.com>,
Austin Kim <austindh.kim@...il.com>,
Ard Biesheuvel <ardb@...nel.org>,
Mike Rapoport <rppt@...nel.org>,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Report support for optional ARMv8.2 half-precision
floating point extension
The use case is really being able to tell, from userspace on a 32-bit
kernel, if FPHP is supported. It's really just reporting for
convenience.
It wasn't clear to me why HWCAP2 was used in some cases and not
others. I can add FPHP to HWCAP2 if that's the right thing to do
here.
On Fri, Sep 9, 2022 at 6:39 AM Catalin Marinas <catalin.marinas@....com> wrote:
>
> On Thu, Sep 01, 2022 at 09:13:05AM -0500, george pee wrote:
> > Report as fphp to be consistent with arm64
>
> Do you have a use-case as well? It may help deciding what to do with
> this.
>
> > diff --git a/arch/arm/include/uapi/asm/hwcap.h b/arch/arm/include/uapi/asm/hwcap.h
> > index 990199d8b7c6..f975845ce5d3 100644
> > --- a/arch/arm/include/uapi/asm/hwcap.h
> > +++ b/arch/arm/include/uapi/asm/hwcap.h
> > @@ -28,6 +28,7 @@
> > #define HWCAP_IDIV (HWCAP_IDIVA | HWCAP_IDIVT)
> > #define HWCAP_LPAE (1 << 20)
> > #define HWCAP_EVTSTRM (1 << 21)
> > +#define HWCAP_FPHP (1 << 22)
>
> I think with ARMv8 features on the arm32 kernel we tend to add them to
> HWCAP2_*. With such change:
>
> Reviewed-by: Catalin Marinas <catalin.marinas@....com>
>
> I'll leave the decision to Russell on whether he wants this merged. An
> argument may be that people still want to run 32-bit user-space and even
> if they use am arm64 kernel, we can't add a COMPAT_HWCAP2_FPHP until we
> have the arm32 counterpart. An alternative may be to only add the uapi
> definition under arch/arm but without any functionality (so never
> exposed to user). The arm64 kernel could expose it to compat tasks.
>
> So, if Russell is ok with any of the options above, please also add the
> compat arm64 support ;).
>
> --
> Catalin
Powered by blists - more mailing lists