riscv: don't probe unaligned access speed if already done
authorJisheng Zhang <jszhang@kernel.org>
Tue, 12 Sep 2023 15:40:40 +0000 (23:40 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 10 Jan 2024 16:16:56 +0000 (17:16 +0100)
commitb649a7fe9a8b41a01b608e129a90af09d4b5f52f
tree0a0cd1021f7488a287b15997473580e3d72db3e1
parent5d1e4e5fd1e91af95d25a032e5ad893bb9699929
riscv: don't probe unaligned access speed if already done

[ Upstream commit c20d36cc2a2073d4cdcda92bd7a1bb9b3b3b7c79 ]

If misaligned_access_speed percpu var isn't so called "HWPROBE
MISALIGNED UNKNOWN", it means the probe has happened(this is possible
for example, hotplug off then hotplug on one cpu), and the percpu var
has been set, don't probe again in this case.

Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
Fixes: 584ea6564bca ("RISC-V: Probe for unaligned access speed")
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/20230912154040.3306-1-jszhang@kernel.org
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/riscv/kernel/cpufeature.c