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: v2.6.38-rc1~455^2~1 X-Git-Url: https://repo.jachan.dev/linux.git/commitdiff_plain/357089fca91f639dd005ae0721f5f932b4f276ab 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); }