Skip to content

Commit

Permalink
x86_64: Don't call mtrr_bp_init from identify_cpu
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andi Kleen authored and Linus Torvalds committed May 11, 2007
1 parent 547c535 commit 8bd9948
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 1 addition & 0 deletions arch/x86_64/kernel/bugs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 1 addition & 3 deletions arch/x86_64/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down

0 comments on commit 8bd9948

Please sign in to comment.