aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAl Viro <viro@ftp.linux.org.uk>2007-07-17 17:29:46 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-17 17:39:19 -0400
commit8dfd588c3180b7403c402b4545164ee4543f8f86 (patch)
tree9bd261e2b78f20ea852f60ee1a13f57cff51cdae /include
parent44052e0d91757ecac4a2f659ea3e1a658dd6057e (diff)
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: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/smp.h18
1 files changed, 8 insertions, 10 deletions
diff --git a/include/linux/smp.h b/include/linux/smp.h
index 8039daced688..259a13c3bd98 100644
--- a/include/linux/smp.h
+++ b/include/linux/smp.h
@@ -7,7 +7,6 @@
7 */ 7 */
8 8
9#include <linux/errno.h> 9#include <linux/errno.h>
10#include <asm/system.h>
11 10
12extern void cpu_idle(void); 11extern void cpu_idle(void);
13 12
@@ -100,15 +99,14 @@ static inline int up_smp_call_function(void)
100static inline void smp_send_reschedule(int cpu) { } 99static inline void smp_send_reschedule(int cpu) { }
101#define num_booting_cpus() 1 100#define num_booting_cpus() 1
102#define smp_prepare_boot_cpu() do {} while (0) 101#define smp_prepare_boot_cpu() do {} while (0)
103static inline int smp_call_function_single(int cpuid, void (*func) (void *info), 102#define smp_call_function_single(cpuid, func, info, retry, wait) \
104 void *info, int retry, int wait) 103({ \
105{ 104 WARN_ON(cpuid != 0); \
106 WARN_ON(cpuid != 0); 105 local_irq_disable(); \
107 local_irq_disable(); 106 (func)(info); \
108 func(info); 107 local_irq_enable(); \
109 local_irq_enable(); 108 0; \
110 return 0; 109})
111}
112 110
113#endif /* !SMP */ 111#endif /* !SMP */
114 112