linux-mips
[Top] [All Lists]

[PATCH] Make MIPS udelay() preempt safe

To: mingo@elte.hu
Subject: [PATCH] Make MIPS udelay() preempt safe
From: Deepak Saxena <dsaxena@plexity.net>
Date: Mon, 19 Mar 2007 16:49:45 -0700
Cc: ralf@linux-mips.org, linux-mips@linux-mips.org, Manish Lachwani <mlachwani@mvista.com>
Organization: Plexity Networks
Original-recipient: rfc822;linux-mips@linux-mips.org
Reply-to: dsaxena@plexity.net
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.5.11
Fix MIPS udelay to make is preempt safe under DEBUG_PREEMPT

Signed-off-by: Manish Lachwani <mlachwani@mvista.com>
Signed-off-by: Deepak Saxena <dsaxena@mvista.com>

---

This needs to go into -rt patch set or directly into the MIPS tree.
Applies cleanly to 2.6.21-rc4 and 2.6.21-rc3-rt0.

 include/asm-mips/delay.h |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6.18/include/asm-mips/delay.h
===================================================================
--- linux-2.6.18.orig/include/asm-mips/delay.h
+++ linux-2.6.18/include/asm-mips/delay.h
@@ -79,7 +79,7 @@ static inline void __udelay(unsigned lon
        __delay(usecs);
 }
 
-#define __udelay_val cpu_data[smp_processor_id()].udelay_val
+#define __udelay_val cpu_data[raw_smp_processor_id()].udelay_val
 
 #define udelay(usecs) __udelay((usecs),__udelay_val)
 

-- 
Deepak Saxena - dsaxena@plexity.net - http://www.plexity.net

In the end, they will not say, "those were dark times,"  they will ask
"why were their poets silent?" - Bertolt Brecht

<Prev in Thread] Current Thread [Next in Thread>