Skip to content

Commit

Permalink
generic-ipi: cleanup for generic_smp_call_function_interrupt()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Xiao Guangrong authored and torvalds committed Dec 15, 2009
1 parent 4eb174b commit c0f68c2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ void generic_exec_single(int cpu, struct call_single_data *data, int wait)
void generic_smp_call_function_interrupt(void)
{
struct call_function_data *data;
int cpu = get_cpu();
int cpu = smp_processor_id();

/*
* Shouldn't receive this interrupt on a cpu that is not yet online.
Expand Down Expand Up @@ -212,7 +212,6 @@ void generic_smp_call_function_interrupt(void)
csd_unlock(&data->csd);
}

put_cpu();
}

/*
Expand Down

0 comments on commit c0f68c2

Please sign in to comment.