devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/6] RISC-V: Detect and report speed of unaligned vector accesses
@ 2024-06-13 19:16 Jesse Taube
  2024-06-13 19:16 ` [PATCH v2 1/6] RISC-V: Add Zicclsm to cpufeature and hwprobe Jesse Taube
                   ` (5 more replies)
  0 siblings, 6 replies; 34+ messages in thread
From: Jesse Taube @ 2024-06-13 19:16 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 (6):
  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: 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                            |  59 +++++++
 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                    |   7 +-
 arch/riscv/kernel/copy-unaligned.h            |   5 +
 arch/riscv/kernel/cpufeature.c                |   1 +
 arch/riscv/kernel/sys_hwprobe.c               |  48 ++++++
 arch/riscv/kernel/traps_misaligned.c          | 142 +++++++++++++---
 arch/riscv/kernel/unaligned_access_speed.c    | 154 +++++++++++++++++-
 arch/riscv/kernel/vec-copy-unaligned.S        |  58 +++++++
 arch/riscv/kernel/vector.c                    |   2 +-
 17 files changed, 484 insertions(+), 46 deletions(-)
 create mode 100644 arch/riscv/kernel/vec-copy-unaligned.S

-- 
2.43.0


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

end of thread, other threads:[~2024-06-24 16:58 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-13 19:16 [PATCH v2 0/6] RISC-V: Detect and report speed of unaligned vector accesses Jesse Taube
2024-06-13 19:16 ` [PATCH v2 1/6] RISC-V: Add Zicclsm to cpufeature and hwprobe Jesse Taube
2024-06-14  8:09   ` Conor Dooley
2024-06-17  3:18     ` Andy Chiu
2024-06-13 19:16 ` [PATCH v2 2/6] dt-bindings: riscv: Add Zicclsm ISA extension description Jesse Taube
2024-06-14  8:06   ` Conor Dooley
2024-06-13 19:16 ` [PATCH v2 3/6] RISC-V: Check scalar unaligned access on all CPUs Jesse Taube
2024-06-14  8:22   ` Conor Dooley
2024-06-17 23:56     ` Charlie Jenkins
2024-06-13 19:16 ` [PATCH v2 4/6] RISC-V: Detect unaligned vector accesses supported Jesse Taube
2024-06-14  8:36   ` Conor Dooley
2024-06-14  8:40     ` Conor Dooley
2024-06-14 14:28       ` Jesse Taube
2024-06-14 14:32         ` Conor Dooley
2024-06-17 16:39   ` Charlie Jenkins
2024-06-18  1:43   ` Charlie Jenkins
2024-06-18  2:09     ` Charlie Jenkins
2024-06-20 21:31       ` Jesse Taube
2024-06-20 22:14         ` Charlie Jenkins
2024-06-20 23:08           ` Jesse Taube
2024-06-21 10:06           ` Conor Dooley
2024-06-21 17:18             ` Charlie Jenkins
2024-06-21 17:58               ` Eric Biggers
2024-06-21 18:02                 ` Conor Dooley
2024-06-21 18:07               ` Jesse Taube
2024-06-22 11:42                 ` Conor Dooley
2024-06-20 18:51   ` Evan Green
2024-06-24  5:34     ` Andy Chiu
2024-06-24 16:57       ` Evan Green
2024-06-13 19:16 ` [PATCH v2 5/6] RISC-V: Report vector unaligned access speed hwprobe Jesse Taube
2024-06-20 18:51   ` Evan Green
2024-06-13 19:16 ` [PATCH v2 6/6] RISC-V: hwprobe: Document unaligned vector perf key Jesse Taube
2024-06-20 18:51   ` Evan Green
2024-06-21 18:30     ` Jesse Taube

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).