diff options
| author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-03-23 23:44:19 -0500 |
|---|---|---|
| committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-03-23 23:44:19 -0500 |
| commit | 1ebbe2b20091d306453a5cf480a87e6cd28ae76f (patch) | |
| tree | f5cd7a0fa69b8b1938cb5a0faed2e7b0628072a5 /include/linux/smp.h | |
| parent | ac58c9059da8886b5e8cde012a80266b18ca146e (diff) | |
| parent | 674a396c6d2ba0341ebdd7c1c9950f32f018e2dd (diff) | |
Merge branch 'linus'
Diffstat (limited to 'include/linux/smp.h')
| -rw-r--r-- | include/linux/smp.h | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/include/linux/smp.h b/include/linux/smp.h index 44153fdf73fc..d699a16b0cb2 100644 --- a/include/linux/smp.h +++ b/include/linux/smp.h | |||
| @@ -52,23 +52,12 @@ extern void smp_cpus_done(unsigned int max_cpus); | |||
| 52 | /* | 52 | /* |
| 53 | * Call a function on all other processors | 53 | * Call a function on all other processors |
| 54 | */ | 54 | */ |
| 55 | extern int smp_call_function (void (*func) (void *info), void *info, | 55 | int smp_call_function(void(*func)(void *info), void *info, int retry, int wait); |
| 56 | int retry, int wait); | ||
| 57 | 56 | ||
| 58 | /* | 57 | /* |
| 59 | * Call a function on all processors | 58 | * Call a function on all processors |
| 60 | */ | 59 | */ |
| 61 | static inline int on_each_cpu(void (*func) (void *info), void *info, | 60 | int on_each_cpu(void (*func) (void *info), void *info, int retry, int wait); |
| 62 | int retry, int wait) | ||
| 63 | { | ||
| 64 | int ret = 0; | ||
| 65 | |||
| 66 | preempt_disable(); | ||
| 67 | ret = smp_call_function(func, info, retry, wait); | ||
| 68 | func(info); | ||
| 69 | preempt_enable(); | ||
| 70 | return ret; | ||
| 71 | } | ||
| 72 | 61 | ||
| 73 | #define MSG_ALL_BUT_SELF 0x8000 /* Assume <32768 CPU's */ | 62 | #define MSG_ALL_BUT_SELF 0x8000 /* Assume <32768 CPU's */ |
| 74 | #define MSG_ALL 0x8001 | 63 | #define MSG_ALL 0x8001 |
| @@ -94,7 +83,13 @@ void smp_prepare_boot_cpu(void); | |||
| 94 | #define raw_smp_processor_id() 0 | 83 | #define raw_smp_processor_id() 0 |
| 95 | #define hard_smp_processor_id() 0 | 84 | #define hard_smp_processor_id() 0 |
| 96 | #define smp_call_function(func,info,retry,wait) ({ 0; }) | 85 | #define smp_call_function(func,info,retry,wait) ({ 0; }) |
| 97 | #define on_each_cpu(func,info,retry,wait) ({ func(info); 0; }) | 86 | #define on_each_cpu(func,info,retry,wait) \ |
| 87 | ({ \ | ||
| 88 | local_irq_disable(); \ | ||
| 89 | func(info); \ | ||
| 90 | local_irq_enable(); \ | ||
| 91 | 0; \ | ||
| 92 | }) | ||
| 98 | static inline void smp_send_reschedule(int cpu) { } | 93 | static inline void smp_send_reschedule(int cpu) { } |
| 99 | #define num_booting_cpus() 1 | 94 | #define num_booting_cpus() 1 |
| 100 | #define smp_prepare_boot_cpu() do {} while (0) | 95 | #define smp_prepare_boot_cpu() do {} while (0) |
