diff options
author | Rik van Riel <[email protected]> | 2018-09-25 23:58:40 -0400 |
---|---|---|
committer | Peter Zijlstra <[email protected]> | 2018-10-09 16:51:11 +0200 |
commit | c3f7f2c7eba1a53d2e5ffbc2dcc9a20c5f094890 (patch) | |
tree | 5d44c63073ac248c29fa7708f7dee7bfe4ba8ba0 | |
parent | 12c4d978fd170ccdd7260ec11f93b11e46904228 (diff) |
smp: use __cpumask_set_cpu in on_each_cpu_cond
The code in on_each_cpu_cond sets CPUs in a locally allocated bitmask,
which should never be used by other CPUs simultaneously. There is no
need to use locked memory accesses to set the bits in this bitmap.
Switch to __cpumask_set_cpu.
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Suggested-by: Peter Zijlstra <[email protected]>
Signed-off-by: Rik van Riel <[email protected]>
Reviewed-by: Andy Lutomirski <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
-rw-r--r-- | kernel/smp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/smp.c b/kernel/smp.c index d86eec5f51c1..a7d4f9f50a49 100644 --- a/kernel/smp.c +++ b/kernel/smp.c @@ -682,7 +682,7 @@ void on_each_cpu_cond(bool (*cond_func)(int cpu, void *info), preempt_disable(); for_each_online_cpu(cpu) if (cond_func(cpu, info)) - cpumask_set_cpu(cpu, cpus); + __cpumask_set_cpu(cpu, cpus); on_each_cpu_mask(cpus, func, info, wait); preempt_enable(); free_cpumask_var(cpus); |