* [GIT PULL] x86/cpufeature for v2.6.31
@ 2009-06-10 21:16 Ingo Molnar
2009-06-10 22:54 ` Linus Torvalds
0 siblings, 1 reply; 3+ messages in thread
From: Ingo Molnar @ 2009-06-10 21:16 UTC (permalink / raw)
To: Linus Torvalds
Cc: linux-kernel, Thomas Gleixner, H. Peter Anvin, Andrew Morton
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(-)
diff --git a/arch/x86/include/asm/cpufeature.h b/arch/x86/include/asm/cpufeature.h
index bb83b1c..13cc6a5 100644
--- a/arch/x86/include/asm/cpufeature.h
+++ b/arch/x86/include/asm/cpufeature.h
@@ -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)
diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h
index c2cceae..fed93fe 100644
--- a/arch/x86/include/asm/processor.h
+++ b/arch/x86/include/asm/processor.h
@@ -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);
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
index c4f6678..e7fd5c4 100644
--- a/arch/x86/kernel/cpu/common.c
+++ b/arch/x86/kernel/cpu/common.c
@@ -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);
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [GIT PULL] x86/cpufeature for v2.6.31
2009-06-10 21:16 [GIT PULL] x86/cpufeature for v2.6.31 Ingo Molnar
@ 2009-06-10 22:54 ` Linus Torvalds
2009-06-10 23:00 ` Ingo Molnar
0 siblings, 1 reply; 3+ messages in thread
From: Linus Torvalds @ 2009-06-10 22:54 UTC (permalink / raw)
To: Ingo Molnar; +Cc: linux-kernel, Thomas Gleixner, H. Peter Anvin, Andrew Morton
On Wed, 10 Jun 2009, Ingo Molnar wrote:
>
> 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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [GIT PULL] x86/cpufeature for v2.6.31
2009-06-10 22:54 ` Linus Torvalds
@ 2009-06-10 23:00 ` Ingo Molnar
0 siblings, 0 replies; 3+ messages in thread
From: Ingo Molnar @ 2009-06-10 23:00 UTC (permalink / raw)
To: Linus Torvalds
Cc: linux-kernel, Thomas Gleixner, H. Peter Anvin, Andrew Morton
* Linus Torvalds <torvalds@linux-foundation.org> wrote:
>
>
> On Wed, 10 Jun 2009, Ingo Molnar wrote:
> >
> > 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 <mingo@elte.hu>
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.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
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 :-/
> (But at least so far, this merge window looks much cleaner wrt x86
> merges.
Thanks :)
> [...] I'm hoping there are no nasty surprises down the line ;)
There are none planned! :-)
Ingo
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-06-10 23:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-10 21:16 [GIT PULL] x86/cpufeature for v2.6.31 Ingo Molnar
2009-06-10 22:54 ` Linus Torvalds
2009-06-10 23:00 ` Ingo Molnar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox