Commit e5bf9a4b authored by Yury Norov's avatar Yury Norov
Browse files

riscv: switch set_icache_stale_mask() to using non-atomic assign_cpu()



The atomic cpumask_assign_cpu() follows non-atomic cpumask_setall(),
which makes the whole operation non-atomic. Fix this by relaxing to
non-atomic __assign_cpu().

Fixes: 7c1e5b96 ("riscv: Disable preemption while handling PR_RISCV_CTX_SW_FENCEI_OFF")
Signed-off-by: default avatarYury Norov [NVIDIA] <yury.norov@gmail.com>
parent 4923c2c5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -172,7 +172,7 @@ static void set_icache_stale_mask(void)
	stale_cpu = cpumask_test_cpu(cpu, mask);

	cpumask_setall(mask);
	cpumask_assign_cpu(cpu, mask, stale_cpu);
	__assign_cpu(cpu, mask, stale_cpu);
	put_cpu();
}
#endif