Skip to content

Commit 357089f

Browse files
Christoph Lameterhtejun
authored andcommitted
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 <[email protected]> Acked-by: "H. Peter Anvin" <[email protected]> Signed-off-by: Tejun Heo <[email protected]>
1 parent c1955b5 commit 357089f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/x86/lib/delay.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ inline void __const_udelay(unsigned long xloops)
121121
asm("mull %%edx"
122122
:"=d" (xloops), "=&a" (d0)
123123
:"1" (xloops), "0"
124-
(cpu_data(raw_smp_processor_id()).loops_per_jiffy * (HZ/4)));
124+
(this_cpu_read(cpu_info.loops_per_jiffy) * (HZ/4)));
125125

126126
__delay(++xloops);
127127
}

0 commit comments

Comments
 (0)