diff options
Diffstat (limited to 'arch/x86/include')
| -rw-r--r-- | arch/x86/include/asm/apic.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/x86/include/asm/apic.h b/arch/x86/include/asm/apic.h index 6d5b6f0900e..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 || |
