Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 8 Feb 2011 22:08:00 +0000 (UTC)
From:      Marius Strobl <marius@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r218458 - in stable/8/sys: sparc64/include sparc64/pci sparc64/sbus sparc64/sparc64 sys
Message-ID:  <201102082208.p18M80cl061287@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: marius
Date: Tue Feb  8 22:08:00 2011
New Revision: 218458
URL: http://svn.freebsd.org/changeset/base/218458

Log:
  MFC: r216961
  
  Reserve INTR_MD[1-4] similarly to what BUS_DMA_BUS[1-4] are intended for
  and switch sparc64 to use the first one for bus error filter handlers of
  bridge drivers instead of (ab)using INTR_FAST for that so we eventually
  can get rid of the latter.
  
  Reviewed by:	jhb

Modified:
  stable/8/sys/sparc64/include/intr_machdep.h
  stable/8/sys/sparc64/pci/fire.c
  stable/8/sys/sparc64/pci/psycho.c
  stable/8/sys/sparc64/pci/schizo.c
  stable/8/sys/sparc64/sbus/sbus.c
  stable/8/sys/sparc64/sparc64/intr_machdep.c
  stable/8/sys/sys/bus.h
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/sparc64/include/intr_machdep.h
==============================================================================
--- stable/8/sys/sparc64/include/intr_machdep.h	Tue Feb  8 21:58:13 2011	(r218457)
+++ stable/8/sys/sparc64/include/intr_machdep.h	Tue Feb  8 22:08:00 2011	(r218458)
@@ -47,11 +47,13 @@
 #define	PIL_STOP	5	/* stop cpu ipi */
 #define	PIL_PREEMPT	6	/* preempt idle thread cpu ipi */
 #define	PIL_FILTER	12	/* filter interrupts */
-#define	PIL_FAST	13	/* fast interrupts */
+#define	PIL_BRIDGE	13	/* bridge interrupts */
 #define	PIL_TICK	14	/* tick interrupts */
 
 #ifndef LOCORE
 
+#define	INTR_BRIDGE	INTR_MD1
+
 struct trapframe;
 
 typedef	void ih_func_t(struct trapframe *);

Modified: stable/8/sys/sparc64/pci/fire.c
==============================================================================
--- stable/8/sys/sparc64/pci/fire.c	Tue Feb  8 21:58:13 2011	(r218457)
+++ stable/8/sys/sparc64/pci/fire.c	Tue Feb  8 22:08:00 2011	(r218458)
@@ -836,7 +836,7 @@ fire_set_intr(struct fire_softc *sc, u_i
 	    INTIGN(vec) != sc->sc_ign ||
 	    intr_vectors[vec].iv_ic != &fire_ic ||
 	    bus_setup_intr(sc->sc_dev, sc->sc_irq_res[index],
-	    INTR_TYPE_MISC | INTR_FAST, handler, NULL, arg,
+	    INTR_TYPE_MISC | INTR_BRIDGE, handler, NULL, arg,
 	    &sc->sc_ihand[index]) != 0)
 		panic("%s: failed to set up interrupt %d", __func__, index);
 }

Modified: stable/8/sys/sparc64/pci/psycho.c
==============================================================================
--- stable/8/sys/sparc64/pci/psycho.c	Tue Feb  8 21:58:13 2011	(r218457)
+++ stable/8/sys/sparc64/pci/psycho.c	Tue Feb  8 22:08:00 2011	(r218458)
@@ -716,7 +716,7 @@ psycho_set_intr(struct psycho_softc *sc,
 	    INTVEC(PSYCHO_READ8(sc, intrmap)) != vec ||
 	    intr_vectors[vec].iv_ic != &psycho_ic ||
 	    bus_setup_intr(sc->sc_dev, sc->sc_irq_res[index],
-	    INTR_TYPE_MISC | INTR_FAST, filt, intr, sc,
+	    INTR_TYPE_MISC | INTR_BRIDGE, filt, intr, sc,
 	    &sc->sc_ihand[index]) != 0)
 		panic("%s: failed to set up interrupt %d", __func__, index);
 }

Modified: stable/8/sys/sparc64/pci/schizo.c
==============================================================================
--- stable/8/sys/sparc64/pci/schizo.c	Tue Feb  8 21:58:13 2011	(r218457)
+++ stable/8/sys/sparc64/pci/schizo.c	Tue Feb  8 22:08:00 2011	(r218458)
@@ -745,7 +745,7 @@ schizo_set_intr(struct schizo_softc *sc,
 	    INTIGN(vec) != sc->sc_ign ||
 	    intr_vectors[vec].iv_ic != &schizo_ic ||
 	    bus_setup_intr(sc->sc_dev, sc->sc_irq_res[index],
-	    INTR_TYPE_MISC | INTR_FAST, handler, NULL, sc,
+	    INTR_TYPE_MISC | INTR_BRIDGE, handler, NULL, sc,
 	    &sc->sc_ihand[index]) != 0)
 		panic("%s: failed to set up interrupt %d", __func__, index);
 }

