Commit 13530257 authored by Andi Kleen's avatar Andi Kleen Committed by Ingo Molnar

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: default avatarAndi Kleen <ak@suse.de>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent 7d851c8d
...@@ -60,14 +60,10 @@ EXPORT_PER_CPU_SYMBOL_GPL(gdt_page); ...@@ -60,14 +60,10 @@ EXPORT_PER_CPU_SYMBOL_GPL(gdt_page);
__u32 cleared_cpu_caps[NCAPINTS] __cpuinitdata; __u32 cleared_cpu_caps[NCAPINTS] __cpuinitdata;
static int cachesize_override __cpuinitdata = -1; static int cachesize_override __cpuinitdata = -1;
static int disable_x86_fxsr __cpuinitdata;
static int disable_x86_serial_nr __cpuinitdata = 1; static int disable_x86_serial_nr __cpuinitdata = 1;
static int disable_x86_sep __cpuinitdata;
struct cpu_dev * cpu_devs[X86_VENDOR_NUM] = {}; struct cpu_dev * cpu_devs[X86_VENDOR_NUM] = {};
extern int disable_pse;
static void __cpuinit default_init(struct cpuinfo_x86 * c) static void __cpuinit default_init(struct cpuinfo_x86 * c)
{ {
/* Not much we can do here... */ /* Not much we can do here... */
...@@ -216,16 +212,8 @@ static void __cpuinit get_cpu_vendor(struct cpuinfo_x86 *c, int early) ...@@ -216,16 +212,8 @@ static void __cpuinit get_cpu_vendor(struct cpuinfo_x86 *c, int early)
static int __init x86_fxsr_setup(char * s) static int __init x86_fxsr_setup(char * s)
{ {
/* Tell all the other CPUs to not use it... */ setup_clear_cpu_cap(X86_FEATURE_FXSR);
disable_x86_fxsr = 1; setup_clear_cpu_cap(X86_FEATURE_XMM);
/*
* ... and clear the bits early in the boot_cpu_data
* so that the bootup process doesn't try to do this
* either.
*/
clear_bit(X86_FEATURE_FXSR, boot_cpu_data.x86_capability);
clear_bit(X86_FEATURE_XMM, boot_cpu_data.x86_capability);
return 1; return 1;
} }
__setup("nofxsr", x86_fxsr_setup); __setup("nofxsr", x86_fxsr_setup);
...@@ -233,7 +221,7 @@ __setup("nofxsr", x86_fxsr_setup); ...@@ -233,7 +221,7 @@ __setup("nofxsr", x86_fxsr_setup);
static int __init x86_sep_setup(char * s) static int __init x86_sep_setup(char * s)
{ {
disable_x86_sep = 1; setup_clear_cpu_cap(X86_FEATURE_SEP);
return 1; return 1;
} }
__setup("nosep", x86_sep_setup); __setup("nosep", x86_sep_setup);
...@@ -462,19 +450,6 @@ void __cpuinit identify_cpu(struct cpuinfo_x86 *c) ...@@ -462,19 +450,6 @@ void __cpuinit identify_cpu(struct cpuinfo_x86 *c)
if ( tsc_disable ) if ( tsc_disable )
clear_bit(X86_FEATURE_TSC, c->x86_capability); clear_bit(X86_FEATURE_TSC, c->x86_capability);
/* FXSR disabled? */
if (disable_x86_fxsr) {
clear_bit(X86_FEATURE_FXSR, c->x86_capability);
clear_bit(X86_FEATURE_XMM, c->x86_capability);
}
/* SEP disabled? */
if (disable_x86_sep)
clear_bit(X86_FEATURE_SEP, c->x86_capability);
if (disable_pse)
clear_bit(X86_FEATURE_PSE, c->x86_capability);
/* If the model name is still unset, do table lookup. */ /* If the model name is still unset, do table lookup. */
if ( !c->x86_model_id[0] ) { if ( !c->x86_model_id[0] ) {
char *p; char *p;
...@@ -629,8 +604,7 @@ void __init early_cpu_init(void) ...@@ -629,8 +604,7 @@ void __init early_cpu_init(void)
/* pse is not compatible with on-the-fly unmapping, /* pse is not compatible with on-the-fly unmapping,
* disable it even if the cpus claim to support it. * disable it even if the cpus claim to support it.
*/ */
clear_bit(X86_FEATURE_PSE, boot_cpu_data.x86_capability); setup_clear_cpu_cap(X86_FEATURE_PSE);
disable_pse = 1;
#endif #endif
} }
......
...@@ -68,8 +68,6 @@ ...@@ -68,8 +68,6 @@
address, and must not be in the .bss segment! */ address, and must not be in the .bss segment! */
unsigned long init_pg_tables_end __initdata = ~0UL; unsigned long init_pg_tables_end __initdata = ~0UL;
int disable_pse __cpuinitdata = 0;
/* /*
* Machine setup.. * Machine setup..
*/ */
...@@ -242,8 +240,7 @@ static int __init parse_mem(char *arg) ...@@ -242,8 +240,7 @@ static int __init parse_mem(char *arg)
return -EINVAL; return -EINVAL;
if (strcmp(arg, "nopentium") == 0) { if (strcmp(arg, "nopentium") == 0) {
clear_cpu_cap(&boot_cpu_data, X86_FEATURE_PSE); setup_clear_cpu_cap(X86_FEATURE_PSE);
disable_pse = 1;
} else { } else {
/* If the user specifies memory size, we /* If the user specifies memory size, we
* limit the BIOS-provided memory map to * limit the BIOS-provided memory map to
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment