devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/8] RISC-V: Detect and report speed of unaligned vector accesses
@ 2024-06-25  0:49 Jesse Taube
  2024-06-25  0:49 ` [PATCH v3 1/8] RISC-V: Add Zicclsm to cpufeature and hwprobe Jesse Taube
                   ` (7 more replies)
  0 siblings, 8 replies; 26+ messages in thread
From: Jesse Taube @ 2024-06-25  0:49 UTC (permalink / raw)
  To: linux-riscv
  Cc: Jonathan Corbet, Paul Walmsley, Palmer Dabbelt, Albert Ou,
	Conor Dooley, Rob Herring, Krzysztof Kozlowski,
	Clément Léger, Evan Green, Andrew Jones, Jesse Taube,
	Charlie Jenkins, Xiao Wang, Andy Chiu, Eric Biggers, Greentime Hu,
	Björn Töpel, Heiko Stuebner, Costa Shulyupin,
	Andrew Morton, Baoquan He, Anup Patel, Zong Li, Sami Tolvanen,
	Ben Dooks, Alexandre Ghiti, Gustavo A. R. Silva, Erick Archer,
	Joel Granados, linux-doc, linux-kernel, devicetree

Adds support for detecting and reporting the speed of unaligned vector
accesses on RISC-V CPUs. Adds vec_misaligned_speed key to the hwprobe
adds Zicclsm to cpufeature and fixes the check for scalar unaligned
emulated all CPUs. The vec_misaligned_speed key keeps the same format
as the scalar unaligned access speed key.

This set does not emulate unaligned vector accesses on CPUs that do not
support them. Only reports if userspace can run them and speed of
unaligned vector accesses if supported.

If Zicclsm is present, the kernel will set both scalar and vector unaligned access speed to FAST.

This patch requires the following patche to be applied first:
RISC-V: fix vector insn load/store width mask
https://lore.kernel.org/all/20240606182800.415831-1-jesse@rivosinc.com/

Jesse Taube (8):
  RISC-V: Add Zicclsm to cpufeature and hwprobe
  dt-bindings: riscv: Add Zicclsm ISA extension description.
  RISC-V: Check scalar unaligned access on all CPUs
  RISC-V: Check Zicclsm to set unaligned access speed
  RISC-V: Replace RISCV_MISALIGNED with RISCV_SCALAR_MISALIGNED
  RISC-V: Detect unaligned vector accesses supported
  RISC-V: Report vector unaligned access speed hwprobe
  RISC-V: hwprobe: Document unaligned vector perf key

 Documentation/arch/riscv/hwprobe.rst          |  19 +++
 .../devicetree/bindings/riscv/extensions.yaml |   7 +
 arch/riscv/Kconfig                            |  57 ++++++-
 arch/riscv/include/asm/cpufeature.h           |   7 +-
 arch/riscv/include/asm/entry-common.h         |  11 --
 arch/riscv/include/asm/hwcap.h                |   1 +
 arch/riscv/include/asm/hwprobe.h              |   2 +-
 arch/riscv/include/asm/vector.h               |   1 +
 arch/riscv/include/uapi/asm/hwprobe.h         |   6 +
 arch/riscv/kernel/Makefile                    |   3 +-
 arch/riscv/kernel/copy-unaligned.h            |   5 +
 arch/riscv/kernel/cpufeature.c                |   1 +
 arch/riscv/kernel/fpu.S                       |   4 +-
 arch/riscv/kernel/sys_hwprobe.c               |  42 +++++
 arch/riscv/kernel/traps_misaligned.c          | 143 +++++++++++++---
 arch/riscv/kernel/unaligned_access_speed.c    | 159 +++++++++++++++++-
 arch/riscv/kernel/vec-copy-unaligned.S        |  58 +++++++
 arch/riscv/kernel/vector.c                    |   2 +-
 18 files changed, 480 insertions(+), 48 deletions(-)
 create mode 100644 arch/riscv/kernel/vec-copy-unaligned.S

-- 
2.45.2


^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2024-07-11 20:36 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-25  0:49 [PATCH v3 0/8] RISC-V: Detect and report speed of unaligned vector accesses Jesse Taube
2024-06-25  0:49 ` [PATCH v3 1/8] RISC-V: Add Zicclsm to cpufeature and hwprobe Jesse Taube
2024-06-26 14:41   ` Conor Dooley
2024-06-25  0:49 ` [PATCH v3 2/8] dt-bindings: riscv: Add Zicclsm ISA extension description Jesse Taube
2024-06-25  0:49 ` [PATCH v3 3/8] RISC-V: Check scalar unaligned access on all CPUs Jesse Taube
2024-07-10 15:55   ` Evan Green
2024-07-11 20:25     ` Jesse Taube
2024-06-25  0:49 ` [PATCH v3 4/8] RISC-V: Check Zicclsm to set unaligned access speed Jesse Taube
2024-06-26 14:39   ` Conor Dooley
2024-06-27 21:20     ` Charlie Jenkins
2024-07-01  7:15       ` Clément Léger
2024-07-01 13:58         ` Conor Dooley
2024-07-01 14:20           ` Clément Léger
2024-07-02 22:22             ` Charlie Jenkins
2024-07-03  7:13               ` Clément Léger
2024-07-03 21:47                 ` Jesse Taube
2024-06-25  0:49 ` [PATCH v3 5/8] RISC-V: Replace RISCV_MISALIGNED with RISCV_SCALAR_MISALIGNED Jesse Taube
2024-06-26 14:39   ` Conor Dooley
2024-06-25  0:49 ` [PATCH v3 6/8] RISC-V: Detect unaligned vector accesses supported Jesse Taube
2024-07-01 15:13   ` Samuel Holland
2024-06-25  0:50 ` [PATCH v3 7/8] RISC-V: Report vector unaligned access speed hwprobe Jesse Taube
2024-07-01 22:51   ` Evan Green
2024-07-11 20:35     ` Jesse Taube
2024-06-25  0:50 ` [PATCH v3 8/8] RISC-V: hwprobe: Document unaligned vector perf key Jesse Taube
2024-06-26 14:37   ` Conor Dooley
2024-07-01 22:55   ` Evan Green

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).