linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v5 0/2] riscv: Use Kconfig to set unaligned access speed
@ 2024-02-27 23:13 Charlie Jenkins
  2024-02-27 23:13 ` [PATCH v5 1/2] riscv: lib: Introduce has_fast_unaligned_access function Charlie Jenkins
  2024-02-27 23:13 ` [PATCH v5 2/2] riscv: Set unaligned access speed at compile time Charlie Jenkins
  0 siblings, 2 replies; 10+ messages in thread
From: Charlie Jenkins @ 2024-02-27 23:13 UTC (permalink / raw)
  To: Paul Walmsley, Palmer Dabbelt, Albert Ou, Jisheng Zhang,
	Evan Green, Clément Léger, Eric Biggers, Elliot Berman,
	Charles Lohr, Conor Dooley
  Cc: linux-riscv, linux-kernel, Charlie Jenkins

If the hardware unaligned access speed is known at compile time, it is
possible to avoid running the unaligned access speed probe to speedup
boot-time.

Signed-off-by: Charlie Jenkins <charlie@rivosinc.com>
---
Changes in v5:
- Clarify Kconfig options from Conor's feedback
- Use "unaligned" instead of "misaligned" in introduced file/function.
  This is a bit hard to standardize because the riscv manual says
  "misaligned" but the existing Linux configs say "unaligned".
- Link to v4: https://lore.kernel.org/r/20240216-disable_misaligned_probe_config-v4-0-dc01e581c0ac@rivosinc.com

Changes in v4:
- Add additional Kconfig options for the other unaligned access speeds
- Link to v3: https://lore.kernel.org/r/20240202-disable_misaligned_probe_config-v3-0-c44f91f03bb6@rivosinc.com

Changes in v3:
- Revert change to csum (Eric)
- Change ifndefs for ifdefs (Eric)
- Change config in Makefile (Elliot/Eric)
- Link to v2: https://lore.kernel.org/r/20240201-disable_misaligned_probe_config-v2-0-77c368bed7b2@rivosinc.com

Changes in v2:
- Move around definitions to reduce ifdefs (Clément)
- Make RISCV_MISALIGNED depend on !HAVE_EFFICIENT_UNALIGNED_ACCESS
  (Clément)
- Link to v1: https://lore.kernel.org/r/20240131-disable_misaligned_probe_config-v1-0-98d155e9cda8@rivosinc.com

---
Charlie Jenkins (2):
      riscv: lib: Introduce has_fast_unaligned_access function
      riscv: Set unaligned access speed at compile time

 arch/riscv/Kconfig                        |  47 +++++-
 arch/riscv/include/asm/cpufeature.h       |  43 ++++-
 arch/riscv/kernel/Makefile                |   6 +-
 arch/riscv/kernel/cpufeature.c            | 255 ------------------------------
 arch/riscv/kernel/probe_emulated_access.c |  64 ++++++++
 arch/riscv/kernel/sys_hwprobe.c           |  23 +++
 arch/riscv/kernel/traps_misaligned.c      |  54 +------
 arch/riscv/lib/csum.c                     |   7 +-
 8 files changed, 173 insertions(+), 326 deletions(-)
---
base-commit: 6613476e225e090cc9aad49be7fa504e290dd33d
change-id: 20240131-disable_misaligned_probe_config-043aea375f93
-- 
- Charlie


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

end of thread, other threads:[~2024-03-01  9:28 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-27 23:13 [PATCH v5 0/2] riscv: Use Kconfig to set unaligned access speed Charlie Jenkins
2024-02-27 23:13 ` [PATCH v5 1/2] riscv: lib: Introduce has_fast_unaligned_access function Charlie Jenkins
2024-02-27 23:13 ` [PATCH v5 2/2] riscv: Set unaligned access speed at compile time Charlie Jenkins
2024-02-28 10:43   ` Conor Dooley
2024-02-29 14:47     ` Conor Dooley
2024-02-29 12:26   ` Conor Dooley
2024-02-29 18:37     ` Charlie Jenkins
2024-02-29 18:49       ` Conor Dooley
2024-02-29 19:23         ` Charlie Jenkins
2024-03-01  9:26           ` Conor Dooley

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