diff options
Diffstat (limited to 'arch/x86/include/asm/apic.h')
-rw-r--r-- | arch/x86/include/asm/apic.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/x86/include/asm/apic.h b/arch/x86/include/asm/apic.h index 394d177d721..00f5962d82d 100644 --- a/arch/x86/include/asm/apic.h +++ b/arch/x86/include/asm/apic.h | |||
@@ -108,6 +108,16 @@ extern void native_apic_icr_write(u32 low, u32 id); | |||
108 | extern u64 native_apic_icr_read(void); | 108 | extern u64 native_apic_icr_read(void); |
109 | 109 | ||
110 | #ifdef CONFIG_X86_X2APIC | 110 | #ifdef CONFIG_X86_X2APIC |
111 | /* | ||
112 | * Make previous memory operations globally visible before | ||
113 | * sending the IPI through x2apic wrmsr. We need a serializing instruction or | ||
114 | * mfence for this. | ||
115 | */ | ||
116 | static inline void x2apic_wrmsr_fence(void) | ||
117 | { | ||
118 | asm volatile("mfence" : : : "memory"); | ||
119 | } | ||
120 | |||
111 | static inline void native_apic_msr_write(u32 reg, u32 v) | 121 | static inline void native_apic_msr_write(u32 reg, u32 v) |
112 | { | 122 | { |
113 | if (reg == APIC_DFR || reg == APIC_ID || reg == APIC_LDR || | 123 | if (reg == APIC_DFR || reg == APIC_ID || reg == APIC_LDR || |
@@ -184,6 +194,9 @@ static inline int x2apic_enabled(void) | |||
184 | { | 194 | { |
185 | return 0; | 195 | return 0; |
186 | } | 196 | } |
197 | |||
198 | #define x2apic 0 | ||
199 | |||
187 | #endif | 200 | #endif |
188 | 201 | ||
189 | extern int get_physical_broadcast(void); | 202 | extern int get_physical_broadcast(void); |