]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
x86: use setup_clear_cpu_cap() when disabling the lapic
authorYinghai Lu <yhlu.kernel@gmail.com>
Mon, 21 Jul 2008 08:38:14 +0000 (01:38 -0700)
committerIngo Molnar <mingo@elte.hu>
Mon, 21 Jul 2008 11:03:12 +0000 (13:03 +0200)
... 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: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/apic_32.c
arch/x86/kernel/apic_64.c
arch/x86/kernel/cpu/common_64.c

index a437d027f20b6d8d7ba3dc88400220e796afe41e..e9a00e5074b26ed68698fe03681d09937d718bed 100644 (file)
@@ -1214,9 +1214,6 @@ int apic_version[MAX_APICS];
 
 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)
                return -1;
 
@@ -1700,7 +1697,7 @@ early_param("lapic", parse_lapic);
 static int __init parse_nolapic(char *arg)
 {
        disable_apic = 1;
-       clear_cpu_cap(&boot_cpu_data, X86_FEATURE_APIC);
+       setup_clear_cpu_cap(X86_FEATURE_APIC);
        return 0;
 }
 early_param("nolapic", parse_nolapic);
index 1e3d32e27c14c23a8d48d1dc6bcf8b30faeefae7..16e586cacbdc306cef657b22c31ab9e2878668ca 100644 (file)
@@ -1337,7 +1337,7 @@ early_param("apic", apic_set_verbosity);
 static __init int setup_disableapic(char *str)
 {
        disable_apic = 1;
-       clear_cpu_cap(&boot_cpu_data, X86_FEATURE_APIC);
+       setup_clear_cpu_cap(X86_FEATURE_APIC);
        return 0;
 }
 early_param("disableapic", setup_disableapic);
index 7b8cc72feb40e3ed8bfd02437fe3b6324b024f67..0485cf6445203d205ffc11525b330cd3ae5ddaf6 100644 (file)
@@ -324,10 +324,6 @@ static void __cpuinit early_identify_cpu(struct cpuinfo_x86 *c)
                cpu_devs[c->x86_vendor]->c_early_init(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);
 }
 
 /*