lkml.org 
[lkml]   [2011]   [Sep]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[RFC][PATCH 1/5] x86: Remove const_udelay() caring about which cpu var it uses
From: Steven Rostedt <srostedt@redhat.com>

The __const_udelay() code originally used raw_smp_processor_id()
in its calculations for a delaying. Probably because if it were
to migrate, it would take much longer to do so than the requested
delay.

Switch from this_cpu_read() to __this_cpu_read() to document that
the read is racy and we do not care.

Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
arch/x86/lib/delay.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/lib/delay.c b/arch/x86/lib/delay.c
index fc45ba8..1b9bde5 100644
--- 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"
- (this_cpu_read(cpu_info.loops_per_jiffy) * (HZ/4)));
+ (__this_cpu_read(cpu_info.loops_per_jiffy) * (HZ/4)));

__delay(++xloops);
}
--
1.7.5.4



\
 
 \ /
  Last update: 2011-09-19 23:29    [W:0.210 / U:5.084 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site