aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/apic/apic.c
diff options
context:
space:
mode:
authorDavid Vrabel <david.vrabel@citrix.com>2014-04-07 08:52:12 -0400
committerDavid Vrabel <david.vrabel@citrix.com>2014-04-07 08:52:12 -0400
commit2c5cb2770392fb9c5d8518688c8bc61986d70dc6 (patch)
treeb19210e709de6ee0d22b67ef605a569500cf1a18 /arch/x86/kernel/apic/apic.c
parentcd979883b9ede90643e019f33cb317933eb867b4 (diff)
parent683b6c6f82a60fabf47012581c2cfbf1b037ab95 (diff)
Merge commit '683b6c6f82a60fabf47012581c2cfbf1b037ab95' into stable/for-linus-3.15
This merge of the irq-core-for-linus branch broke the ARM build when Xen is enabled. Conflicts: drivers/xen/events/events_base.c
Diffstat (limited to 'arch/x86/kernel/apic/apic.c')
-rw-r--r--arch/x86/kernel/apic/apic.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
index 7f26c9a70a9e..53e20531470e 100644
--- a/arch/x86/kernel/apic/apic.c
+++ b/arch/x86/kernel/apic/apic.c
@@ -133,6 +133,10 @@ static inline void imcr_apic_to_pic(void)
133 * +1=force-enable 133 * +1=force-enable
134 */ 134 */
135static int force_enable_local_apic __initdata; 135static int force_enable_local_apic __initdata;
136
137/* Control whether x2APIC mode is enabled or not */
138static bool nox2apic __initdata;
139
136/* 140/*
137 * APIC command line parameters 141 * APIC command line parameters
138 */ 142 */
@@ -162,8 +166,7 @@ int x2apic_mode;
162/* x2apic enabled before OS handover */ 166/* x2apic enabled before OS handover */
163int x2apic_preenabled; 167int x2apic_preenabled;
164static int x2apic_disabled; 168static int x2apic_disabled;
165static int nox2apic; 169static int __init setup_nox2apic(char *str)
166static __init int setup_nox2apic(char *str)
167{ 170{
168 if (x2apic_enabled()) { 171 if (x2apic_enabled()) {
169 int apicid = native_apic_msr_read(APIC_ID); 172 int apicid = native_apic_msr_read(APIC_ID);
@@ -178,7 +181,7 @@ static __init int setup_nox2apic(char *str)
178 } else 181 } else
179 setup_clear_cpu_cap(X86_FEATURE_X2APIC); 182 setup_clear_cpu_cap(X86_FEATURE_X2APIC);
180 183
181 nox2apic = 1; 184 nox2apic = true;
182 185
183 return 0; 186 return 0;
184} 187}
@@ -283,8 +286,12 @@ u32 native_safe_apic_wait_icr_idle(void)
283 286
284void native_apic_icr_write(u32 low, u32 id) 287void native_apic_icr_write(u32 low, u32 id)
285{ 288{
289 unsigned long flags;
290
291 local_irq_save(flags);
286 apic_write(APIC_ICR2, SET_APIC_DEST_FIELD(id)); 292 apic_write(APIC_ICR2, SET_APIC_DEST_FIELD(id));
287 apic_write(APIC_ICR, low); 293 apic_write(APIC_ICR, low);
294 local_irq_restore(flags);
288} 295}
289 296
290u64 native_apic_icr_read(void) 297u64 native_apic_icr_read(void)