riscv: Set unaligned access speed at compile time
authorCharlie Jenkins <charlie@rivosinc.com>
Fri, 8 Mar 2024 18:25:58 +0000 (10:25 -0800)
committerPalmer Dabbelt <palmer@rivosinc.com>
Wed, 13 Mar 2024 14:30:31 +0000 (07:30 -0700)
commitf413aae96cda059635910c462ede0a8f0385897c
tree9422f48bf32e0773bcb23fbd183a6d3989e72d76
parent6e5ce7f2eae3c7c36dd1709efaac34820a34d538
riscv: Set unaligned access speed at compile time

Introduce Kconfig options to set the kernel unaligned access support.
These options provide a non-portable alternative to the runtime
unaligned access probe.

To support this, the unaligned access probing code is moved into it's
own file and gated behind a new RISCV_PROBE_UNALIGNED_ACCESS_SUPPORT
option.

Signed-off-by: Charlie Jenkins <charlie@rivosinc.com>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Tested-by: Samuel Holland <samuel.holland@sifive.com>
Link: https://lore.kernel.org/r/20240308-disable_misaligned_probe_config-v9-4-a388770ba0ce@rivosinc.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
arch/riscv/Kconfig
arch/riscv/include/asm/cpufeature.h
arch/riscv/kernel/Makefile
arch/riscv/kernel/cpufeature.c
arch/riscv/kernel/sys_hwprobe.c
arch/riscv/kernel/traps_misaligned.c
arch/riscv/kernel/unaligned_access_speed.c [new file with mode: 0644]