Commit 9175fc06 authored by Yinghai Lu's avatar Yinghai Lu Committed by Ingo Molnar

x86: use setup_clear_cpu_cap() when disabling the lapic

... so don't need to call clear_cpu_cap again in early_identify_cpu,
and could use cleared_cpu_caps like other places.
Signed-off-by: default avatarYinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 6ac8d51f
...@@ -1214,9 +1214,6 @@ int apic_version[MAX_APICS]; ...@@ -1214,9 +1214,6 @@ int apic_version[MAX_APICS];
int __init APIC_init_uniprocessor(void) int __init APIC_init_uniprocessor(void)
{ {
if (disable_apic)
clear_cpu_cap(&boot_cpu_data, X86_FEATURE_APIC);
if (!smp_found_config && !cpu_has_apic) if (!smp_found_config && !cpu_has_apic)
return -1; return -1;
...@@ -1700,7 +1697,7 @@ early_param("lapic", parse_lapic); ...@@ -1700,7 +1697,7 @@ early_param("lapic", parse_lapic);
static int __init parse_nolapic(char *arg) static int __init parse_nolapic(char *arg)
{ {
disable_apic = 1; disable_apic = 1;
clear_cpu_cap(&boot_cpu_data, X86_FEATURE_APIC); setup_clear_cpu_cap(X86_FEATURE_APIC);
return 0; return 0;
} }
early_param("nolapic", parse_nolapic); early_param("nolapic", parse_nolapic);
......
...@@ -1337,7 +1337,7 @@ early_param("apic", apic_set_verbosity); ...@@ -1337,7 +1337,7 @@ early_param("apic", apic_set_verbosity);
static __init int setup_disableapic(char *str) static __init int setup_disableapic(char *str)
{ {
disable_apic = 1; disable_apic = 1;
clear_cpu_cap(&boot_cpu_data, X86_FEATURE_APIC); setup_clear_cpu_cap(X86_FEATURE_APIC);
return 0; return 0;
} }
early_param("disableapic", setup_disableapic); early_param("disableapic", setup_disableapic);
......
...@@ -324,10 +324,6 @@ static void __cpuinit early_identify_cpu(struct cpuinfo_x86 *c) ...@@ -324,10 +324,6 @@ static void __cpuinit early_identify_cpu(struct cpuinfo_x86 *c)
cpu_devs[c->x86_vendor]->c_early_init(c); cpu_devs[c->x86_vendor]->c_early_init(c);
validate_pat_support(c); validate_pat_support(c);
/* early_param could clear that, but recall get it set again */
if (disable_apic)
clear_cpu_cap(c, X86_FEATURE_APIC);
} }
/* /*
......
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