Subject: Re: test kernel for cobalt
To: None <port-cobalt@NetBSD.org>
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
List: port-cobalt
Date: 06/01/2006 08:20:21
mk@kilbi.de wrote:

> Is it correct that there is no separate cobalt/interrupt.c file
> as in your previous patch?

Yes.
Intriducing a new file could be problematic on pullup requests,
so I put all stuff into existing machdep.c instead of the new file.

> ./mips/lock.h: In function '__cpu_simple_lock':
> ./mips/lock.h:100: warning: matching constraint does not allow a register
> ./mips/lock.h:75: warning: matching constraint does not allow a register
 :
> Any way to resolve that?

The attached patch would appease the warnings, but I'm not sure
if it's correct.
---
Izumi Tsutsui


Index: sys/arch/mips/include/lock.h
===================================================================
RCS file: /cvsroot/src/sys/arch/mips/include/lock.h,v
retrieving revision 1.8
diff -u -r1.8 lock.h
--- sys/arch/mips/include/lock.h	28 Dec 2005 19:09:29 -0000	1.8
+++ sys/arch/mips/include/lock.h	31 May 2006 23:07:40 -0000
@@ -96,7 +96,7 @@
 		"3:				\n"
 		"	.set pop		\n"
 		"# -- END __cpu_simple_lock	\n"
-		: "=r" (t0), "+m" (*lp)
+		: "=r" (t0), "+p" (*lp)
 		: "i" (__SIMPLELOCK_LOCKED), "1" (*lp));
 }
 
@@ -125,7 +125,7 @@
 		"3:				\n"
 		"	.set pop		\n"
 		"# -- END __cpu_simple_lock_try	\n"
-		: "=r" (t0), "=r" (v0), "+m" (*lp)
+		: "=r" (t0), "=r" (v0), "+p" (*lp)
 		: "i" (__SIMPLELOCK_LOCKED), "2" (*lp));
 
 	return (v0 != 0);