path: root/kernel/up.c
diff options
authorLinus Torvalds <>2020-02-09 12:09:43 -0800
committerLinus Torvalds <>2020-02-09 12:09:43 -0800
commitf41377609a722fec65f4b0df4e8dc5ea946fb866 (patch)
tree76f3a488415536ee5d8d06e3590b1c07133f1a8d /kernel/up.c
parentca21b9b37059ee07176028de415cc4699db259cb (diff)
parent1e474b28e78897d0d170fab3b28ba683149cb9ea (diff)
Merge tag 'smp-urgent-2020-02-09' of git://
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:// smp/up: Make smp_call_function_single() match SMP semantics smp: Remove superfluous cond_func check in smp_call_function_many_cond()
Diffstat (limited to 'kernel/up.c')
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/up.c b/kernel/up.c
index 53144d056252..c6f323dcd45b 100644
--- a/kernel/up.c
+++ b/kernel/up.c
@@ -14,7 +14,8 @@ int smp_call_function_single(int cpu, void (*func) (void *info), void *info,
unsigned long flags;
- WARN_ON(cpu != 0);
+ if (cpu != 0)
+ return -ENXIO;