diff options
author | Suresh Siddha <suresh.b.siddha@intel.com> | 2009-03-17 14:16:54 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-03-18 04:36:14 -0400 |
commit | ce4e240c279a31096f74afa6584a62d64a1ba8c8 (patch) | |
tree | 2b5f7bdf6dc058c09257977929d8f622e6c09466 /arch/x86/include | |
parent | fa4b57cc045d6134b9862b2873f9c8ba9ed53ffe (diff) |
x86: add x2apic_wrmsr_fence() to x2apic flush tlb paths
Impact: optimize APIC IPI related barriers
Uncached MMIO accesses for xapic are inherently serializing and hence
we don't need explicit barriers for xapic IPI paths.
x2apic MSR writes/reads don't have serializing semantics and hence need
a serializing instruction or mfence, to make all the previous memory
stores globally visisble before the x2apic msr write for IPI.
Add x2apic_wrmsr_fence() in flush tlb path to x2apic specific paths.
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Jens Axboe <jens.axboe@oracle.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: "steiner@sgi.com" <steiner@sgi.com>
Cc: Nick Piggin <npiggin@suse.de>
LKML-Reference: <1237313814.27006.203.camel@localhost.localdomain>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
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 6d5b6f0900e1..00f5962d82d0 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 || |