projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c1955b5
)
x86: udelay: Use this_cpu_read to avoid address calculation
author
Christoph Lameter
<cl@linux.com>
Thu, 16 Dec 2010 18:14:43 +0000
(12:14 -0600)
committer
Tejun Heo
<tj@kernel.org>
Tue, 4 Jan 2011 05:08:55 +0000
(06:08 +0100)
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>
arch/x86/lib/delay.c
patch
|
blob
|
history
diff --git
a/arch/x86/lib/delay.c
b/arch/x86/lib/delay.c
index ff485d361182f814624e238e1ebc418c28c05e79..fc45ba887d051e504dd592be40ec2e78d70eea33 100644
(file)
--- 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);
}