[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240201-disable_misaligned_probe_config-v2-0-77c368bed7b2@rivosinc.com>
Date: Thu, 01 Feb 2024 15:30:44 -0800
From: Charlie Jenkins <charlie@...osinc.com>
To: Paul Walmsley <paul.walmsley@...ive.com>,
Palmer Dabbelt <palmer@...belt.com>, Albert Ou <aou@...s.berkeley.edu>,
Jisheng Zhang <jszhang@...nel.org>, Evan Green <evan@...osinc.com>,
Clément Léger <cleger@...osinc.com>
Cc: linux-riscv@...ts.infradead.org, linux-kernel@...r.kernel.org,
Charlie Jenkins <charlie@...osinc.com>
Subject: [PATCH v2 0/2] riscv: Use CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS
to set misaligned access speed
If CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS is enabled, no time needs to
be spent in the misaligned access speed probe. Disable the probe in this
case and set respective uses to "fast" misaligned accesses. On riscv,
this config is selected if RISCV_EFFICIENT_UNALIGNED_ACCESS is selected,
which is dependent on NONPORTABLE.
Signed-off-by: Charlie Jenkins <charlie@...osinc.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_misaligned_access function
riscv: Disable misaligned access probe when CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS
arch/riscv/Kconfig | 1 +
arch/riscv/include/asm/cpufeature.h | 22 +-
arch/riscv/include/asm/misaligned_access_speed.h | 29 +++
arch/riscv/kernel/Makefile | 3 +
arch/riscv/kernel/cpufeature.c | 255 ----------------------
arch/riscv/kernel/misaligned_access_speed.c | 265 +++++++++++++++++++++++
arch/riscv/kernel/sys_hwprobe.c | 4 +
arch/riscv/lib/csum.c | 7 +-
8 files changed, 321 insertions(+), 265 deletions(-)
---
base-commit: 6613476e225e090cc9aad49be7fa504e290dd33d
change-id: 20240131-disable_misaligned_probe_config-043aea375f93
--
- Charlie
Powered by blists - more mailing lists