Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Jul 2012 00:58:41 +0000 (UTC)
From:      Marcel Moolenaar <marcel@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r238324 - projects/altix2/sys/ia64/sgisn
Message-ID:  <201207100058.q6A0wfjs050130@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: marcel
Date: Tue Jul 10 00:58:40 2012
New Revision: 238324
URL: http://svn.freebsd.org/changeset/base/238324

Log:
  Remove the hack used by sncon0 to acknowledge the console interrupt
  by writing an IVAR. It's now done directly by the interrupt code
  and by calling shub_iack().
  
  Also remove shub_conf_final() -- we do not have to ack any pending
  interrupts as a way to make interrupts working. They just work...

Modified:
  projects/altix2/sys/ia64/sgisn/sgisn_shub.c

Modified: projects/altix2/sys/ia64/sgisn/sgisn_shub.c
==============================================================================
--- projects/altix2/sys/ia64/sgisn/sgisn_shub.c	Tue Jul 10 00:55:41 2012	(r238323)
+++ projects/altix2/sys/ia64/sgisn/sgisn_shub.c	Tue Jul 10 00:58:40 2012	(r238324)
@@ -503,19 +503,8 @@ sgisn_shub_read_ivar(device_t dev, devic
 static int
 sgisn_shub_write_ivar(device_t dev, device_t child, int which, uintptr_t value)
 {
-	struct sgisn_shub_softc *sc = device_get_softc(dev);
-	uint64_t ev;
-
-	if (which != SHUB_IVAR_EVENT)
-		return (ENOENT);
 
-	ev = bus_space_read_8(sc->sc_tag, sc->sc_hndl, SHUB_MMR_EVENT);
-	if (ev & value)
-		bus_space_write_8(sc->sc_tag, sc->sc_hndl, SHUB_MMR_EVENT_WR,
-		    value);
-	device_printf(dev, "XXX: %s: child=%p, event=%lx, mask=%lx\n",
-	    __func__, child, ev, value);
-	return (0);
+	return (ENOENT);
 }
 
 static int
@@ -561,20 +550,13 @@ sgisn_shub_iommu_map(device_t dev, busdm
 void
 shub_iack(const char *f, u_int xiv)
 {
-	uintptr_t mask;
-
-	printf("%s(%u) -- ", f, xiv);
-	mask = (xiv == 0xe9) ? SHUB_EVENT_CONSOLE : 0x670000000;
-	sgisn_shub_write_ivar(shub_dev, NULL, SHUB_IVAR_EVENT, mask);
-}
+	struct sgisn_shub_softc *sc = device_get_softc(shub_dev);
+	uint64_t ev;
 
-static void
-shub_conf_final(void *arg)
-{
+	ev = bus_space_read_8(sc->sc_tag, sc->sc_hndl, SHUB_MMR_EVENT);
+	ev &= (xiv == 0xe9) ? SHUB_EVENT_CONSOLE : (0x3UL << 33);
+	if (!ev)
+		return;
 
-	if (shub_dev != NULL)
-		sgisn_shub_write_ivar(shub_dev, NULL, SHUB_IVAR_EVENT,
-		    0x670000000);
+	bus_space_write_8(sc->sc_tag, sc->sc_hndl, SHUB_MMR_EVENT_WR, ev);
 }
-SYSINIT(shub_configure, SI_SUB_CONFIGURE, SI_ORDER_ANY, shub_conf_final, NULL);
-



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