From: Christoph Lameter Date: Thu, 16 Dec 2010 18:14:43 +0000 (-0600) Subject: x86: udelay: Use this_cpu_read to avoid address calculation X-Git-Tag: android-x86-2.2-r2~1150^2~1 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=357089fca91f639dd005ae0721f5f932b4f276ab;p=android-x86%2Fkernel.git 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 Acked-by: "H. Peter Anvin" Signed-off-by: Tejun Heo --- 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); }