mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-04 18:09:57 +00:00
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 <cl@linux.com> Acked-by: "H. Peter Anvin" <hpa@zytor.com> Signed-off-by: Tejun Heo <tj@kernel.org>
This commit is contained in:
parent
c1955b5f3a
commit
357089fca9
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue