diff options
author | Andi Kleen <ak@suse.de> | 2008-01-30 07:33:20 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-01-30 07:33:20 -0500 |
commit | 135302577bb964ebf23376e2d991405ef4ff0457 (patch) | |
tree | a6343812dabd617356ff13b3e51444e3c5e9ac47 /arch/x86/kernel/cpu/common.c | |
parent | 7d851c8d3db0f79b92c8b14361779ede8acd2488 (diff) |
x86: convert some existing cpuid disable options to new generic bitmap
This convers nofxsr, mem=nopentium and nosep to use the new
generic cpuid disable bitmap instead of using own variables.
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/kernel/cpu/common.c')
-rw-r--r-- | arch/x86/kernel/cpu/common.c | 34 |
1 files changed, 4 insertions, 30 deletions
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c index f0f29ddf33a2..5f9c8e3a3e0f 100644 --- a/arch/x86/kernel/cpu/common.c +++ b/arch/x86/kernel/cpu/common.c | |||
@@ -60,14 +60,10 @@ EXPORT_PER_CPU_SYMBOL_GPL(gdt_page); | |||
60 | __u32 cleared_cpu_caps[NCAPINTS] __cpuinitdata; | 60 | __u32 cleared_cpu_caps[NCAPINTS] __cpuinitdata; |
61 | 61 | ||
62 | static int cachesize_override __cpuinitdata = -1; | 62 | static int cachesize_override __cpuinitdata = -1; |
63 | static int disable_x86_fxsr __cpuinitdata; | ||
64 | static int disable_x86_serial_nr __cpuinitdata = 1; | 63 | static int disable_x86_serial_nr __cpuinitdata = 1; |
65 | static int disable_x86_sep __cpuinitdata; | ||
66 | 64 | ||
67 | struct cpu_dev * cpu_devs[X86_VENDOR_NUM] = {}; | 65 | struct cpu_dev * cpu_devs[X86_VENDOR_NUM] = {}; |
68 | 66 | ||
69 | extern int disable_pse; | ||
70 | |||
71 | static void __cpuinit default_init(struct cpuinfo_x86 * c) | 67 | static void __cpuinit default_init(struct cpuinfo_x86 * c) |
72 | { | 68 | { |
73 | /* Not much we can do here... */ | 69 | /* Not much we can do here... */ |
@@ -216,16 +212,8 @@ static void __cpuinit get_cpu_vendor(struct cpuinfo_x86 *c, int early) | |||
216 | 212 | ||
217 | static int __init x86_fxsr_setup(char * s) | 213 | static int __init x86_fxsr_setup(char * s) |
218 | { | 214 | { |
219 | /* Tell all the other CPUs to not use it... */ | 215 | setup_clear_cpu_cap(X86_FEATURE_FXSR); |
220 | disable_x86_fxsr = 1; | 216 | setup_clear_cpu_cap(X86_FEATURE_XMM); |
221 | |||
222 | /* | ||
223 | * ... and clear the bits early in the boot_cpu_data | ||
224 | * so that the bootup process doesn't try to do this | ||
225 | * either. | ||
226 | */ | ||
227 | clear_bit(X86_FEATURE_FXSR, boot_cpu_data.x86_capability); | ||
228 | clear_bit(X86_FEATURE_XMM, boot_cpu_data.x86_capability); | ||
229 | return 1; | 217 | return 1; |
230 | } | 218 | } |
231 | __setup("nofxsr", x86_fxsr_setup); | 219 | __setup("nofxsr", x86_fxsr_setup); |
@@ -233,7 +221,7 @@ __setup("nofxsr", x86_fxsr_setup); | |||
233 | 221 | ||
234 | static int __init x86_sep_setup(char * s) | 222 | static int __init x86_sep_setup(char * s) |
235 | { | 223 | { |
236 | disable_x86_sep = 1; | 224 | setup_clear_cpu_cap(X86_FEATURE_SEP); |
237 | return 1; | 225 | return 1; |
238 | } | 226 | } |
239 | __setup("nosep", x86_sep_setup); | 227 | __setup("nosep", x86_sep_setup); |
@@ -462,19 +450,6 @@ void __cpuinit identify_cpu(struct cpuinfo_x86 *c) | |||
462 | if ( tsc_disable ) | 450 | if ( tsc_disable ) |
463 | clear_bit(X86_FEATURE_TSC, c->x86_capability); | 451 | clear_bit(X86_FEATURE_TSC, c->x86_capability); |
464 | 452 | ||
465 | /* FXSR disabled? */ | ||
466 | if (disable_x86_fxsr) { | ||
467 | clear_bit(X86_FEATURE_FXSR, c->x86_capability); | ||
468 | clear_bit(X86_FEATURE_XMM, c->x86_capability); | ||
469 | } | ||
470 | |||
471 | /* SEP disabled? */ | ||
472 | if (disable_x86_sep) | ||
473 | clear_bit(X86_FEATURE_SEP, c->x86_capability); | ||
474 | |||
475 | if (disable_pse) | ||
476 | clear_bit(X86_FEATURE_PSE, c->x86_capability); | ||
477 | |||
478 | /* If the model name is still unset, do table lookup. */ | 453 | /* If the model name is still unset, do table lookup. */ |
479 | if ( !c->x86_model_id[0] ) { | 454 | if ( !c->x86_model_id[0] ) { |
480 | char *p; | 455 | char *p; |
@@ -629,8 +604,7 @@ void __init early_cpu_init(void) | |||
629 | /* pse is not compatible with on-the-fly unmapping, | 604 | /* pse is not compatible with on-the-fly unmapping, |
630 | * disable it even if the cpus claim to support it. | 605 | * disable it even if the cpus claim to support it. |
631 | */ | 606 | */ |
632 | clear_bit(X86_FEATURE_PSE, boot_cpu_data.x86_capability); | 607 | setup_clear_cpu_cap(X86_FEATURE_PSE); |
633 | disable_pse = 1; | ||
634 | #endif | 608 | #endif |
635 | } | 609 | } |
636 | 610 | ||