aboutsummaryrefslogtreecommitdiff
path: root/arch/mips
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2010-03-10 16:16:04 +0100
committerRalf Baechle <ralf@linux-mips.org>2010-04-12 17:26:09 +0100
commitabe5b417fb4a52e9510fdb5a16e722e91bf89e92 (patch)
treeb03b825507fb611837d831ba8a1425b0996ddd7f /arch/mips
parentb1cea3bab575af386618baba0db3c5fae7ce521f (diff)
MIPS: delay: Fix use of current_cpu_data in preemptable code.
This may lead to warnings like: BUG: using smp_processor_id() in preemptible [00000000] code: reboot/1989 caller is __udelay+0x14/0x70 Call Trace: [<ffffffff8110ad28>] dump_stack+0x8/0x34 [<ffffffff812dde04>] debug_smp_processor_id+0xf4/0x110 [<ffffffff812d90bc>] __udelay+0x14/0x70 [<ffffffff81378274>] md_notify_reboot+0x12c/0x148 [<ffffffff81161054>] notifier_call_chain+0x64/0xc8 [<ffffffff811614dc>] __blocking_notifier_call_chain+0x64/0xc0 [<ffffffff8115566c>] kernel_restart_prepare+0x1c/0x38 [<ffffffff811556cc>] kernel_restart+0x14/0x50 [<ffffffff8115581c>] SyS_reboot+0x10c/0x1f0 [<ffffffff81103684>] handle_sysn32+0x44/0x84 Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips')
-rw-r--r--arch/mips/lib/delay.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/mips/lib/delay.c b/arch/mips/lib/delay.c
index 6b3b1de9dca..5995969e8c4 100644
--- a/arch/mips/lib/delay.c
+++ b/arch/mips/lib/delay.c
@@ -41,7 +41,7 @@ EXPORT_SYMBOL(__delay);
void __udelay(unsigned long us)
{
- unsigned int lpj = current_cpu_data.udelay_val;
+ unsigned int lpj = raw_current_cpu_data.udelay_val;
__delay((us * 0x000010c7ull * HZ * lpj) >> 32);
}
@@ -49,7 +49,7 @@ EXPORT_SYMBOL(__udelay);
void __ndelay(unsigned long ns)
{
- unsigned int lpj = current_cpu_data.udelay_val;
+ unsigned int lpj = raw_current_cpu_data.udelay_val;
__delay((ns * 0x00000005ull * HZ * lpj) >> 32);
}