diff options
author | Charlie Jenkins <[email protected]> | 2024-03-08 10:25:56 -0800 |
---|---|---|
committer | Palmer Dabbelt <[email protected]> | 2024-03-13 07:30:29 -0700 |
commit | 313130c62cf1fc410ac8730b291fd4fde582d032 (patch) | |
tree | 3a8025d730d0110d1476c147994267821dfc8e2c | |
parent | 5a83e7313ee115d955d4b7834d33ff4d5a46ab37 (diff) |
riscv: Only check online cpus for emulated accesses
The unaligned access checker only sets valid values for online cpus.
Check for these values on online cpus rather than on present cpus.
Signed-off-by: Charlie Jenkins <[email protected]>
Reviewed-by: Conor Dooley <[email protected]>
Fixes: 71c54b3d169d ("riscv: report misaligned accesses emulation to hwprobe")
Tested-by: Samuel Holland <[email protected]>
Link: https://lore.kernel.org/r/20240308-disable_misaligned_probe_config-v9-2-a388770ba0ce@rivosinc.com
Signed-off-by: Palmer Dabbelt <[email protected]>
-rw-r--r-- | arch/riscv/kernel/traps_misaligned.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/riscv/kernel/traps_misaligned.c b/arch/riscv/kernel/traps_misaligned.c index 8ded225e8c5b..c2ed4e689bf9 100644 --- a/arch/riscv/kernel/traps_misaligned.c +++ b/arch/riscv/kernel/traps_misaligned.c @@ -632,7 +632,7 @@ void unaligned_emulation_finish(void) * accesses emulated since tasks requesting such control can run on any * CPU. */ - for_each_present_cpu(cpu) { + for_each_online_cpu(cpu) { if (per_cpu(misaligned_access_speed, cpu) != RISCV_HWPROBE_MISALIGNED_EMULATED) { return; |