diff options
author | Xiao Guangrong <xiaoguangrong@cn.fujitsu.com> | 2009-12-14 21:00:16 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-15 11:53:25 -0500 |
commit | c0f68c2fab4898bcc4671a8fb941f428856b4ad5 (patch) | |
tree | 87cc5addf461b699b3b9c9d1931f77acf947051d /kernel | |
parent | 4eb174bee6f8623fed1af0072f1bebfc3b513a52 (diff) |
generic-ipi: cleanup for generic_smp_call_function_interrupt()
Use smp_processor_id() instead of get_cpu() and put_cpu() in
generic_smp_call_function_interrupt(), It's no need to disable preempt,
because we must call generic_smp_call_function_interrupt() with interrupts
disabled.
Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
Acked-by: Ingo Molnar <mingo@elte.hu>
Cc: Jens Axboe <jens.axboe@oracle.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/smp.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/kernel/smp.c b/kernel/smp.c index a8c76069cf50..00a1d0ede532 100644 --- a/kernel/smp.c +++ b/kernel/smp.c | |||
@@ -171,7 +171,7 @@ void generic_exec_single(int cpu, struct call_single_data *data, int wait) | |||
171 | void generic_smp_call_function_interrupt(void) | 171 | void generic_smp_call_function_interrupt(void) |
172 | { | 172 | { |
173 | struct call_function_data *data; | 173 | struct call_function_data *data; |
174 | int cpu = get_cpu(); | 174 | int cpu = smp_processor_id(); |
175 | 175 | ||
176 | /* | 176 | /* |
177 | * Shouldn't receive this interrupt on a cpu that is not yet online. | 177 | * Shouldn't receive this interrupt on a cpu that is not yet online. |
@@ -212,7 +212,6 @@ void generic_smp_call_function_interrupt(void) | |||
212 | csd_unlock(&data->csd); | 212 | csd_unlock(&data->csd); |
213 | } | 213 | } |
214 | 214 | ||
215 | put_cpu(); | ||
216 | } | 215 | } |
217 | 216 | ||
218 | /* | 217 | /* |