i386: Remove local CPU logic in MTRR call to smp_call_function_single
authorakpm@linux-foundation.org <akpm@linux-foundation.org>
Wed, 17 Oct 2007 16:04:37 +0000 (18:04 +0200)
committerThomas Gleixner <tglx@inhelltoy.tec.linutronix.de>
Wed, 17 Oct 2007 18:16:14 +0000 (20:16 +0200)
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 <akpm@linux-foundation.org>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
arch/x86/kernel/cpu/mtrr/main.c

index c48b6fea5ab4edd5fb53133fc03de2309f2e80af..5e4be30ff903800a47ab47bfcec5198aacc7c81e 100644 (file)
@@ -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)