diff options
author | 2025-03-12 22:19:51 -0400 | |
---|---|---|
committer | 2025-04-29 15:58:37 -0400 | |
commit | e5bf9a4b68fae70e41d1410656490d8ac00c02fe (patch) | |
tree | 6ed18d2d87182b63c4922164ab10a43563af2477 | |
parent | cpumask: add non-atomic __assign_cpu() (diff) | |
download | linux-rng-e5bf9a4b68fae70e41d1410656490d8ac00c02fe.tar.xz linux-rng-e5bf9a4b68fae70e41d1410656490d8ac00c02fe.zip |
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: 7c1e5b9690b0e14 ("riscv: Disable preemption while handling PR_RISCV_CTX_SW_FENCEI_OFF")
Signed-off-by: Yury Norov [NVIDIA] <yury.norov@gmail.com>
-rw-r--r-- | arch/riscv/mm/cacheflush.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/riscv/mm/cacheflush.c b/arch/riscv/mm/cacheflush.c index b81672729887..b8e96dfff19d 100644 --- a/arch/riscv/mm/cacheflush.c +++ b/arch/riscv/mm/cacheflush.c @@ -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 |