All of lore.kernel.org
 help / color / mirror / Atom feed
From: George Pee <georgepee@gmail.com>
To: Catalin Marinas <catalin.marinas@arm.com>
Cc: Russell King <linux@armlinux.org.uk>,
	"Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>,
	"Kirill A. Shutemov" <kirill.shtuemov@linux.intel.com>,
	Austin Kim <austindh.kim@gmail.com>,
	Ard Biesheuvel <ardb@kernel.org>, Mike Rapoport <rppt@kernel.org>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Report support for optional ARMv8.2 half-precision floating point extension
Date: Fri, 9 Sep 2022 08:35:07 -0500	[thread overview]
Message-ID: <CAKj0CMs5S8RWJ6FU8wGda8fZzoFZCxjCQ6=dgz1pX-v2D+p6tw@mail.gmail.com> (raw)
In-Reply-To: <Yxsl5PaioteeAcnh@arm.com>

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

WARNING: multiple messages have this Message-ID (diff)
From: George Pee <georgepee@gmail.com>
To: Catalin Marinas <catalin.marinas@arm.com>
Cc: Russell King <linux@armlinux.org.uk>,
	 "Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>,
	 "Kirill A. Shutemov" <kirill.shtuemov@linux.intel.com>,
	Austin Kim <austindh.kim@gmail.com>,
	 Ard Biesheuvel <ardb@kernel.org>,
	Mike Rapoport <rppt@kernel.org>,
	linux-arm-kernel@lists.infradead.org,
	 linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Report support for optional ARMv8.2 half-precision floating point extension
Date: Fri, 9 Sep 2022 08:35:07 -0500	[thread overview]
Message-ID: <CAKj0CMs5S8RWJ6FU8wGda8fZzoFZCxjCQ6=dgz1pX-v2D+p6tw@mail.gmail.com> (raw)
In-Reply-To: <Yxsl5PaioteeAcnh@arm.com>

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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2022-09-09 13:35 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-01 14:13 [PATCH] Report support for optional ARMv8.2 half-precision floating point extension george pee
2022-09-01 14:13 ` george pee
2022-09-09 11:39 ` Catalin Marinas
2022-09-09 11:39   ` Catalin Marinas
2022-09-09 13:35   ` George Pee [this message]
2022-09-09 13:35     ` George Pee
2022-09-09 12:46 ` Robin Murphy
2022-09-09 12:46   ` Robin Murphy
2022-09-09 13:34   ` George Pee
2022-09-09 13:34     ` George Pee
2022-09-09 14:07     ` Catalin Marinas
2022-09-09 14:07       ` Catalin Marinas
2022-09-09 14:57       ` George Pee
2022-09-09 14:57         ` George Pee
2022-09-09 15:05         ` Catalin Marinas
2022-09-09 15:05           ` Catalin Marinas
2022-09-12 13:05           ` Russell King (Oracle)
2022-09-12 13:05             ` Russell King (Oracle)
2022-09-12 18:09             ` George Pee
2022-09-12 18:09               ` George Pee
2022-09-09 14:17     ` Robin Murphy
2022-09-09 14:17       ` Robin Murphy
2022-09-09 14:54       ` George Pee
2022-09-09 14:54         ` George Pee

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='CAKj0CMs5S8RWJ6FU8wGda8fZzoFZCxjCQ6=dgz1pX-v2D+p6tw@mail.gmail.com' \
    --to=georgepee@gmail.com \
    --cc=ardb@kernel.org \
    --cc=austindh.kim@gmail.com \
    --cc=catalin.marinas@arm.com \
    --cc=kirill.shtuemov@linux.intel.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=rmk+kernel@armlinux.org.uk \
    --cc=rppt@kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.