|
@@ -52,23 +52,12 @@ extern void smp_cpus_done(unsigned int max_cpus);
|
|
/*
|
|
/*
|
|
* Call a function on all other processors
|
|
* Call a function on all other processors
|
|
*/
|
|
*/
|
|
-extern int smp_call_function (void (*func) (void *info), void *info,
|
|
|
|
- int retry, int wait);
|
|
|
|
|
|
+int smp_call_function(void(*func)(void *info), void *info, int retry, int wait);
|
|
|
|
|
|
/*
|
|
/*
|
|
* Call a function on all processors
|
|
* Call a function on all processors
|
|
*/
|
|
*/
|
|
-static inline int on_each_cpu(void (*func) (void *info), void *info,
|
|
|
|
- int retry, int wait)
|
|
|
|
-{
|
|
|
|
- int ret = 0;
|
|
|
|
-
|
|
|
|
- preempt_disable();
|
|
|
|
- ret = smp_call_function(func, info, retry, wait);
|
|
|
|
- func(info);
|
|
|
|
- preempt_enable();
|
|
|
|
- return ret;
|
|
|
|
-}
|
|
|
|
|
|
+int on_each_cpu(void (*func) (void *info), void *info, int retry, int wait);
|
|
|
|
|
|
#define MSG_ALL_BUT_SELF 0x8000 /* Assume <32768 CPU's */
|
|
#define MSG_ALL_BUT_SELF 0x8000 /* Assume <32768 CPU's */
|
|
#define MSG_ALL 0x8001
|
|
#define MSG_ALL 0x8001
|
|
@@ -94,7 +83,13 @@ void smp_prepare_boot_cpu(void);
|
|
#define raw_smp_processor_id() 0
|
|
#define raw_smp_processor_id() 0
|
|
#define hard_smp_processor_id() 0
|
|
#define hard_smp_processor_id() 0
|
|
#define smp_call_function(func,info,retry,wait) ({ 0; })
|
|
#define smp_call_function(func,info,retry,wait) ({ 0; })
|
|
-#define on_each_cpu(func,info,retry,wait) ({ func(info); 0; })
|
|
|
|
|
|
+#define on_each_cpu(func,info,retry,wait) \
|
|
|
|
+ ({ \
|
|
|
|
+ local_irq_disable(); \
|
|
|
|
+ func(info); \
|
|
|
|
+ local_irq_enable(); \
|
|
|
|
+ 0; \
|
|
|
|
+ })
|
|
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)
|