#ifdef CONFIG_X86_X2APIC
int x2apic_mode;
static int x2apic_disabled;
+
+enum {
+ X2APIC_OFF,
+ X2APIC_ON,
+ X2APIC_DISABLED,
+};
+static int x2apic_state;
+
static int __init setup_nox2apic(char *str)
{
if (x2apic_enabled()) {
setup_clear_cpu_cap(X86_FEATURE_X2APIC);
nox2apic = true;
-
+ x2apic_state = X2APIC_DISABLED;
return 0;
}
early_param("nox2apic", setup_nox2apic);
}
x2apic_disabled = 1;
+ x2apic_state = X2APIC_DISABLED;
}
void enable_x2apic(void)
printk_once(KERN_INFO "Enabling x2apic\n");
wrmsrl(MSR_IA32_APICBASE, msr | X2APIC_ENABLE);
}
+ x2apic_state = X2APIC_ON;
}
static __init void try_to_enable_x2apic(int remap_mode)
if (x2apic_enabled()) {
pr_info("x2apic: enabled by BIOS, switching to x2apic ops\n");
x2apic_mode = 1;
+ x2apic_state = X2APIC_ON;
+ } else if (!cpu_has_x2apic) {
+ x2apic_state = X2APIC_DISABLED;
}
}
#else /* CONFIG_X86_X2APIC */