提交 357089fc 编写于 作者: C Christoph Lameter 提交者: Tejun Heo

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: NChristoph Lameter <cl@linux.com>
Acked-by: N"H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: NTejun Heo <tj@kernel.org>
上级 c1955b5f
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册