Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 357089fc authored by Christoph Lameter's avatar Christoph Lameter Committed by Tejun Heo
Browse files

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: default avatarChristoph Lameter <cl@linux.com>
Acked-by: default avatar"H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
parent c1955b5f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);
}