From: akpm@linux-foundation.org Date: Wed, 17 Oct 2007 16:04:37 +0000 (+0200) Subject: i386: Remove local CPU logic in MTRR call to smp_call_function_single X-Git-Tag: v2.6.24-rc1~476^2~67 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c8f2518e390638abc8255616a40b4a28caa66a95;p=linux-2.6 i386: Remove local CPU logic in MTRR call to smp_call_function_single smp_call_function_single handles the call to local CPU case correctly now, no need to handle this in the caller. [ tglx: arch/x86 adaptation ] Signed-off-by: Andrew Morton Signed-off-by: Andi Kleen Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner --- diff --git a/arch/x86/kernel/cpu/mtrr/main.c b/arch/x86/kernel/cpu/mtrr/main.c index c48b6fea5a..5e4be30ff9 100644 --- a/arch/x86/kernel/cpu/mtrr/main.c +++ b/arch/x86/kernel/cpu/mtrr/main.c @@ -738,13 +738,7 @@ void mtrr_ap_init(void) */ void mtrr_save_state(void) { - int cpu = get_cpu(); - - if (cpu == 0) - mtrr_save_fixed_ranges(NULL); - else - smp_call_function_single(0, mtrr_save_fixed_ranges, NULL, 1, 1); - put_cpu(); + smp_call_function_single(0, mtrr_save_fixed_ranges, NULL, 1, 1); } static int __init mtrr_init_finialize(void)