[RFC][PATCH 1/5] x86: Remove const_udelay() caring about which cpu var it uses
From: Steven Rostedt
Date: Mon Sep 19 2011 - 17:26:50 EST
From: Steven Rostedt <srostedt@xxxxxxxxxx>
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@xxxxxxxxxxxxx>
Cc: Ingo Molnar <mingo@xxxxxxx>
Signed-off-by: Steven Rostedt <rostedt@xxxxxxxxxxx>
---
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/