]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
x86: udelay: Use this_cpu_read to avoid address calculation
authorChristoph Lameter <cl@linux.com>
Thu, 16 Dec 2010 18:14:43 +0000 (12:14 -0600)
committerTejun Heo <tj@kernel.org>
Tue, 4 Jan 2011 05:08:55 +0000 (06:08 +0100)
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>
arch/x86/lib/delay.c

index ff485d361182f814624e238e1ebc418c28c05e79..fc45ba887d051e504dd592be40ec2e78d70eea33 100644 (file)
@@ -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);
 }