Skip to content

Commit 313130c

Browse files
charlie-rivospalmer-dabbelt
authored andcommitted
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 <charlie@rivosinc.com> Reviewed-by: Conor Dooley <conor.dooley@microchip.com> Fixes: 71c54b3 ("riscv: report misaligned accesses emulation to hwprobe") Tested-by: Samuel Holland <samuel.holland@sifive.com> Link: https://lore.kernel.org/r/20240308-disable_misaligned_probe_config-v9-2-a388770ba0ce@rivosinc.com Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
1 parent 5a83e73 commit 313130c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/riscv/kernel/traps_misaligned.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -632,7 +632,7 @@ void unaligned_emulation_finish(void)
632632
* accesses emulated since tasks requesting such control can run on any
633633
* CPU.
634634
*/
635-
for_each_present_cpu(cpu) {
635+
for_each_online_cpu(cpu) {
636636
if (per_cpu(misaligned_access_speed, cpu) !=
637637
RISCV_HWPROBE_MISALIGNED_EMULATED) {
638638
return;

0 commit comments

Comments
 (0)