x86_64: Don't call mtrr_bp_init from identify_cpu
authorAndi Kleen <ak@suse.de>
Fri, 11 May 2007 09:23:20 +0000 (11:23 +0200)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Fri, 11 May 2007 19:53:00 +0000 (12:53 -0700)
The code was ok, but triggered warnings for calling __init from
__cpuinit. Instead call it from check_bugs instead.

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/x86_64/kernel/bugs.c
arch/x86_64/kernel/setup.c

index 12b585b5345d4a8abb97e0ae2a1f384b1d4bc33e..c141e7a7ff5547760ca3a9f60dc7e53d79c9071f 100644 (file)
@@ -13,6 +13,7 @@
 void __init check_bugs(void)
 {
        identify_cpu(&boot_cpu_data);
+       mtrr_bp_init();
 #if !defined(CONFIG_SMP)
        printk("CPU: ");
        print_cpu_info(&boot_cpu_data);
index db51577bda32dfc112566b5551fdc6223ec0f1e3..eb6524f3ac29b00482800421ed615b674ee453de 100644 (file)
@@ -891,9 +891,7 @@ void __cpuinit identify_cpu(struct cpuinfo_x86 *c)
 #ifdef CONFIG_X86_MCE
        mcheck_init(c);
 #endif
-       if (c == &boot_cpu_data)
-               mtrr_bp_init();
-       else
+       if (c != &boot_cpu_data)
                mtrr_ap_init();
 #ifdef CONFIG_NUMA
        numa_add_cpu(smp_processor_id());