x86: delay early cpu initialization until cpuid is done

Previous thread: x86: move mtrr cpu cap setting early in early_init_xxxx by Linux Kernel Mailing List on Saturday, October 11, 2008 - 1:05 pm. (1 message)

Next thread: x86: make (early)_identify_cpu more the same between 32bit and 64 bit by Linux Kernel Mailing List on Saturday, October 11, 2008 - 1:05 pm. (1 message)
From: Linux Kernel Mailing List
Date: Saturday, October 11, 2008 - 1:05 pm

Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=503108...
Commit:     5031088dbc0cd30e893eb27d53f0e0eee6eb1c00
Parent:     5fef55fddb7317585cabc1eae38dbd57f1c59729
Author:     Krzysztof Helt <krzysztof.h1@wp.pl>
AuthorDate: Thu Sep 4 21:09:43 2008 +0200
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Thu Sep 4 21:09:43 2008 +0200

    x86: delay early cpu initialization until cpuid is done
    
    Move early cpu initialization after cpu early get cap so the
    early cpu initialization can fix up cpu caps.
    
    Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
    Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
    Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 arch/x86/kernel/cpu/common.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
index 0785b3c..8aab851 100644
--- a/arch/x86/kernel/cpu/common.c
+++ b/arch/x86/kernel/cpu/common.c
@@ -335,11 +335,11 @@ static void __init early_cpu_detect(void)
 
 	get_cpu_vendor(c, 1);
 
+	early_get_cap(c);
+
 	if (c->x86_vendor != X86_VENDOR_UNKNOWN &&
 	    cpu_devs[c->x86_vendor]->c_early_init)
 		cpu_devs[c->x86_vendor]->c_early_init(c);
-
-	early_get_cap(c);
 }
 
 /*
--

Previous thread: x86: move mtrr cpu cap setting early in early_init_xxxx by Linux Kernel Mailing List on Saturday, October 11, 2008 - 1:05 pm. (1 message)

Next thread: x86: make (early)_identify_cpu more the same between 32bit and 64 bit by Linux Kernel Mailing List on Saturday, October 11, 2008 - 1:05 pm. (1 message)