Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Jan 2012 17:17:31 +0000 (UTC)
From:      Nathan Whitehorn <nwhitehorn@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r230776 - in projects/pseries/powerpc: aim powerpc pseries
Message-ID:  <201201301717.q0UHHVa1095040@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: nwhitehorn
Date: Mon Jan 30 17:17:31 2012
New Revision: 230776
URL: http://svn.freebsd.org/changeset/base/230776

Log:
  Allow up to 2^24 IRQs on xics PICs, as the spec requires. Also use multipass
  to make sure xics is registered first so that the interrupt layer knows to
  expect potentially very large IRQ numbers. Some more rototilling is in order
  here later.

Modified:
  projects/pseries/powerpc/aim/nexus.c
  projects/pseries/powerpc/powerpc/intr_machdep.c
  projects/pseries/powerpc/pseries/xics.c

Modified: projects/pseries/powerpc/aim/nexus.c
==============================================================================
--- projects/pseries/powerpc/aim/nexus.c	Mon Jan 30 16:42:02 2012	(r230775)
+++ projects/pseries/powerpc/aim/nexus.c	Mon Jan 30 17:17:31 2012	(r230776)
@@ -195,7 +195,8 @@ static driver_t nexus_driver = {
 
 static devclass_t nexus_devclass;
 
-DRIVER_MODULE(nexus, root, nexus_driver, nexus_devclass, 0, 0);
+EARLY_DRIVER_MODULE(nexus, root, nexus_driver, nexus_devclass, 0, 0,
+    BUS_PASS_BUS);
 
 static int
 nexus_probe(device_t dev)

Modified: projects/pseries/powerpc/powerpc/intr_machdep.c
==============================================================================
--- projects/pseries/powerpc/powerpc/intr_machdep.c	Mon Jan 30 16:42:02 2012	(r230775)
+++ projects/pseries/powerpc/powerpc/intr_machdep.c	Mon Jan 30 17:17:31 2012	(r230776)
@@ -176,7 +176,7 @@ intrcnt_add(const char *name, u_long **c
 static struct powerpc_intr *
 intr_lookup(u_int irq)
 {
-	char intrname[8];
+	char intrname[16];
 	struct powerpc_intr *i, *iscan;
 	int vector;
 

Modified: projects/pseries/powerpc/pseries/xics.c
==============================================================================
--- projects/pseries/powerpc/pseries/xics.c	Mon Jan 30 16:42:02 2012	(r230775)
+++ projects/pseries/powerpc/pseries/xics.c	Mon Jan 30 17:17:31 2012	(r230776)
@@ -50,7 +50,7 @@
 
 #define XICS_PRIORITY	5	/* Random non-zero number */
 #define XICS_IPI	2
-#define MAX_XICS_IRQS	255	/* XXX: Should be 2^24, but causes problem */
+#define MAX_XICS_IRQS	(1<<24)	/* 24-bit XIRR field */
 
 static int	xics_probe(device_t);
 static int	xics_attach(device_t);
@@ -104,7 +104,8 @@ static driver_t xics_driver = {
 
 static devclass_t xics_devclass;
 
-DRIVER_MODULE(xics, nexus, xics_driver, xics_devclass, 0, 0);
+EARLY_DRIVER_MODULE(xics, nexus, xics_driver, xics_devclass, 0, 0,
+    BUS_PASS_INTERRUPT);
 
 static int
 xics_probe(device_t dev)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201201301717.q0UHHVa1095040>