From abe5b417fb4a52e9510fdb5a16e722e91bf89e92 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Wed, 10 Mar 2010 16:16:04 +0100 Subject: 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: [] dump_stack+0x8/0x34 [] debug_smp_processor_id+0xf4/0x110 [] __udelay+0x14/0x70 [] md_notify_reboot+0x12c/0x148 [] notifier_call_chain+0x64/0xc8 [] __blocking_notifier_call_chain+0x64/0xc0 [] kernel_restart_prepare+0x1c/0x38 [] kernel_restart+0x14/0x50 [] SyS_reboot+0x10c/0x1f0 [] handle_sysn32+0x44/0x84 Signed-off-by: Ralf Baechle --- arch/mips/lib/delay.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'arch/mips/lib') 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); } -- cgit v1.2.3