Subject: Dual-core G5 interrupt controller supported
To: None <port-macppc@NetBSD.org>
From: Yevgeny Binder <yevbee@comcast.net>
List: port-macppc
Date: 08/21/2006 14:05:17
Hi guys,

Here's a simple patch that lets the system recognize the interrupt  
controller on dual-core G5s. It's been tested on one, as well as on a  
June 2004 Power Mac G5. I'd like to know if it works on anyone's dual- 
core system, or if it breaks on any older G5 machines (Power Mac,  
iMac, or Xserve). Thanks!

- Yevgeny Binder

-----------------------------

Index: macppc/extintr.c
===================================================================
RCS file: /cvsroot/src/sys/arch/macppc/macppc/extintr.c,v
retrieving revision 1.58
diff -p -u -r1.58 extintr.c
--- macppc/extintr.c    14 Aug 2006 11:17:59 -0000      1.58
+++ macppc/extintr.c    19 Aug 2006 19:42:20 -0000
@@ -1082,7 +1082,8 @@ init_interrupt()
         if ((ictlr = OF_finddevice("/interrupt-controller")) == -1)
                 goto failed;
#elif defined (PMAC_G5)
-       if ((ictlr = OF_finddevice("macio-mpic")) == -1)
+       if (((chosen = OF_finddevice("/chosen")) == -1)  ||
+               (OF_getprop(chosen, "uni-interrupt-controller",  
&ictlr, 4) != 4))
                 goto failed;
#else
         if (((chosen = OF_finddevice("/chosen")) == -1)  ||