Commit 8dfd588c authored by Al Viro's avatar Al Viro Committed by Linus Torvalds

smp_call_function_single() should be a macro on UP

... or we end up with header include order problems from hell.

E.g. on m68k this is 100% fatal - local_irq_enable() there
wants preempt_count(), which wants task_struct fields, which
we won't have when we are in smp.h pulled from sched.h.
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 44052e0d
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
*/ */
#include <linux/errno.h> #include <linux/errno.h>
#include <asm/system.h>
extern void cpu_idle(void); extern void cpu_idle(void);
...@@ -100,15 +99,14 @@ static inline int up_smp_call_function(void) ...@@ -100,15 +99,14 @@ static inline int up_smp_call_function(void)
static inline void smp_send_reschedule(int cpu) { } static inline void smp_send_reschedule(int cpu) { }
#define num_booting_cpus() 1 #define num_booting_cpus() 1
#define smp_prepare_boot_cpu() do {} while (0) #define smp_prepare_boot_cpu() do {} while (0)
static inline int smp_call_function_single(int cpuid, void (*func) (void *info), #define smp_call_function_single(cpuid, func, info, retry, wait) \
void *info, int retry, int wait) ({ \
{ WARN_ON(cpuid != 0); \
WARN_ON(cpuid != 0); local_irq_disable(); \
local_irq_disable(); (func)(info); \
func(info); local_irq_enable(); \
local_irq_enable(); 0; \
return 0; })
}
#endif /* !SMP */ #endif /* !SMP */
......
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