From: Andi Kleen Date: Fri, 11 May 2007 09:23:20 +0000 (+0200) Subject: x86_64: Don't call mtrr_bp_init from identify_cpu X-Git-Tag: v2.6.22-rc1~25 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8bd994815987dda0947bd9afd887b1410713d4f7;p=linux-2.6 x86_64: Don't call mtrr_bp_init from identify_cpu The code was ok, but triggered warnings for calling __init from __cpuinit. Instead call it from check_bugs instead. Signed-off-by: Andi Kleen Signed-off-by: Linus Torvalds --- diff --git a/arch/x86_64/kernel/bugs.c b/arch/x86_64/kernel/bugs.c index 12b585b534..c141e7a7ff 100644 --- a/arch/x86_64/kernel/bugs.c +++ b/arch/x86_64/kernel/bugs.c @@ -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); diff --git a/arch/x86_64/kernel/setup.c b/arch/x86_64/kernel/setup.c index db51577bda..eb6524f3ac 100644 --- a/arch/x86_64/kernel/setup.c +++ b/arch/x86_64/kernel/setup.c @@ -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());