aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/include/asm/vgtod.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/x86/include/asm/vgtod.h b/arch/x86/include/asm/vgtod.h
index e7e9682a33e9..f556c4843aa1 100644
--- a/arch/x86/include/asm/vgtod.h
+++ b/arch/x86/include/asm/vgtod.h
@@ -80,9 +80,11 @@ static inline unsigned int __getcpu(void)
80 80
81 /* 81 /*
82 * Load per CPU data from GDT. LSL is faster than RDTSCP and 82 * Load per CPU data from GDT. LSL is faster than RDTSCP and
83 * works on all CPUs. 83 * works on all CPUs. This is volatile so that it orders
84 * correctly wrt barrier() and to keep gcc from cleverly
85 * hoisting it out of the calling function.
84 */ 86 */
85 asm("lsl %1,%0" : "=r" (p) : "r" (__PER_CPU_SEG)); 87 asm volatile ("lsl %1,%0" : "=r" (p) : "r" (__PER_CPU_SEG));
86 88
87 return p; 89 return p;
88} 90}