[PATCH 2/3] RISC-V: Detect unaligned vector accesses supported.

Conor Dooley conor at kernel.org
Fri Jun 7 14:21:19 PDT 2024


On Fri, Jun 07, 2024 at 02:06:27PM -0700, Charlie Jenkins wrote:
> On Fri, Jun 07, 2024 at 03:53:23PM -0400, Jesse Taube wrote:
> > On 6/6/24 19:13, Charlie Jenkins wrote:
> > > On Thu, Jun 06, 2024 at 02:29:23PM -0700, Charlie Jenkins wrote:
> > > > On Thu, Jun 06, 2024 at 02:32:14PM -0400, Jesse Taube wrote:

> > > > Please use the exising UNKNOWN terminology instead of renaming to
> > > > SUPPORTED. Any option that is not UNSUPPORTED implies that unaligned
> > > > accesses are supported.
> > 
> > Conor didnt like using UNKNOWN a proxy for "SUPPORTED"

I did say this, but in the context of wanting you to actually add the
performance probing (and potentially the other infrastructure that
Charlie added for scalar).

> > Having SUPPORTED is better then assuing the speed to be slow.
> 
> The HWPROBE key is about misaligned access performance. UNKNOWN means
> that the performance is unknown.

Right. I also don't think that assuming "slow" is even problematic -
seemingly all extant hardware doesn't even support misaligned access.
But really, just whack in the probing, it shouldn't be too bad, right?

> The scalar and vector names need to
> match up.

That's definitely not the case. A different hwprobe key is allowed to
behave differently, but...

> UNKNOWN was already merged and is supported by linux so if you
> want to use SUPPORTED here then you need to add a scalar SUPPORTED key
> that is an alias of the UNKNOWN key.

...this suggestion of a scalar change I disagree with anyway, so it's
moot. Unknown should be a state that we only have internally when we
actually do not know, and not something that userspace should ever see,
unless there's a bug in the probing code IMO. Unknown gives userspace no
actionable information anyways.

> I would rather keep UNKNOWN as it
> is, but that's up to you.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-riscv/attachments/20240607/041464d4/attachment.sig>


More information about the linux-riscv mailing list