summaryrefslogtreecommitdiffstats
path: root/arch/x86/lib/delay.c
diff options
context:
space:
mode:
authorChristoph Lameter <cl@linux.com>2010-12-16 19:14:43 +0100
committerTejun Heo <tj@kernel.org>2011-01-04 06:08:55 +0100
commit357089fca91f639dd005ae0721f5f932b4f276ab (patch)
tree0af40092c4589d7732d10b8da2d4fb52531f504a /arch/x86/lib/delay.c
parentx86: Use this_cpu_inc_return for nmi counter (diff)
downloadlinux-357089fca91f639dd005ae0721f5f932b4f276ab.tar.xz
linux-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/delay.c')
-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 ff485d361182..fc45ba887d05 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);
}