diff options
author | Avi Kivity <avi@qumranet.com> | 2007-07-09 10:11:49 -0400 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2007-07-16 05:05:50 -0400 |
commit | a52b1752c077cb919b71167c54968a0b91673281 (patch) | |
tree | 0305330faac81f946d7722ff6103a08385d19075 /include/linux/smp.h | |
parent | de489353918139161eee241a6224d67f22bfd024 (diff) |
SMP: Allow smp_call_function_single() to current cpu
This removes the requirement for callers to get_cpu() to check in simple
cases. This patch is for !CONFIG_SMP.
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'include/linux/smp.h')
-rw-r--r-- | include/linux/smp.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/linux/smp.h b/include/linux/smp.h index 96ac21f8dd73..8039daced688 100644 --- a/include/linux/smp.h +++ b/include/linux/smp.h | |||
@@ -7,6 +7,7 @@ | |||
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/errno.h> | 9 | #include <linux/errno.h> |
10 | #include <asm/system.h> | ||
10 | 11 | ||
11 | extern void cpu_idle(void); | 12 | extern void cpu_idle(void); |
12 | 13 | ||
@@ -102,7 +103,11 @@ static inline void smp_send_reschedule(int cpu) { } | |||
102 | static inline int smp_call_function_single(int cpuid, void (*func) (void *info), | 103 | static inline int smp_call_function_single(int cpuid, void (*func) (void *info), |
103 | void *info, int retry, int wait) | 104 | void *info, int retry, int wait) |
104 | { | 105 | { |
105 | return -EBUSY; | 106 | WARN_ON(cpuid != 0); |
107 | local_irq_disable(); | ||
108 | func(info); | ||
109 | local_irq_enable(); | ||
110 | return 0; | ||
106 | } | 111 | } |
107 | 112 | ||
108 | #endif /* !SMP */ | 113 | #endif /* !SMP */ |