Skip to content

Commit 9c528b5

Browse files
Mr-Bossmanpalmer-dabbelt
authored andcommitted
RISC-V: Scalar unaligned access emulated on hotplug CPUs
The check_unaligned_access_emulated() function should have been called during CPU hotplug to ensure that if all CPUs had emulated unaligned accesses, the new CPU also does. This patch adds the call to check_unaligned_access_emulated() in the hotplug path. Fixes: 55e0bf4 ("RISC-V: Probe misaligned access speed in parallel") Signed-off-by: Jesse Taube <[email protected]> Reviewed-by: Evan Green <[email protected]> Cc: [email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Palmer Dabbelt <[email protected]>
1 parent 8d20a73 commit 9c528b5

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

arch/riscv/kernel/unaligned_access_speed.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@ static int riscv_online_cpu(unsigned int cpu)
191191
if (per_cpu(misaligned_access_speed, cpu) != RISCV_HWPROBE_MISALIGNED_SCALAR_UNKNOWN)
192192
goto exit;
193193

194+
check_unaligned_access_emulated(NULL);
194195
buf = alloc_pages(GFP_KERNEL, MISALIGNED_BUFFER_ORDER);
195196
if (!buf) {
196197
pr_warn("Allocation failure, not measuring misaligned performance\n");

0 commit comments

Comments
 (0)