Subject: first call softintr__init()
To: None <port-powerpc@netbsd.org>
From: KIYOHARA Takashi <kiyohara@kk.iij4u.or.jp>
List: port-powerpc
Date: 11/26/2007 10:29:20
----Next_Part(Mon_Nov_26_10_29_20_2007_142)--
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Hi! all,


Our OPENBLOCKS266 hangs up when boot time, because "struct pool
softintr_pool" not initialized yet.  And it loops in pool_get() infinitely.
We shall call intr_init() before call loginit().  Move to call in
sys/arch/powerpc/ibm4xx/ibm4xx_machdep.c::ibm4xx_cpu_startup() (MI code). 

This patch attached.  I will commit next weekend.  ;-)

Thanks,
--
kiyohara

----Next_Part(Mon_Nov_26_10_29_20_2007_142)--
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="ibm4xx_softintr.diff"

? evbppc/compile/OPENBLOCKS266
? evbppc/compile/WORLD
? evbppc/conf/WORLD
? evbppc/conf/WORLD.diff
Index: powerpc/ibm4xx/ibm4xx_machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/powerpc/ibm4xx/ibm4xx_machdep.c,v
retrieving revision 1.7
diff -u -r1.7 ibm4xx_machdep.c
--- powerpc/ibm4xx/ibm4xx_machdep.c	4 Mar 2007 06:00:34 -0000	1.7
+++ powerpc/ibm4xx/ibm4xx_machdep.c	26 Nov 2007 00:45:53 -0000
@@ -324,6 +324,8 @@
 
 	format_bytes(pbuf, sizeof(pbuf), ptoa(uvmexp.free));
 	printf("avail memory = %s\n", pbuf);
+
+	intr_init();
 }
 
 /*
Index: evbppc/explora/machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/evbppc/explora/machdep.c,v
retrieving revision 1.20
diff -u -r1.20 machdep.c
--- evbppc/explora/machdep.c	17 Oct 2007 19:54:17 -0000	1.20
+++ evbppc/explora/machdep.c	26 Nov 2007 00:45:54 -0000
@@ -364,8 +364,6 @@
 				pn) == false)
 		panic("setting processor-frequency");
 	prop_object_release(pn);
-
-	intr_init();
 }
 
 int
Index: evbppc/obs405/obs200_autoconf.c
===================================================================
RCS file: /cvsroot/src/sys/arch/evbppc/obs405/obs200_autoconf.c,v
retrieving revision 1.4
diff -u -r1.4 obs200_autoconf.c
--- evbppc/obs405/obs200_autoconf.c	7 Oct 2006 14:59:53 -0000	1.4
+++ evbppc/obs405/obs200_autoconf.c	26 Nov 2007 00:45:54 -0000
@@ -50,7 +50,6 @@
 cpu_configure(void)
 {
 
-	intr_init();
 	calc_delayconst();
 
 	/* Make sure that timers run at CPU frequency */
Index: evbppc/obs405/obs266_autoconf.c
===================================================================
RCS file: /cvsroot/src/sys/arch/evbppc/obs405/obs266_autoconf.c,v
retrieving revision 1.4
diff -u -r1.4 obs266_autoconf.c
--- evbppc/obs405/obs266_autoconf.c	7 Oct 2006 14:59:53 -0000	1.4
+++ evbppc/obs405/obs266_autoconf.c	26 Nov 2007 00:45:54 -0000
@@ -50,7 +50,6 @@
 cpu_configure(void)
 {
 
-	intr_init();
 	calc_delayconst();
 
 	/* Make sure that timers run at CPU frequency */
Index: evbppc/virtex/autoconf.c
===================================================================
RCS file: /cvsroot/src/sys/arch/evbppc/virtex/autoconf.c,v
retrieving revision 1.1
diff -u -r1.1 autoconf.c
--- evbppc/virtex/autoconf.c	2 Dec 2006 22:18:47 -0000	1.1
+++ evbppc/virtex/autoconf.c	26 Nov 2007 00:45:54 -0000
@@ -84,7 +84,6 @@
 void
 cpu_configure(void)
 {
-	intr_init();
 	calc_delayconst();
 
 	if (config_rootfound("plb", &local_plb_devs) == NULL)
Index: evbppc/walnut/autoconf.c
===================================================================
RCS file: /cvsroot/src/sys/arch/evbppc/walnut/autoconf.c,v
retrieving revision 1.17
diff -u -r1.17 autoconf.c
--- evbppc/walnut/autoconf.c	22 Feb 2007 05:27:47 -0000	1.17
+++ evbppc/walnut/autoconf.c	26 Nov 2007 00:45:54 -0000
@@ -59,7 +59,6 @@
 cpu_configure(void)
 {
 
-	intr_init();
 	calc_delayconst();
 
 	/* Make sure that timers run at CPU frequency */

----Next_Part(Mon_Nov_26_10_29_20_2007_142)----