[PATCH] [10/20] i386: Move MWAIT idle check to generic CPU initialization

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Andi Kleen
Date: Wednesday, January 2, 2008 - 5:50 pm

Previously it was only run for Intel CPUs, but AMD Fam10h implements MWAIT too.

This matches 64bit behaviour.

Signed-off-by: Andi Kleen <ak@suse.de>

---
 arch/x86/kernel/cpu/common.c |    2 ++
 arch/x86/kernel/cpu/intel.c  |    1 -
 2 files changed, 2 insertions(+), 1 deletion(-)

Index: linux/arch/x86/kernel/cpu/common.c
===================================================================
--- linux.orig/arch/x86/kernel/cpu/common.c
+++ linux/arch/x86/kernel/cpu/common.c
@@ -510,6 +510,8 @@ void __cpuinit identify_cpu(struct cpuin
 
 	/* Init Machine Check Exception if available. */
 	mcheck_init(c);
+
+	select_idle_routine(c);
 }
 
 void __init identify_boot_cpu(void)
Index: linux/arch/x86/kernel/cpu/intel.c
===================================================================
--- linux.orig/arch/x86/kernel/cpu/intel.c
+++ linux/arch/x86/kernel/cpu/intel.c
@@ -134,7 +134,6 @@ static void __cpuinit init_intel(struct 
 	}
 #endif
 
-	select_idle_routine(c);
 	l2 = init_intel_cacheinfo(c);
 	if (c->cpuid_level > 9 ) {
 		unsigned eax = cpuid_eax(10);
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] [5/20] x86: Introduce nsec_barrier() , Andi Kleen, (Wed Jan 2, 5:50 pm)
[PATCH] [6/20] x86: Remove get_cycles_sync, Andi Kleen, (Wed Jan 2, 5:50 pm)
[PATCH] [8/20] x86: Make TIF_MCE_NOTIFY optional, Andi Kleen, (Wed Jan 2, 5:50 pm)
[PATCH] [10/20] i386: Move MWAIT idle check to generic CPU ..., Andi Kleen, (Wed Jan 2, 5:50 pm)
Re: [PATCH] [5/20] x86: Introduce nsec_barrier(), Andi Kleen, (Thu Jan 3, 5:55 am)
Re: [PATCH] [5/20] x86: Introduce nsec_barrier() II, Andi Kleen, (Mon Jan 7, 1:01 pm)