Commit f4137760 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'smp-urgent-2020-02-09' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull SMP fixes from Thomas Gleixner:
 "Two fixes for the SMP related functionality:

   - Make the UP version of smp_call_function_single() match SMP
     semantics when called for a not available CPU. Instead of emitting
     a warning and assuming that the function call target is CPU0,
     return a proper error code like the SMP version does.

   - Remove a superfluous check in smp_call_function_many_cond()"

* tag 'smp-urgent-2020-02-09' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  smp/up: Make smp_call_function_single() match SMP semantics
  smp: Remove superfluous cond_func check in smp_call_function_many_cond()
parents ca21b9b3 1e474b28
...@@ -435,7 +435,7 @@ static void smp_call_function_many_cond(const struct cpumask *mask, ...@@ -435,7 +435,7 @@ static void smp_call_function_many_cond(const struct cpumask *mask,
/* Fastpath: do that cpu by itself. */ /* Fastpath: do that cpu by itself. */
if (next_cpu >= nr_cpu_ids) { if (next_cpu >= nr_cpu_ids) {
if (!cond_func || (cond_func && cond_func(cpu, info))) if (!cond_func || cond_func(cpu, info))
smp_call_function_single(cpu, func, info, wait); smp_call_function_single(cpu, func, info, wait);
return; return;
} }
......
...@@ -14,7 +14,8 @@ int smp_call_function_single(int cpu, void (*func) (void *info), void *info, ...@@ -14,7 +14,8 @@ int smp_call_function_single(int cpu, void (*func) (void *info), void *info,
{ {
unsigned long flags; unsigned long flags;
WARN_ON(cpu != 0); if (cpu != 0)
return -ENXIO;
local_irq_save(flags); local_irq_save(flags);
func(info); func(info);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment