Linux MIPS Architecture development
 help / color / mirror / Atom feed
* compile error in __cmpxchg_u32
@ 2003-12-10  4:09 Yoichi Yuasa
  2003-12-12 13:11 ` Ralf Baechle
  0 siblings, 1 reply; 2+ messages in thread
From: Yoichi Yuasa @ 2003-12-10  4:09 UTC (permalink / raw)
  To: linux-mips

[-- Attachment #1: Type: text/plain, Size: 380 bytes --]

Hi,

I found following error in 2.6, when I compiled.

include/asm/system.h: In function `__cmpxchg_u32':
include/asm/system.h:407: error: `val' undeclared (first use in this function)
include/asm/system.h:407: error: (Each undeclared identifier is reported only once
include/asm/system.h:407: error: for each function it appears in.)

I made patch. Is this patch right?

Yoichi


[-- Attachment #2: cmpxchg-v26.diff --]
[-- Type: text/plain, Size: 616 bytes --]

diff -aruN --exclude=CVS --exclude=.cvsignore linux.orig/include/asm-mips/system.h linux/include/asm-mips/system.h
--- linux.orig/include/asm-mips/system.h	2003-12-03 11:30:36.000000000 +0900
+++ linux/include/asm-mips/system.h	2003-12-09 11:21:08.000000000 +0900
@@ -404,7 +404,8 @@
 
 	local_irq_save(flags);
 	retval = *m;
-	*m = val;
+	if (retval == old)
+		*m = new;
 	local_irq_restore(flags);	/* implies memory barrier  */
 #endif
 
@@ -440,7 +441,8 @@
 
 	local_irq_save(flags);
 	retval = *m;
-	*m = val;
+	if (retval == old)
+		*m = new;
 	local_irq_restore(flags);	/* implies memory barrier  */
 #endif
 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-12-12 13:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-12-10  4:09 compile error in __cmpxchg_u32 Yoichi Yuasa
2003-12-12 13:11 ` Ralf Baechle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox