lkml.org 
[lkml]   [2006]   [Feb]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
Subject[PATCH 2.6.16-rc3] m32r: __cmpxchg_u32 fix
From
This patch fixes a bug of include/asm-m32r/system.h:__cmpxchg_u32().

static __inline__ unsigned long
__cmpxchg_u32(volatile unsigned int *p, unsigned int old, unsigned int new);

In __cmpxchg_u32(), the "old" value must not be changed to the previous "*p"
value. But the former code modifies the previous "*p" value.

A deadlock at _atomic_dec_and_lock sometimes happened due to this bug.

Please apply this patch.

Thanks,

Signed-off-by: Hayato Fujiwara <fujiwara@linux-m32r.org>
Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
---

include/asm-m32r/system.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6.16-rc3/include/asm-m32r/system.h
===================================================================
--- linux-2.6.16-rc3.orig/include/asm-m32r/system.h 2006-02-17 22:02:08.701003359 +0900
+++ linux-2.6.16-rc3/include/asm-m32r/system.h 2006-02-17 22:04:13.304341309 +0900
@@ -239,7 +239,7 @@ __cmpxchg_u32(volatile unsigned int *p,
" bra 2f; \n"
" .fillinsn \n"
"1:"
- M32R_UNLOCK" %2, @%1; \n"
+ M32R_UNLOCK" %0, @%1; \n"
" .fillinsn \n"
"2:"
: "=&r" (retval)
--
Hirokazu Takata <takata@linux-m32r.org>
Linux/M32R Project: http://www.linux-m32r.org/

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-02-20 14:42    [W:0.033 / U:1.460 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site