Modified: stable/8/sys/sparc64/sbus/sbus.c
==============================================================================
--- stable/8/sys/sparc64/sbus/sbus.c	Tue Feb  8 21:58:13 2011	(r218457)
+++ stable/8/sys/sparc64/sbus/sbus.c	Tue Feb  8 22:08:00 2011	(r218458)
@@ -459,7 +459,7 @@ sbus_attach(device_t dev)
 	    INTIGN(vec = rman_get_start(sc->sc_ot_ires)) != sc->sc_ign ||
 	    INTVEC(SYSIO_READ8(sc, SBR_THERM_INT_MAP)) != vec ||
 	    intr_vectors[vec].iv_ic != &sbus_ic ||
-	    bus_setup_intr(dev, sc->sc_ot_ires, INTR_TYPE_MISC | INTR_FAST,
+	    bus_setup_intr(dev, sc->sc_ot_ires, INTR_TYPE_MISC | INTR_BRIDGE,
 	    NULL, sbus_overtemp, sc, &sc->sc_ot_ihand) != 0)
 		panic("%s: failed to set up temperature interrupt", __func__);
 	i = 3;
@@ -469,7 +469,7 @@ sbus_attach(device_t dev)
 	    INTIGN(vec = rman_get_start(sc->sc_pf_ires)) != sc->sc_ign ||
 	    INTVEC(SYSIO_READ8(sc, SBR_POWER_INT_MAP)) != vec ||
 	    intr_vectors[vec].iv_ic != &sbus_ic ||
-	    bus_setup_intr(dev, sc->sc_pf_ires, INTR_TYPE_MISC | INTR_FAST,
+	    bus_setup_intr(dev, sc->sc_pf_ires, INTR_TYPE_MISC | INTR_BRIDGE,
 	    NULL, sbus_pwrfail, sc, &sc->sc_pf_ihand) != 0)
 		panic("%s: failed to set up power fail interrupt", __func__);
 

Modified: stable/8/sys/sparc64/sparc64/intr_machdep.c
==============================================================================
--- stable/8/sys/sparc64/sparc64/intr_machdep.c	Tue Feb  8 21:58:13 2011	(r218457)
+++ stable/8/sys/sparc64/sparc64/intr_machdep.c	Tue Feb  8 22:08:00 2011	(r218458)
@@ -98,7 +98,7 @@ static const char *const pil_names[] = {
 	"preempt",	/* PIL_PREEMPT */
 	"stray", "stray", "stray", "stray", "stray",
 	"filter",	/* PIL_FILTER */
-	"fast",		/* PIL_FAST */
+	"bridge",	/* PIL_BRIDGE */
 	"tick",		/* PIL_TICK */
 };
 
@@ -327,10 +327,10 @@ inthand_add(const char *name, int vec, d
 	if (vec < 0 || vec >= IV_MAX)
 		return (EINVAL);
 	/*
-	 * INTR_FAST filters/handlers are special purpose only, allowing
+	 * INTR_BRIDGE filters/handlers are special purpose only, allowing
 	 * them to be shared just would complicate things unnecessarily.
 	 */
-	if ((flags & INTR_FAST) != 0 && (flags & INTR_EXCL) == 0)
+	if ((flags & INTR_BRIDGE) != 0 && (flags & INTR_EXCL) == 0)
 		return (EINVAL);
 	sx_xlock(&intr_table_lock);
 	iv = &intr_vectors[vec];
@@ -348,7 +348,7 @@ inthand_add(const char *name, int vec, d
 	ic->ic_disable(iv);
 	iv->iv_refcnt++;
 	if (iv->iv_refcnt == 1)
-		intr_setup((flags & INTR_FAST) != 0 ? PIL_FAST :
+		intr_setup((flags & INTR_BRIDGE) != 0 ? PIL_BRIDGE :
 		    filt != NULL ? PIL_FILTER : PIL_ITHREAD, intr_fast,
 		    vec, intr_execute_handlers, iv);
 	else if (filt != NULL) {

Modified: stable/8/sys/sys/bus.h
==============================================================================
--- stable/8/sys/sys/bus.h	Tue Feb  8 21:58:13 2011	(r218457)
+++ stable/8/sys/sys/bus.h	Tue Feb  8 22:08:00 2011	(r218458)
@@ -194,7 +194,11 @@ enum intr_type {
 	INTR_FAST = 128,
 	INTR_EXCL = 256,		/* exclusive interrupt */
 	INTR_MPSAFE = 512,		/* this interrupt is SMP safe */
-	INTR_ENTROPY = 1024		/* this interrupt provides entropy */
+	INTR_ENTROPY = 1024,		/* this interrupt provides entropy */
+	INTR_MD1 = 4096,		/* flag reserved for MD use */
+	INTR_MD2 = 8192,		/* flag reserved for MD use */
+	INTR_MD3 = 16384,		/* flag reserved for MD use */
+	INTR_MD4 = 32768		/* flag reserved for MD use */
 };
 
 enum intr_trigger {



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