Commit dc9788f4 authored by David Rientjes's avatar David Rientjes Committed by Ingo Molnar

x86/apic: Always define nox2apic and define it as initdata

The "nox2apic" variable can be defined as __initdata since it is
only used for bootstrap.  It can now unconditionally be defined
since it will later be freed.

At the same time, it is also better off as a bool.
Signed-off-by: default avatarDavid Rientjes <rientjes@google.com>
Reviewed-by: default avatarThomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/alpine.DEB.2.02.1402042354380.7839@chino.kir.corp.google.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent 6d498983
...@@ -217,7 +217,6 @@ static inline void x2apic_force_phys(void) ...@@ -217,7 +217,6 @@ static inline void x2apic_force_phys(void)
{ {
} }
#define nox2apic 0
#define x2apic_preenabled 0 #define x2apic_preenabled 0
#define x2apic_supported() 0 #define x2apic_supported() 0
#endif #endif
......
...@@ -133,6 +133,10 @@ static inline void imcr_apic_to_pic(void) ...@@ -133,6 +133,10 @@ static inline void imcr_apic_to_pic(void)
* +1=force-enable * +1=force-enable
*/ */
static int force_enable_local_apic __initdata; static int force_enable_local_apic __initdata;
/* Control whether x2APIC mode is enabled or not */
static bool nox2apic __initdata;
/* /*
* APIC command line parameters * APIC command line parameters
*/ */
...@@ -162,8 +166,7 @@ int x2apic_mode; ...@@ -162,8 +166,7 @@ int x2apic_mode;
/* x2apic enabled before OS handover */ /* x2apic enabled before OS handover */
int x2apic_preenabled; int x2apic_preenabled;
static int x2apic_disabled; static int x2apic_disabled;
static int nox2apic; static int __init setup_nox2apic(char *str)
static __init int setup_nox2apic(char *str)
{ {
if (x2apic_enabled()) { if (x2apic_enabled()) {
int apicid = native_apic_msr_read(APIC_ID); int apicid = native_apic_msr_read(APIC_ID);
...@@ -178,7 +181,7 @@ static __init int setup_nox2apic(char *str) ...@@ -178,7 +181,7 @@ static __init int setup_nox2apic(char *str)
} else } else
setup_clear_cpu_cap(X86_FEATURE_X2APIC); setup_clear_cpu_cap(X86_FEATURE_X2APIC);
nox2apic = 1; nox2apic = true;
return 0; return 0;
} }
......
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