[PATCH] Report support for optional ARMv8.2 half-precision floating point extension

Catalin Marinas catalin.marinas at arm.com
Fri Sep 9 04:39:16 PDT 2022


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 at arm.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



More information about the linux-arm-kernel mailing list