From owner-svn-src-stable@FreeBSD.ORG Wed Jan 13 20:03:25 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 43F7F1065672; Wed, 13 Jan 2010 20:03:25 +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 303E38FC1D; Wed, 13 Jan 2010 20:03:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0DK3PbJ009056; Wed, 13 Jan 2010 20:03:25 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0DK3Owe009044; Wed, 13 Jan 2010 20:03:24 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001132003.o0DK3Owe009044@svn.freebsd.org> From: Marius Strobl Date: Wed, 13 Jan 2010 20:03:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202225 - in stable/8/sys: dev/auxio sparc64/central sparc64/ebus sparc64/fhc sparc64/pci sparc64/sbus sparc64/sparc64 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 20:03:25 -0000 Author: marius Date: Wed Jan 13 20:03:24 2010 New Revision: 202225 URL: http://svn.freebsd.org/changeset/base/202225 Log: MFC: r200874 Enroll these drivers in multipass probing. The motivation behind this is that the JBus to EBus bridges share the interrupt controller of a sibling JBus to PCIe bridge (at least as far as the OFW device tree is concerned, in reality they are part of the same chip) so we have to probe and attach the latter first. That happens to be also the case due to the fact that the JBus to PCIe bridges appear first in the OFW device tree but it doesn't hurt to ensure the right order. Modified: stable/8/sys/dev/auxio/auxio.c stable/8/sys/sparc64/central/central.c stable/8/sys/sparc64/ebus/ebus.c stable/8/sys/sparc64/fhc/fhc.c stable/8/sys/sparc64/pci/apb.c stable/8/sys/sparc64/pci/ofw_pcib.c stable/8/sys/sparc64/pci/ofw_pcibus.c stable/8/sys/sparc64/sbus/dma_sbus.c stable/8/sys/sparc64/sbus/sbus.c stable/8/sys/sparc64/sparc64/nexus.c stable/8/sys/sparc64/sparc64/upa.c 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) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/auxio/auxio.c ============================================================================== --- stable/8/sys/dev/auxio/auxio.c Wed Jan 13 19:59:19 2010 (r202224) +++ stable/8/sys/dev/auxio/auxio.c Wed Jan 13 20:03:24 2010 (r202225) @@ -141,7 +141,9 @@ static driver_t auxio_sbus_driver = { }; static devclass_t auxio_devclass; -DRIVER_MODULE(auxio, sbus, auxio_sbus_driver, auxio_devclass, 0, 0); +/* The probe order is handled by sbus(4). */ +EARLY_DRIVER_MODULE(auxio, sbus, auxio_sbus_driver, auxio_devclass, 0, 0, + BUS_PASS_DEFAULT); MODULE_DEPEND(auxio, sbus, 1, 1, 1); /* EBus */ @@ -158,7 +160,8 @@ static driver_t auxio_ebus_driver = { sizeof(struct auxio_softc) }; -DRIVER_MODULE(auxio, ebus, auxio_ebus_driver, auxio_devclass, 0, 0); +EARLY_DRIVER_MODULE(auxio, ebus, auxio_ebus_driver, auxio_devclass, 0, 0, + BUS_PASS_DEFAULT); MODULE_DEPEND(auxio, ebus, 1, 1, 1); MODULE_VERSION(auxio, 1); Modified: stable/8/sys/sparc64/central/central.c ============================================================================== --- stable/8/sys/sparc64/central/central.c Wed Jan 13 19:59:19 2010 (r202224) +++ stable/8/sys/sparc64/central/central.c Wed Jan 13 20:03:24 2010 (r202225) @@ -105,7 +105,8 @@ static driver_t central_driver = { static devclass_t central_devclass; -DRIVER_MODULE(central, nexus, central_driver, central_devclass, 0, 0); +EARLY_DRIVER_MODULE(central, nexus, central_driver, central_devclass, 0, 0, + BUS_PASS_BUS); MODULE_DEPEND(fhc, nexus, 1, 1, 1); MODULE_VERSION(central, 1); Modified: stable/8/sys/sparc64/ebus/ebus.c ============================================================================== --- stable/8/sys/sparc64/ebus/ebus.c Wed Jan 13 19:59:19 2010 (r202224) +++ stable/8/sys/sparc64/ebus/ebus.c Wed Jan 13 20:03:24 2010 (r202225) @@ -138,7 +138,8 @@ static driver_t ebus_driver = { static devclass_t ebus_devclass; -DRIVER_MODULE(ebus, pci, ebus_driver, ebus_devclass, 0, 0); +EARLY_DRIVER_MODULE(ebus, pci, ebus_driver, ebus_devclass, 0, 0, + BUS_PASS_BUS); MODULE_DEPEND(ebus, pci, 1, 1, 1); MODULE_VERSION(ebus, 1); Modified: stable/8/sys/sparc64/fhc/fhc.c ============================================================================== --- stable/8/sys/sparc64/fhc/fhc.c Wed Jan 13 19:59:19 2010 (r202224) +++ stable/8/sys/sparc64/fhc/fhc.c Wed Jan 13 20:03:24 2010 (r202225) @@ -119,9 +119,11 @@ static driver_t fhc_driver = { static devclass_t fhc_devclass; -DRIVER_MODULE(fhc, central, fhc_driver, fhc_devclass, 0, 0); +EARLY_DRIVER_MODULE(fhc, central, fhc_driver, fhc_devclass, 0, 0, + BUS_PASS_BUS); MODULE_DEPEND(fhc, central, 1, 1, 1); -DRIVER_MODULE(fhc, nexus, fhc_driver, fhc_devclass, 0, 0); +EARLY_DRIVER_MODULE(fhc, nexus, fhc_driver, fhc_devclass, 0, 0, + BUS_PASS_BUS); MODULE_DEPEND(fhc, nexus, 1, 1, 1); MODULE_VERSION(fhc, 1); Modified: stable/8/sys/sparc64/pci/apb.c ============================================================================== --- stable/8/sys/sparc64/pci/apb.c Wed Jan 13 19:59:19 2010 (r202224) +++ stable/8/sys/sparc64/pci/apb.c Wed Jan 13 20:03:24 2010 (r202225) @@ -111,7 +111,7 @@ static device_method_t apb_methods[] = { static devclass_t pcib_devclass; DEFINE_CLASS_0(pcib, apb_driver, apb_methods, sizeof(struct apb_softc)); -DRIVER_MODULE(apb, pci, apb_driver, pcib_devclass, 0, 0); +EARLY_DRIVER_MODULE(apb, pci, apb_driver, pcib_devclass, 0, 0, BUS_PASS_BUS); MODULE_DEPEND(apb, pci, 1, 1, 1); /* APB specific registers */ Modified: stable/8/sys/sparc64/pci/ofw_pcib.c ============================================================================== --- stable/8/sys/sparc64/pci/ofw_pcib.c Wed Jan 13 19:59:19 2010 (r202224) +++ stable/8/sys/sparc64/pci/ofw_pcib.c Wed Jan 13 20:03:24 2010 (r202225) @@ -93,7 +93,8 @@ static devclass_t pcib_devclass; DEFINE_CLASS_0(pcib, ofw_pcib_driver, ofw_pcib_methods, sizeof(struct ofw_pcib_gen_softc)); -DRIVER_MODULE(ofw_pcib, pci, ofw_pcib_driver, pcib_devclass, 0, 0); +EARLY_DRIVER_MODULE(ofw_pcib, pci, ofw_pcib_driver, pcib_devclass, 0, 0, + BUS_PASS_BUS); MODULE_DEPEND(ofw_pcib, pci, 1, 1, 1); static int Modified: stable/8/sys/sparc64/pci/ofw_pcibus.c ============================================================================== --- stable/8/sys/sparc64/pci/ofw_pcibus.c Wed Jan 13 19:59:19 2010 (r202224) +++ stable/8/sys/sparc64/pci/ofw_pcibus.c Wed Jan 13 20:03:24 2010 (r202225) @@ -101,7 +101,8 @@ static devclass_t pci_devclass; DEFINE_CLASS_1(pci, ofw_pcibus_driver, ofw_pcibus_methods, 1 /* no softc */, pci_driver); -DRIVER_MODULE(ofw_pcibus, pcib, ofw_pcibus_driver, pci_devclass, 0, 0); +EARLY_DRIVER_MODULE(ofw_pcibus, pcib, ofw_pcibus_driver, pci_devclass, 0, 0, + BUS_PASS_BUS); MODULE_VERSION(ofw_pcibus, 1); MODULE_DEPEND(ofw_pcibus, pci, 1, 1, 1); Modified: stable/8/sys/sparc64/sbus/dma_sbus.c ============================================================================== --- stable/8/sys/sparc64/sbus/dma_sbus.c Wed Jan 13 19:59:19 2010 (r202224) +++ stable/8/sys/sparc64/sbus/dma_sbus.c Wed Jan 13 20:03:24 2010 (r202225) @@ -149,7 +149,13 @@ static driver_t dma_driver = { sizeof(struct dma_softc), }; -DRIVER_MODULE(dma, sbus, dma_driver, dma_devclass, 0, 0); +/* + * The probe order is handled by sbus(4) as we don't want the variants + * with children to be attached earlier than the stand-alone controllers + * in order to generally preserve the OFW device tree order. + */ +EARLY_DRIVER_MODULE(dma, sbus, dma_driver, dma_devclass, 0, 0, + BUS_PASS_DEFAULT); MODULE_DEPEND(dma, sbus, 1, 1, 1); MODULE_VERSION(dma, 1); Modified: stable/8/sys/sparc64/sbus/sbus.c ============================================================================== --- stable/8/sys/sparc64/sbus/sbus.c Wed Jan 13 19:59:19 2010 (r202224) +++ stable/8/sys/sparc64/sbus/sbus.c Wed Jan 13 20:03:24 2010 (r202225) @@ -247,7 +247,8 @@ static driver_t sbus_driver = { static devclass_t sbus_devclass; -DRIVER_MODULE(sbus, nexus, sbus_driver, sbus_devclass, 0, 0); +EARLY_DRIVER_MODULE(sbus, nexus, sbus_driver, sbus_devclass, 0, 0, + BUS_PASS_BUS); MODULE_DEPEND(sbus, nexus, 1, 1, 1); MODULE_VERSION(sbus, 1); Modified: stable/8/sys/sparc64/sparc64/nexus.c ============================================================================== --- stable/8/sys/sparc64/sparc64/nexus.c Wed Jan 13 19:59:19 2010 (r202224) +++ stable/8/sys/sparc64/sparc64/nexus.c Wed Jan 13 20:03:24 2010 (r202225) @@ -144,7 +144,8 @@ static device_method_t nexus_methods[] = static devclass_t nexus_devclass; DEFINE_CLASS_0(nexus, nexus_driver, nexus_methods, sizeof(struct nexus_softc)); -DRIVER_MODULE(nexus, root, nexus_driver, nexus_devclass, 0, 0); +EARLY_DRIVER_MODULE(nexus, root, nexus_driver, nexus_devclass, 0, 0, + BUS_PASS_BUS); MODULE_VERSION(nexus, 1); static const char *const nexus_excl_name[] = { Modified: stable/8/sys/sparc64/sparc64/upa.c ============================================================================== --- stable/8/sys/sparc64/sparc64/upa.c Wed Jan 13 19:59:19 2010 (r202224) +++ stable/8/sys/sparc64/sparc64/upa.c Wed Jan 13 20:03:24 2010 (r202225) @@ -151,7 +151,7 @@ static device_method_t upa_methods[] = { static devclass_t upa_devclass; DEFINE_CLASS_0(upa, upa_driver, upa_methods, sizeof(struct upa_softc)); -DRIVER_MODULE(upa, nexus, upa_driver, upa_devclass, 0, 0); +EARLY_DRIVER_MODULE(upa, nexus, upa_driver, upa_devclass, 0, 0, BUS_PASS_BUS); static const struct intr_controller upa_ic = { upa_intr_enable,