summaryrefslogtreecommitdiff
path: root/arch/x86/lib
diff options
context:
space:
mode:
authorChristoph Lameter <cl@linux.com>2010-12-16 12:14:43 -0600
committerTejun Heo <tj@kernel.org>2011-01-04 06:08:55 +0100
commit357089fca91f639dd005ae0721f5f932b4f276ab (patch)
tree0af40092c4589d7732d10b8da2d4fb52531f504a /arch/x86/lib
parentc1955b5f3a95717ce1f5235f6e9968da068e3183 (diff)
downloadlinux-3.10-357089fca91f639dd005ae0721f5f932b4f276ab.tar.gz
linux-3.10-357089fca91f639dd005ae0721f5f932b4f276ab.tar.bz2
linux-3.10-357089fca91f639dd005ae0721f5f932b4f276ab.zip
x86: udelay: Use this_cpu_read to avoid address calculation
The code will use a segment prefix instead of doing the lookup and calculation. Signed-off-by: Christoph Lameter <cl@linux.com> Acked-by: "H. Peter Anvin" <hpa@zytor.com> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'arch/x86/lib')
-rw-r--r--arch/x86/lib/delay.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/lib/delay.c b/arch/x86/lib/delay.c
index ff485d36118..fc45ba887d0 100644
--- a/arch/x86/lib/delay.c
+++ b/arch/x86/lib/delay.c
@@ -121,7 +121,7 @@ inline void __const_udelay(unsigned long xloops)
asm("mull %%edx"
:"=d" (xloops), "=&a" (d0)
:"1" (xloops), "0"
- (cpu_data(raw_smp_processor_id()).loops_per_jiffy * (HZ/4)));
+ (this_cpu_read(cpu_info.loops_per_jiffy) * (HZ/4)));
__delay(++xloops);
}