Skip to contentSkip to conversation

x86/cpufeature for v2.6.31

GIT PULL Ingo Molnar 2 participants 3 messages Jun 10, 2009 x86

lore
Share & tools
lore
#0 lore raw

Linus,

Please pull the latest x86-cpufeature-for-linus git tree from:

git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git x86-cpufeature-for-linus

Thanks,

Ingo

------------------>
Jaswinder Singh Rajput (1):
x86: cpufeature.h fix name for X86_FEATURE_MCE

Yinghai Lu (1):
x86: clean up and fix setup_clear/force_cpu_cap handling

 arch/x86/include/asm/cpufeature.h |    6 +++---
 arch/x86/include/asm/processor.h  |    3 ++-
 arch/x86/kernel/cpu/common.c      |   17 ++++++++++++-----
 3 files changed, 17 insertions(+), 9 deletions(-)
arch/x86/include/asm/cpufeature.h +3 -3
index bb83b1c..13cc6a5 100644
@@ -22,7 +22,7 @@
 #define X86_FEATURE_TSC		(0*32+ 4) /* Time Stamp Counter */
 #define X86_FEATURE_MSR		(0*32+ 5) /* Model-Specific Registers */
 #define X86_FEATURE_PAE		(0*32+ 6) /* Physical Address Extensions */
-#define X86_FEATURE_MCE		(0*32+ 7) /* Machine Check Architecture */
+#define X86_FEATURE_MCE		(0*32+ 7) /* Machine Check Exception */
 #define X86_FEATURE_CX8		(0*32+ 8) /* CMPXCHG8 instruction */
 #define X86_FEATURE_APIC	(0*32+ 9) /* Onboard APIC */
 #define X86_FEATURE_SEP		(0*32+11) /* SYSENTER/SYSEXIT */
@@ -192,11 +192,11 @@ extern const char * const x86_power_flags[32];
 #define clear_cpu_cap(c, bit)	clear_bit(bit, (unsigned long *)((c)->x86_capability))
 #define setup_clear_cpu_cap(bit) do { \
 	clear_cpu_cap(&boot_cpu_data, bit);	\
-	set_bit(bit, (unsigned long *)cleared_cpu_caps); \
+	set_bit(bit, (unsigned long *)cpu_caps_cleared); \
 } while (0)
 #define setup_force_cpu_cap(bit) do { \
 	set_cpu_cap(&boot_cpu_data, bit);	\
-	clear_bit(bit, (unsigned long *)cleared_cpu_caps);	\
+	set_bit(bit, (unsigned long *)cpu_caps_set);	\
 } while (0)
 
 #define cpu_has_fpu		boot_cpu_has(X86_FEATURE_FPU)
arch/x86/include/asm/processor.h +2 -1
index c2cceae..fed93fe 100644
@@ -135,7 +135,8 @@ extern struct cpuinfo_x86	boot_cpu_data;
 extern struct cpuinfo_x86	new_cpu_data;
 
 extern struct tss_struct	doublefault_tss;
-extern __u32			cleared_cpu_caps[NCAPINTS];
+extern __u32			cpu_caps_cleared[NCAPINTS];
+extern __u32			cpu_caps_set[NCAPINTS];
 
 #ifdef CONFIG_SMP
 DECLARE_PER_CPU_SHARED_ALIGNED(struct cpuinfo_x86, cpu_info);
arch/x86/kernel/cpu/common.c +12 -5
index c4f6678..e7fd5c4 100644
@@ -292,7 +292,8 @@ static const char *__cpuinit table_lookup_model(struct cpuinfo_x86 *c)
 	return NULL;		/* Not found */
 }
 
-__u32 cleared_cpu_caps[NCAPINTS] __cpuinitdata;
+__u32 cpu_caps_cleared[NCAPINTS] __cpuinitdata;
+__u32 cpu_caps_set[NCAPINTS] __cpuinitdata;
 
 void load_percpu_segment(int cpu)
 {
@@ -806,6 +807,16 @@ static void __cpuinit identify_cpu(struct cpuinfo_x86 *c)
 #endif
 
 	init_hypervisor(c);
+
+	/*
+	 * Clear/Set all flags overriden by options, need do it
+	 * before following smp all cpus cap AND.
+	 */
+	for (i = 0; i < NCAPINTS; i++) {
+		c->x86_capability[i] &= ~cpu_caps_cleared[i];
+		c->x86_capability[i] |= cpu_caps_set[i];
+	}
+
 	/*
 	 * On SMP, boot_cpu_data holds the common feature set between
 	 * all CPUs; so make sure that we indicate which features are
@@ -818,10 +829,6 @@ static void __cpuinit identify_cpu(struct cpuinfo_x86 *c)
 			boot_cpu_data.x86_capability[i] &= c->x86_capability[i];
 	}
 
-	/* Clear all flags overriden by options */
-	for (i = 0; i < NCAPINTS; i++)
-		c->x86_capability[i] &= ~cleared_cpu_caps[i];
-
 #ifdef CONFIG_X86_MCE
 	/* Init Machine Check Exception if available. */
 	mcheck_init(c);
#1 lore raw
Quoted 4 lines · Ingo Molnar

Please pull the latest x86-cpufeature-for-linus git tree from:

git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git x86-cpufeature-for-linus

Hmm. This was already part of the irq-tree.

(But at least so far, this merge window looks much cleaner wrt x86 merges. I'm hoping there are no nasty surprises down the line ;)

Linus

#2 lore raw
Quoted 9 lines · Linus Torvalds
Quoted 4 lines · Ingo Molnar

Please pull the latest x86-cpufeature-for-linus git tree from:

git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git x86-cpufeature-for-linus

Hmm. This was already part of the irq-tree.

Ah, sorry - due to:

commit ee4c24a5c9b530481394132c8dbc10572d57c075
Merge: 3d58f48... 3e0c373...
Author: Ingo Molnar <[email protected]>
Date: Mon Jun 1 22:29:35 2009 +0200

Merge branch 'x86/cpufeature' into irq/numa

Merge reason: irq/numa didnt build because this commit:

2759c32: x86: don't call read_apic_id if !cpu_has_apic

Had a dependency on x86/cpufeature changes. Pull in that (small) branch to fix the dependency.

This seemed like one of the exceptions to do that merge - x86/cpufeature is a narrow 'infrastructure' topic we keep around during the development window, because we found it in the past that cpufeature changes frequently cause conflicts and merge dependencies. The cpufeatres commits are always kept uninteresting and non-controversial.

So technically it's a cross-tree merge, but of the good and exceptional kind ... i hope :-/

Quoted 2 lines

(But at least so far, this merge window looks much cleaner wrt x86 merges.

Thanks :)

Quoted 1 line

[...] I'm hoping there are no nasty surprises down the line ;)

There are none planned! :-)

Ingo