From owner-svn-src-head@FreeBSD.ORG Thu Mar 19 20:48:48 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0FF94106564A; Thu, 19 Mar 2009 20:48:48 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D71BD8FC1A; Thu, 19 Mar 2009 20:48:47 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n2JKmlWv075483; Thu, 19 Mar 2009 20:48:47 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n2JKmlg9075482; Thu, 19 Mar 2009 20:48:47 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <200903192048.n2JKmlg9075482@svn.freebsd.org> From: Marius Strobl Date: Thu, 19 Mar 2009 20:48:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r190108 - head/sys/sparc64/pci X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Mar 2009 20:48:49 -0000 Author: marius Date: Thu Mar 19 20:48:47 2009 New Revision: 190108 URL: http://svn.freebsd.org/changeset/base/190108 Log: - Take advantage of KOBJMETHOD_END. - Hook up the streaming buffer (not used by iommu(4) by default, yet) if available and usable. [1] - Move the message regarding belated registration as interrupt control under bootverbose as this isn't something the user should worry about. Tested by: Michael Moll [1] Modified: head/sys/sparc64/pci/schizo.c Modified: head/sys/sparc64/pci/schizo.c ============================================================================== --- head/sys/sparc64/pci/schizo.c Thu Mar 19 20:46:51 2009 (r190107) +++ head/sys/sparc64/pci/schizo.c Thu Mar 19 20:48:47 2009 (r190108) @@ -148,7 +148,7 @@ static device_method_t schizo_methods[] /* ofw_bus interface */ DEVMETHOD(ofw_bus_get_node, schizo_get_node), - { 0, 0 } + KOBJMETHOD_END }; static devclass_t schizo_devclass; @@ -449,14 +449,17 @@ schizo_attach(device_t dev) tc_init(tc); } - /* Set up the IOMMU. Both Schizo and Tomatillo have one per PBM. */ + /* + * Set up the IOMMU. Schizo, Tomatillo and XMITS all have + * one per PBM. Schizo and XMITS additionally have a streaming + * buffer, in Schizo version < 5 (i.e. revision < 2.3) it's + * affected by several errata and basically unusable though. + */ sc->sc_is.is_pmaxaddr = IOMMU_MAXADDR(STX_IOMMU_BITS); - sc->sc_is.is_sb[0] = 0; - sc->sc_is.is_sb[1] = 0; -#ifdef notyet - if (OF_getproplen(node, "no-streaming-cache") < 0) + sc->sc_is.is_sb[0] = sc->sc_is.is_sb[1] = 0; + if (OF_getproplen(node, "no-streaming-cache") < 0 && + !(sc->sc_mode == SCHIZO_MODE_SCZ && sc->sc_ver < 5)) sc->sc_is.is_sb[0] = STX_PCI_STRBUF; -#endif #define TSBCASE(x) \ case (IOTSB_BASESZ << (x)) << (IO_PAGE_SHIFT - IOTTE_SHIFT): \ @@ -1154,8 +1157,9 @@ schizo_setup_intr(device_t dev, device_t "controller for vector 0x%lx (%d)\n", vec, error); return (error); } - device_printf(dev, "belatedly registered as interrupt " - "controller for vector 0x%lx\n", vec); + if (bootverbose) + device_printf(dev, "belatedly registered as " + "interrupt controller for vector 0x%lx\n", vec); } else { device_printf(dev, "invalid interrupt controller for vector 0x%lx\n", vec);