Index: sys/amd64/conf/DEFAULTS =================================================================== --- sys/amd64/conf/DEFAULTS +++ sys/amd64/conf/DEFAULTS @@ -20,5 +20,3 @@ options GEOM_PART_EBR options GEOM_PART_MBR options GEOM_PART_GPT - -options NEW_PCIB Index: sys/amd64/include/resource.h =================================================================== --- sys/amd64/include/resource.h +++ sys/amd64/include/resource.h @@ -40,8 +40,6 @@ #define SYS_RES_DRQ 2 /* isa dma lines */ #define SYS_RES_MEMORY 3 /* i/o memory */ #define SYS_RES_IOPORT 4 /* i/o ports */ -#ifdef NEW_PCIB #define PCI_RES_BUS 5 /* PCI bus numbers */ -#endif #endif /* !_MACHINE_RESOURCE_H_ */ Index: sys/arm/conf/GENERIC =================================================================== --- sys/arm/conf/GENERIC +++ sys/arm/conf/GENERIC @@ -103,7 +103,6 @@ #device ata # Legacy ATA/SATA controllers # PCI -options NEW_PCIB device pci device pci_host_generic Index: sys/arm/conf/TEGRA124 =================================================================== --- sys/arm/conf/TEGRA124 +++ sys/arm/conf/TEGRA124 @@ -113,7 +113,6 @@ #device wlan_amrr # AMRR transmit rate control algorithm # PCI -options NEW_PCIB device pci # PCI Ethernet NICs that use the common MII bus controller code. Index: sys/arm/include/resource.h =================================================================== --- sys/arm/include/resource.h +++ sys/arm/include/resource.h @@ -42,8 +42,6 @@ #define SYS_RES_MEMORY 3 /* i/o memory */ #define SYS_RES_IOPORT 4 /* i/o ports */ #define SYS_RES_GPIO 5 /* general purpose i/o */ -#ifdef NEW_PCIB #define PCI_RES_BUS 6 /* PCI bus numbers */ -#endif #endif /* !_MACHINE_RESOURCE_H_ */ Index: sys/arm64/cavium/thunder_pcie_pem.c =================================================================== --- sys/arm64/cavium/thunder_pcie_pem.c +++ sys/arm64/cavium/thunder_pcie_pem.c @@ -315,7 +315,7 @@ struct rman *rm; sc = device_get_softc(dev); -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) if (type == PCI_RES_BUS) return (pci_domain_adjust_bus(sc->id, child, res, start, end)); #endif @@ -634,7 +634,7 @@ struct resource *res; device_t parent_dev; -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) if (type == PCI_RES_BUS) return (pci_domain_alloc_bus(sc->id, child, rid, start, end, count, flags)); @@ -693,7 +693,7 @@ struct resource *res) { device_t parent_dev; -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) struct thunder_pem_softc *sc = device_get_softc(dev); if (type == PCI_RES_BUS) Index: sys/arm64/conf/DEFAULTS =================================================================== --- sys/arm64/conf/DEFAULTS +++ sys/arm64/conf/DEFAULTS @@ -12,5 +12,3 @@ options GEOM_PART_BSD options GEOM_PART_MBR options GEOM_PART_GPT - -options NEW_PCIB Index: sys/arm64/include/resource.h =================================================================== --- sys/arm64/include/resource.h +++ sys/arm64/include/resource.h @@ -42,8 +42,6 @@ #define SYS_RES_MEMORY 3 /* i/o memory */ #define SYS_RES_IOPORT 4 /* i/o ports */ #define SYS_RES_GPIO 5 /* general purpose i/o */ -#ifdef NEW_PCIB #define PCI_RES_BUS 6 /* PCI bus numbers */ -#endif #endif /* !_MACHINE_RESOURCE_H_ */ Index: sys/conf/config.mk =================================================================== --- sys/conf/config.mk +++ sys/conf/config.mk @@ -51,9 +51,9 @@ opt_wlan.h: echo "#define IEEE80211_DEBUG 1" > ${.TARGET} echo "#define IEEE80211_SUPPORT_MESH 1" >> ${.TARGET} -KERN_OPTS.i386=NEW_PCIB DEV_PCI -KERN_OPTS.amd64=NEW_PCIB DEV_PCI -KERN_OPTS.powerpc=NEW_PCIB DEV_PCI +KERN_OPTS.i386=DEV_PCI +KERN_OPTS.amd64=DEV_PCI +KERN_OPTS.powerpc=DEV_PCI KERN_OPTS=MROUTING IEEE80211_DEBUG \ IEEE80211_SUPPORT_MESH DEV_BPF \ ${KERN_OPTS.${MACHINE}} ${KERN_OPTS_EXTRA} Index: sys/conf/options =================================================================== --- sys/conf/options +++ sys/conf/options @@ -174,7 +174,6 @@ MFI_DECODE_LOG opt_mfi.h MPROF_BUFFERS opt_mprof.h MPROF_HASH_SIZE opt_mprof.h -NEW_PCIB opt_global.h NO_ADAPTIVE_MUTEXES opt_adaptive_mutexes.h NO_ADAPTIVE_RWLOCKS NO_ADAPTIVE_SX Index: sys/dev/acpica/acpi_pcib_acpi.c =================================================================== --- sys/dev/acpica/acpi_pcib_acpi.c +++ sys/dev/acpica/acpi_pcib_acpi.c @@ -69,9 +69,7 @@ int ap_addr; /* device/func of PCI-Host bridge */ ACPI_BUFFER ap_prt; /* interrupt routing table */ -#ifdef NEW_PCIB struct pcib_host_resources ap_host_res; -#endif }; static int acpi_pcib_acpi_probe(device_t bus); @@ -97,7 +95,6 @@ device_t child, int type, int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags); -#ifdef NEW_PCIB static int acpi_pcib_acpi_adjust_resource(device_t dev, device_t child, int type, struct resource *r, rman_res_t start, rman_res_t end); @@ -106,7 +103,6 @@ device_t child, int type, int rid, struct resource *r); #endif -#endif static int acpi_pcib_request_feature(device_t pcib, device_t dev, enum pci_feature feature); static bus_dma_tag_t acpi_pcib_get_dma_tag(device_t bus, device_t child); @@ -123,15 +119,9 @@ DEVMETHOD(bus_read_ivar, acpi_pcib_read_ivar), DEVMETHOD(bus_write_ivar, acpi_pcib_write_ivar), DEVMETHOD(bus_alloc_resource, acpi_pcib_acpi_alloc_resource), -#ifdef NEW_PCIB DEVMETHOD(bus_adjust_resource, acpi_pcib_acpi_adjust_resource), -#else - DEVMETHOD(bus_adjust_resource, bus_generic_adjust_resource), -#endif -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) DEVMETHOD(bus_release_resource, acpi_pcib_acpi_release_resource), -#else - DEVMETHOD(bus_release_resource, bus_generic_release_resource), #endif DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), @@ -182,7 +172,6 @@ return (0); } -#ifdef NEW_PCIB static ACPI_STATUS acpi_pcib_producer_handler(ACPI_RESOURCE *res, void *context) { @@ -289,9 +278,8 @@ } return (AE_OK); } -#endif -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) static int first_decoded_bus(struct acpi_hpcib_softc *sc, rman_res_t *startp) { @@ -368,7 +356,7 @@ ACPI_STATUS status; static int bus0_seen = 0; u_int slot, func, busok; -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) struct resource *bus_res; rman_res_t start; int rid; @@ -417,7 +405,6 @@ sc->ap_addr = -1; } -#ifdef NEW_PCIB /* * Determine which address ranges this bridge decodes and setup * resource managers for those ranges. @@ -431,7 +418,6 @@ device_printf(sc->ap_dev, "failed to parse resources: %s\n", AcpiFormatException(status)); } -#endif /* * Get our base bus number by evaluating _BBN. @@ -487,7 +473,7 @@ } } -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) /* * If nothing else worked, hope that ACPI at least lays out the * Host-PCI bridges in order and that as a result the next free @@ -568,7 +554,7 @@ errout: device_printf(device_get_parent(dev), "couldn't attach pci bus\n"); -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) pcib_host_res_free(dev, &sc->ap_host_res); #endif return (error); @@ -690,16 +676,13 @@ acpi_pcib_acpi_alloc_resource(device_t dev, device_t child, int type, int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { -#ifdef NEW_PCIB struct acpi_hpcib_softc *sc; struct resource *res; -#endif #if defined(__i386__) || defined(__amd64__) start = hostb_alloc_start(type, start, end, count); #endif -#ifdef NEW_PCIB sc = device_get_softc(dev); #ifdef PCI_RES_BUS if (type == PCI_RES_BUS) @@ -720,13 +703,8 @@ res = bus_generic_alloc_resource(dev, child, type, rid, start, end, count, flags); return (res); -#else - return (bus_generic_alloc_resource(dev, child, type, rid, start, end, - count, flags)); -#endif } -#ifdef NEW_PCIB int acpi_pcib_acpi_adjust_resource(device_t dev, device_t child, int type, struct resource *r, rman_res_t start, rman_res_t end) @@ -756,7 +734,6 @@ return (bus_generic_release_resource(dev, child, type, rid, r)); } #endif -#endif static int acpi_pcib_request_feature(device_t pcib, device_t dev, enum pci_feature feature) Index: sys/dev/hyperv/pcib/vmbus_pcib.c =================================================================== --- sys/dev/hyperv/pcib/vmbus_pcib.c +++ sys/dev/hyperv/pcib/vmbus_pcib.c @@ -27,8 +27,6 @@ #include __FBSDID("$FreeBSD$"); -#ifdef NEW_PCIB - #include #include #include @@ -1850,5 +1848,3 @@ DRIVER_MODULE(vmbus_pcib, vmbus, vmbus_pcib_driver, pcib_devclass, 0, 0); MODULE_DEPEND(vmbus_pcib, vmbus, 1, 1, 1); MODULE_DEPEND(vmbus_pcib, pci, 1, 1, 1); - -#endif /* NEW_PCIB */ Index: sys/dev/hyperv/vmbus/vmbus.c =================================================================== --- sys/dev/hyperv/vmbus/vmbus.c +++ sys/dev/hyperv/vmbus/vmbus.c @@ -1126,15 +1126,12 @@ device_t parent = device_get_parent(dev); struct resource *res; -#ifdef NEW_PCIB if (type == SYS_RES_MEMORY) { struct vmbus_softc *sc = device_get_softc(dev); res = pcib_host_res_alloc(&sc->vmbus_mmio_res, child, type, rid, start, end, count, flags); - } else -#endif - { + } else { res = BUS_ALLOC_RESOURCE(parent, child, type, rid, start, end, count, flags); } @@ -1215,7 +1212,6 @@ return (VMBUS_PCPU_GET(sc, event_tq, cpu)); } -#ifdef NEW_PCIB #define VTPM_BASE_ADDR 0xfed40000 #define FOUR_GB (1ULL << 32) @@ -1424,7 +1420,6 @@ if (hv_fb_res) hv_fb_res = NULL; } -#endif /* NEW_PCIB */ static void vmbus_identify(driver_t *driver, device_t parent) @@ -1470,10 +1465,8 @@ if (sc->vmbus_flags & VMBUS_FLAG_ATTACHED) return (0); -#ifdef NEW_PCIB vmbus_get_mmio_res(sc->vmbus_dev); vmbus_fb_mmio_res(sc->vmbus_dev); -#endif sc->vmbus_flags |= VMBUS_FLAG_ATTACHED; @@ -1643,9 +1636,7 @@ mtx_destroy(&sc->vmbus_prichan_lock); mtx_destroy(&sc->vmbus_chan_lock); -#ifdef NEW_PCIB vmbus_free_mmio_res(dev); -#endif return (0); } Index: sys/dev/hyperv/vmbus/vmbus_var.h =================================================================== --- sys/dev/hyperv/vmbus/vmbus_var.h +++ sys/dev/hyperv/vmbus/vmbus_var.h @@ -131,10 +131,8 @@ struct intr_config_hook vmbus_intrhook; -#ifdef NEW_PCIB /* The list of usable MMIO ranges for PCIe pass-through */ struct pcib_host_resources vmbus_mmio_res; -#endif }; #define VMBUS_FLAG_ATTACHED 0x0001 /* vmbus was attached */ Index: sys/dev/ofw/ofw_pcib.c =================================================================== --- sys/dev/ofw/ofw_pcib.c +++ sys/dev/ofw/ofw_pcib.c @@ -413,7 +413,7 @@ sc = device_get_softc(bus); -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) if (type == PCI_RES_BUS) { return (pci_domain_alloc_bus(sc->sc_pci_domain, child, rid, start, end, count, flags | needactivate)); @@ -458,7 +458,7 @@ sc = device_get_softc(bus); -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) if (type == PCI_RES_BUS) return (pci_domain_release_bus(sc->sc_pci_domain, child, rid, res)); @@ -619,7 +619,7 @@ struct ofw_pci_softc *sc; sc = device_get_softc(bus); -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) if (type == PCI_RES_BUS) return (pci_domain_adjust_bus(sc->sc_pci_domain, child, res, start, end)); Index: sys/dev/pccbb/pccbb_pci.c =================================================================== --- sys/dev/pccbb/pccbb_pci.c +++ sys/dev/pccbb/pccbb_pci.c @@ -279,7 +279,7 @@ static int cbb_pci_attach(device_t brdev) { -#if !(defined(NEW_PCIB) && defined(PCI_RES_BUS)) +#if !defined(PCI_RES_BUS) static int curr_bus_number = 2; /* XXX EVILE BAD (see below) */ uint32_t pribus; #endif @@ -296,7 +296,7 @@ sc->cbdev = NULL; sc->domain = pci_get_domain(brdev); sc->pribus = pcib_get_bus(parent); -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) pci_write_config(brdev, PCIR_PRIBUS_2, sc->pribus, 1); pcib_setup_secbus(brdev, &sc->bus, 1); #else @@ -354,7 +354,7 @@ CTLFLAG_RD, &sc->subbus, 0, "io range 2 open"); #endif -#if !(defined(NEW_PCIB) && defined(PCI_RES_BUS)) +#if !defined(PCI_RES_BUS) /* * This is a gross hack. We should be scanning the entire pci * tree, assigning bus numbers in a way such that we (1) can @@ -432,13 +432,13 @@ static int cbb_pci_detach(device_t brdev) { -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) struct cbb_softc *sc = device_get_softc(brdev); #endif int error; error = cbb_detach(brdev); -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) if (error == 0) pcib_free_secbus(brdev, &sc->bus); #endif @@ -790,7 +790,7 @@ return retval; } -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) static struct resource * cbb_pci_alloc_resource(device_t bus, device_t child, int type, int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) @@ -935,7 +935,7 @@ /* bus methods */ DEVMETHOD(bus_read_ivar, cbb_read_ivar), DEVMETHOD(bus_write_ivar, cbb_write_ivar), -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) DEVMETHOD(bus_alloc_resource, cbb_pci_alloc_resource), DEVMETHOD(bus_adjust_resource, cbb_pci_adjust_resource), DEVMETHOD(bus_release_resource, cbb_pci_release_resource), Index: sys/dev/pci/pci.c =================================================================== --- sys/dev/pci/pci.c +++ sys/dev/pci/pci.c @@ -403,7 +403,7 @@ SYSCTL_INT(_hw_pci, OID_AUTO, clear_bars, CTLFLAG_RDTUN, &pci_clear_bars, 0, "Ignore firmware-assigned resources for BARs."); -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) static int pci_clear_buses; SYSCTL_INT(_hw_pci, OID_AUTO, clear_buses, CTLFLAG_RDTUN, &pci_clear_buses, 0, "Ignore firmware-assigned bus numbers."); @@ -3675,7 +3675,7 @@ bus_release_resource(self, SYS_RES_MEMORY, rid, res); } -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) static void pci_reserve_secbus(device_t bus, device_t dev, pcicfgregs *cfg, struct resource_list *rl) @@ -4087,7 +4087,7 @@ uhci_early_takeover(dev); } -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) /* * Reserve resources for secondary bus ranges behind bridge * devices. @@ -5507,7 +5507,7 @@ rl = &dinfo->resources; cfg = &dinfo->cfg; switch (type) { -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) case PCI_RES_BUS: return (pci_alloc_secbus(dev, child, rid, start, end, count, flags)); @@ -5532,7 +5532,6 @@ break; case SYS_RES_IOPORT: case SYS_RES_MEMORY: -#ifdef NEW_PCIB /* * PCI-PCI bridge I/O window resources are not BARs. * For those allocations just pass the request up the @@ -5551,7 +5550,6 @@ type, rid, start, end, count, flags)); } } -#endif /* Reserve resources for this BAR if needed. */ rle = resource_list_find(rl, type, *rid); if (rle == NULL) { @@ -5627,7 +5625,6 @@ } #endif -#ifdef NEW_PCIB /* * PCI-PCI bridge I/O window resources are not BARs. For * those allocations just pass the request up the tree. @@ -5642,7 +5639,6 @@ rid, r)); } } -#endif rl = &dinfo->resources; return (resource_list_release(rl, dev, child, type, rid, r)); Index: sys/dev/pci/pci_host_generic.c =================================================================== --- sys/dev/pci/pci_host_generic.c +++ sys/dev/pci/pci_host_generic.c @@ -311,7 +311,7 @@ sc = device_get_softc(dev); -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) if (type == PCI_RES_BUS) { return (pci_domain_release_bus(sc->ecam, child, rid, res)); } @@ -409,7 +409,7 @@ sc = device_get_softc(dev); -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) if (type == PCI_RES_BUS) { return (pci_domain_alloc_bus(sc->ecam, child, rid, start, end, count, flags)); @@ -515,7 +515,7 @@ struct rman *rm; sc = device_get_softc(dev); -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) if (type == PCI_RES_BUS) return (pci_domain_adjust_bus(sc->ecam, child, res, start, end)); Index: sys/dev/pci/pci_pci.c =================================================================== --- sys/dev/pci/pci_pci.c +++ sys/dev/pci/pci_pci.c @@ -60,7 +60,6 @@ #include "pcib_if.h" static int pcib_probe(device_t dev); -static int pcib_suspend(device_t dev); static int pcib_resume(device_t dev); static int pcib_power_for_sleep(device_t pcib, device_t dev, int *pstate); @@ -91,7 +90,7 @@ DEVMETHOD(device_attach, pcib_attach), DEVMETHOD(device_detach, pcib_detach), DEVMETHOD(device_shutdown, bus_generic_shutdown), - DEVMETHOD(device_suspend, pcib_suspend), + DEVMETHOD(device_suspend, bus_generic_suspend), DEVMETHOD(device_resume, pcib_resume), /* Bus interface */ @@ -99,13 +98,8 @@ DEVMETHOD(bus_read_ivar, pcib_read_ivar), DEVMETHOD(bus_write_ivar, pcib_write_ivar), DEVMETHOD(bus_alloc_resource, pcib_alloc_resource), -#ifdef NEW_PCIB DEVMETHOD(bus_adjust_resource, pcib_adjust_resource), DEVMETHOD(bus_release_resource, pcib_release_resource), -#else - DEVMETHOD(bus_adjust_resource, bus_generic_adjust_resource), - DEVMETHOD(bus_release_resource, bus_generic_release_resource), -#endif DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), @@ -139,11 +133,8 @@ EARLY_DRIVER_MODULE(pcib, pci, pcib_driver, pcib_devclass, NULL, NULL, BUS_PASS_BUS); -#if defined(NEW_PCIB) || defined(PCI_HP) SYSCTL_DECL(_hw_pci); -#endif -#ifdef NEW_PCIB static int pci_clear_pcib; SYSCTL_INT(_hw_pci, OID_AUTO, clear_pcib, CTLFLAG_RDTUN, &pci_clear_pcib, 0, "Clear firmware-assigned resources for PCI-PCI bridge I/O windows."); @@ -796,140 +787,6 @@ } #endif -#else - -/* - * Is the prefetch window open (eg, can we allocate memory in it?) - */ -static int -pcib_is_prefetch_open(struct pcib_softc *sc) -{ - return (sc->pmembase > 0 && sc->pmembase < sc->pmemlimit); -} - -/* - * Is the nonprefetch window open (eg, can we allocate memory in it?) - */ -static int -pcib_is_nonprefetch_open(struct pcib_softc *sc) -{ - return (sc->membase > 0 && sc->membase < sc->memlimit); -} - -/* - * Is the io window open (eg, can we allocate ports in it?) - */ -static int -pcib_is_io_open(struct pcib_softc *sc) -{ - return (sc->iobase > 0 && sc->iobase < sc->iolimit); -} - -/* - * Get current I/O decode. - */ -static void -pcib_get_io_decode(struct pcib_softc *sc) -{ - device_t dev; - uint32_t iolow; - - dev = sc->dev; - - iolow = pci_read_config(dev, PCIR_IOBASEL_1, 1); - if ((iolow & PCIM_BRIO_MASK) == PCIM_BRIO_32) - sc->iobase = PCI_PPBIOBASE( - pci_read_config(dev, PCIR_IOBASEH_1, 2), iolow); - else - sc->iobase = PCI_PPBIOBASE(0, iolow); - - iolow = pci_read_config(dev, PCIR_IOLIMITL_1, 1); - if ((iolow & PCIM_BRIO_MASK) == PCIM_BRIO_32) - sc->iolimit = PCI_PPBIOLIMIT( - pci_read_config(dev, PCIR_IOLIMITH_1, 2), iolow); - else - sc->iolimit = PCI_PPBIOLIMIT(0, iolow); -} - -/* - * Get current memory decode. - */ -static void -pcib_get_mem_decode(struct pcib_softc *sc) -{ - device_t dev; - pci_addr_t pmemlow; - - dev = sc->dev; - - sc->membase = PCI_PPBMEMBASE(0, - pci_read_config(dev, PCIR_MEMBASE_1, 2)); - sc->memlimit = PCI_PPBMEMLIMIT(0, - pci_read_config(dev, PCIR_MEMLIMIT_1, 2)); - - pmemlow = pci_read_config(dev, PCIR_PMBASEL_1, 2); - if ((pmemlow & PCIM_BRPM_MASK) == PCIM_BRPM_64) - sc->pmembase = PCI_PPBMEMBASE( - pci_read_config(dev, PCIR_PMBASEH_1, 4), pmemlow); - else - sc->pmembase = PCI_PPBMEMBASE(0, pmemlow); - - pmemlow = pci_read_config(dev, PCIR_PMLIMITL_1, 2); - if ((pmemlow & PCIM_BRPM_MASK) == PCIM_BRPM_64) - sc->pmemlimit = PCI_PPBMEMLIMIT( - pci_read_config(dev, PCIR_PMLIMITH_1, 4), pmemlow); - else - sc->pmemlimit = PCI_PPBMEMLIMIT(0, pmemlow); -} - -/* - * Restore previous I/O decode. - */ -static void -pcib_set_io_decode(struct pcib_softc *sc) -{ - device_t dev; - uint32_t iohi; - - dev = sc->dev; - - iohi = sc->iobase >> 16; - if (iohi > 0) - pci_write_config(dev, PCIR_IOBASEH_1, iohi, 2); - pci_write_config(dev, PCIR_IOBASEL_1, sc->iobase >> 8, 1); - - iohi = sc->iolimit >> 16; - if (iohi > 0) - pci_write_config(dev, PCIR_IOLIMITH_1, iohi, 2); - pci_write_config(dev, PCIR_IOLIMITL_1, sc->iolimit >> 8, 1); -} - -/* - * Restore previous memory decode. - */ -static void -pcib_set_mem_decode(struct pcib_softc *sc) -{ - device_t dev; - pci_addr_t pmemhi; - - dev = sc->dev; - - pci_write_config(dev, PCIR_MEMBASE_1, sc->membase >> 16, 2); - pci_write_config(dev, PCIR_MEMLIMIT_1, sc->memlimit >> 16, 2); - - pmemhi = sc->pmembase >> 32; - if (pmemhi > 0) - pci_write_config(dev, PCIR_PMBASEH_1, pmemhi, 4); - pci_write_config(dev, PCIR_PMBASEL_1, sc->pmembase >> 16, 2); - - pmemhi = sc->pmemlimit >> 32; - if (pmemhi > 0) - pci_write_config(dev, PCIR_PMLIMITH_1, pmemhi, 4); - pci_write_config(dev, PCIR_PMLIMITL_1, sc->pmemlimit >> 16, 2); -} -#endif - #ifdef PCI_HP /* * PCI-express HotPlug support. @@ -1478,45 +1335,13 @@ } #endif -/* - * Get current bridge configuration. - */ -static void -pcib_cfg_save(struct pcib_softc *sc) -{ -#ifndef NEW_PCIB - device_t dev; - uint16_t command; - - dev = sc->dev; - - command = pci_read_config(dev, PCIR_COMMAND, 2); - if (command & PCIM_CMD_PORTEN) - pcib_get_io_decode(sc); - if (command & PCIM_CMD_MEMEN) - pcib_get_mem_decode(sc); -#endif -} - /* * Restore previous bridge configuration. */ static void pcib_cfg_restore(struct pcib_softc *sc) { -#ifndef NEW_PCIB - uint16_t command; -#endif - -#ifdef NEW_PCIB pcib_write_windows(sc, WIN_IO | WIN_MEM | WIN_PMEM); -#else - command = pci_read_config(sc->dev, PCIR_COMMAND, 2); - if (command & PCIM_CMD_PORTEN) - pcib_set_io_decode(sc); - if (command & PCIM_CMD_MEMEN) - pcib_set_mem_decode(sc); -#endif } /* @@ -1548,12 +1373,11 @@ * Get current bridge configuration. */ sc->domain = pci_get_domain(dev); -#if !(defined(NEW_PCIB) && defined(PCI_RES_BUS)) +#if !defined(PCI_RES_BUS) sc->bus.sec = pci_read_config(dev, PCIR_SECBUS_1, 1); sc->bus.sub = pci_read_config(dev, PCIR_SUBBUS_1, 1); #endif sc->bridgectl = pci_read_config(dev, PCIR_BRIDGECTL_1, 2); - pcib_cfg_save(sc); /* * The primary bus register should always be the bus of the @@ -1580,7 +1404,7 @@ * Quirk handling. */ switch (pci_get_devid(dev)) { -#if !(defined(NEW_PCIB) && defined(PCI_RES_BUS)) +#if !defined(PCI_RES_BUS) case 0x12258086: /* Intel 82454KX/GX (Orion) */ { uint8_t supbus; @@ -1607,7 +1431,7 @@ sc->flags |= PCIB_SUBTRACTIVE; break; -#if !(defined(NEW_PCIB) && defined(PCI_RES_BUS)) +#if !defined(PCI_RES_BUS) /* Compaq R3000 BIOS sets wrong subordinate bus number. */ case 0x00dd10de: { @@ -1657,12 +1481,10 @@ #ifdef PCI_HP pcib_probe_hotplug(sc); #endif -#ifdef NEW_PCIB #ifdef PCI_RES_BUS pcib_setup_secbus(dev, &sc->bus, 1); #endif pcib_probe_windows(sc); -#endif #ifdef PCI_HP if (sc->flags & PCIB_HOTPLUG) pcib_setup_hotplug(sc); @@ -1671,7 +1493,6 @@ device_printf(dev, " domain %d\n", sc->domain); device_printf(dev, " secondary bus %d\n", sc->bus.sec); device_printf(dev, " subordinate bus %d\n", sc->bus.sub); -#ifdef NEW_PCIB if (pcib_is_window_open(&sc->io)) device_printf(dev, " I/O decode 0x%jx-0x%jx\n", (uintmax_t)sc->io.base, (uintmax_t)sc->io.limit); @@ -1681,17 +1502,6 @@ if (pcib_is_window_open(&sc->pmem)) device_printf(dev, " prefetched decode 0x%jx-0x%jx\n", (uintmax_t)sc->pmem.base, (uintmax_t)sc->pmem.limit); -#else - if (pcib_is_io_open(sc)) - device_printf(dev, " I/O decode 0x%x-0x%x\n", - sc->iobase, sc->iolimit); - if (pcib_is_nonprefetch_open(sc)) - device_printf(dev, " memory decode 0x%jx-0x%jx\n", - (uintmax_t)sc->membase, (uintmax_t)sc->memlimit); - if (pcib_is_prefetch_open(sc)) - device_printf(dev, " prefetched decode 0x%jx-0x%jx\n", - (uintmax_t)sc->pmembase, (uintmax_t)sc->pmemlimit); -#endif if (sc->bridgectl & (PCIB_BCR_ISA_ENABLE | PCIB_BCR_VGA_ENABLE) || sc->flags & PCIB_SUBTRACTIVE) { device_printf(dev, " special decode "); @@ -1762,14 +1572,10 @@ int pcib_detach(device_t dev) { -#if defined(PCI_HP) || defined(NEW_PCIB) struct pcib_softc *sc; -#endif int error; -#if defined(PCI_HP) || defined(NEW_PCIB) sc = device_get_softc(dev); -#endif error = bus_generic_detach(dev); if (error) return (error); @@ -1783,23 +1589,13 @@ error = device_delete_children(dev); if (error) return (error); -#ifdef NEW_PCIB pcib_free_windows(sc); #ifdef PCI_RES_BUS pcib_free_secbus(dev, &sc->bus); -#endif #endif return (0); } -int -pcib_suspend(device_t dev) -{ - - pcib_cfg_save(device_get_softc(dev)); - return (bus_generic_suspend(dev)); -} - int pcib_resume(device_t dev) { @@ -1874,7 +1670,6 @@ return(ENOENT); } -#ifdef NEW_PCIB /* * Attempt to allocate a resource from the existing resources assigned * to a window. @@ -2430,163 +2225,6 @@ } return (bus_generic_release_resource(dev, child, type, rid, r)); } -#else -/* - * We have to trap resource allocation requests and ensure that the bridge - * is set up to, or capable of handling them. - */ -struct resource * -pcib_alloc_resource(device_t dev, device_t child, int type, int *rid, - rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) -{ - struct pcib_softc *sc = device_get_softc(dev); - const char *name, *suffix; - int ok; - - /* - * Fail the allocation for this range if it's not supported. - */ - name = device_get_nameunit(child); - if (name == NULL) { - name = ""; - suffix = ""; - } else - suffix = " "; - switch (type) { - case SYS_RES_IOPORT: - ok = 0; - if (!pcib_is_io_open(sc)) - break; - ok = (start >= sc->iobase && end <= sc->iolimit); - - /* - * Make sure we allow access to VGA I/O addresses when the - * bridge has the "VGA Enable" bit set. - */ - if (!ok && pci_is_vga_ioport_range(start, end)) - ok = (sc->bridgectl & PCIB_BCR_VGA_ENABLE) ? 1 : 0; - - if ((sc->flags & PCIB_SUBTRACTIVE) == 0) { - if (!ok) { - if (start < sc->iobase) - start = sc->iobase; - if (end > sc->iolimit) - end = sc->iolimit; - if (start < end) - ok = 1; - } - } else { - ok = 1; -#if 0 - /* - * If we overlap with the subtractive range, then - * pick the upper range to use. - */ - if (start < sc->iolimit && end > sc->iobase) - start = sc->iolimit + 1; -#endif - } - if (end < start) { - device_printf(dev, "ioport: end (%jx) < start (%jx)\n", - end, start); - start = 0; - end = 0; - ok = 0; - } - if (!ok) { - device_printf(dev, "%s%srequested unsupported I/O " - "range 0x%jx-0x%jx (decoding 0x%x-0x%x)\n", - name, suffix, start, end, sc->iobase, sc->iolimit); - return (NULL); - } - if (bootverbose) - device_printf(dev, - "%s%srequested I/O range 0x%jx-0x%jx: in range\n", - name, suffix, start, end); - break; - - case SYS_RES_MEMORY: - ok = 0; - if (pcib_is_nonprefetch_open(sc)) - ok = ok || (start >= sc->membase && end <= sc->memlimit); - if (pcib_is_prefetch_open(sc)) - ok = ok || (start >= sc->pmembase && end <= sc->pmemlimit); - - /* - * Make sure we allow access to VGA memory addresses when the - * bridge has the "VGA Enable" bit set. - */ - if (!ok && pci_is_vga_memory_range(start, end)) - ok = (sc->bridgectl & PCIB_BCR_VGA_ENABLE) ? 1 : 0; - - if ((sc->flags & PCIB_SUBTRACTIVE) == 0) { - if (!ok) { - ok = 1; - if (flags & RF_PREFETCHABLE) { - if (pcib_is_prefetch_open(sc)) { - if (start < sc->pmembase) - start = sc->pmembase; - if (end > sc->pmemlimit) - end = sc->pmemlimit; - } else { - ok = 0; - } - } else { /* non-prefetchable */ - if (pcib_is_nonprefetch_open(sc)) { - if (start < sc->membase) - start = sc->membase; - if (end > sc->memlimit) - end = sc->memlimit; - } else { - ok = 0; - } - } - } - } else if (!ok) { - ok = 1; /* subtractive bridge: always ok */ -#if 0 - if (pcib_is_nonprefetch_open(sc)) { - if (start < sc->memlimit && end > sc->membase) - start = sc->memlimit + 1; - } - if (pcib_is_prefetch_open(sc)) { - if (start < sc->pmemlimit && end > sc->pmembase) - start = sc->pmemlimit + 1; - } -#endif - } - if (end < start) { - device_printf(dev, "memory: end (%jx) < start (%jx)\n", - end, start); - start = 0; - end = 0; - ok = 0; - } - if (!ok && bootverbose) - device_printf(dev, - "%s%srequested unsupported memory range %#jx-%#jx " - "(decoding %#jx-%#jx, %#jx-%#jx)\n", - name, suffix, start, end, - (uintmax_t)sc->membase, (uintmax_t)sc->memlimit, - (uintmax_t)sc->pmembase, (uintmax_t)sc->pmemlimit); - if (!ok) - return (NULL); - if (bootverbose) - device_printf(dev,"%s%srequested memory range " - "0x%jx-0x%jx: good\n", - name, suffix, start, end); - break; - - default: - break; - } - /* - * Bridge is OK decoding this resource, so pass it up. - */ - return (bus_generic_alloc_resource(dev, child, type, rid, start, end, - count, flags)); -} -#endif /* * If ARI is enabled on this downstream port, translate the function number Index: sys/dev/pci/pci_subr.c =================================================================== --- sys/dev/pci/pci_subr.c +++ sys/dev/pci/pci_subr.c @@ -133,7 +133,6 @@ return 1; } -#ifdef NEW_PCIB /* * Return a pointer to a pretty name for a PCI device. If the device * has a driver attached, the device's name is used, otherwise a name @@ -382,5 +381,3 @@ return (rman_release_resource(r)); } #endif /* PCI_RES_BUS */ - -#endif /* NEW_PCIB */ Index: sys/dev/pci/pcib_private.h =================================================================== --- sys/dev/pci/pcib_private.h +++ sys/dev/pci/pcib_private.h @@ -37,7 +37,6 @@ #include -#ifdef NEW_PCIB /* * Data structure and routines that Host to PCI bridge drivers can use * to restrict allocations for child devices to ranges decoded by the @@ -60,7 +59,6 @@ int pcib_host_res_adjust(struct pcib_host_resources *hr, device_t dev, int type, struct resource *r, rman_res_t start, rman_res_t end); -#endif /* * Export portions of generic PCI:PCI bridge support so that it can be @@ -68,7 +66,6 @@ */ DECLARE_CLASS(pcib_driver); -#ifdef NEW_PCIB #define WIN_IO 0x1 #define WIN_MEM 0x2 #define WIN_PMEM 0x4 @@ -85,12 +82,11 @@ int step; /* log_2 of window granularity */ const char *name; }; -#endif struct pcib_secbus { u_int sec; u_int sub; -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) device_t dev; struct rman rman; struct resource *res; @@ -118,18 +114,9 @@ u_int domain; /* domain number */ u_int pribus; /* primary bus number */ struct pcib_secbus bus; /* secondary bus numbers */ -#ifdef NEW_PCIB struct pcib_window io; /* I/O port window */ struct pcib_window mem; /* memory window */ struct pcib_window pmem; /* prefetchable memory window */ -#else - pci_addr_t pmembase; /* base address of prefetchable memory */ - pci_addr_t pmemlimit; /* topmost address of prefetchable memory */ - pci_addr_t membase; /* base address of memory window */ - pci_addr_t memlimit; /* topmost address of memory window */ - uint32_t iobase; /* base address of port window */ - uint32_t iolimit; /* topmost address of port window */ -#endif uint16_t bridgectl; /* bridge control register */ uint16_t pcie_link_sta; uint16_t pcie_slot_sta; @@ -153,7 +140,7 @@ int host_pcib_get_busno(pci_read_config_fn read_config, int bus, int slot, int func, uint8_t *busnum); -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) struct resource *pci_domain_alloc_bus(int domain, device_t dev, int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags); int pci_domain_adjust_bus(int domain, device_t dev, @@ -171,9 +158,7 @@ int pcib_attach_child(device_t dev); void pcib_attach_common(device_t dev); void pcib_bridge_init(device_t dev); -#ifdef NEW_PCIB const char *pcib_child_name(device_t child); -#endif int pcib_child_present(device_t dev, device_t child); int pcib_detach(device_t dev); int pcib_read_ivar(device_t dev, device_t child, int which, uintptr_t *result); @@ -181,12 +166,10 @@ struct resource *pcib_alloc_resource(device_t dev, device_t child, int type, int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags); -#ifdef NEW_PCIB int pcib_adjust_resource(device_t bus, device_t child, int type, struct resource *r, rman_res_t start, rman_res_t end); int pcib_release_resource(device_t dev, device_t child, int type, int rid, struct resource *r); -#endif int pcib_maxslots(device_t dev); int pcib_maxfuncs(device_t dev); int pcib_route_interrupt(device_t pcib, device_t dev, int pin); Index: sys/i386/conf/DEFAULTS =================================================================== --- sys/i386/conf/DEFAULTS +++ sys/i386/conf/DEFAULTS @@ -24,5 +24,3 @@ # enable support for native hardware device atpic - -options NEW_PCIB Index: sys/i386/include/resource.h =================================================================== --- sys/i386/include/resource.h +++ sys/i386/include/resource.h @@ -40,8 +40,6 @@ #define SYS_RES_DRQ 2 /* isa dma lines */ #define SYS_RES_MEMORY 3 /* i/o memory */ #define SYS_RES_IOPORT 4 /* i/o ports */ -#ifdef NEW_PCIB #define PCI_RES_BUS 5 /* PCI bus numbers */ -#endif #endif /* !_MACHINE_RESOURCE_H_ */ Index: sys/mips/include/resource.h =================================================================== --- sys/mips/include/resource.h +++ sys/mips/include/resource.h @@ -42,8 +42,6 @@ #define SYS_RES_DRQ 2 /* isa dma lines */ #define SYS_RES_MEMORY 3 /* i/o memory */ #define SYS_RES_IOPORT 4 /* i/o ports */ -#ifdef NEW_PCIB #define PCI_RES_BUS 5 -#endif #endif /* !_MACHINE_RESOURCE_H_ */ Index: sys/mips/mediatek/std.mediatek =================================================================== --- sys/mips/mediatek/std.mediatek +++ sys/mips/mediatek/std.mediatek @@ -27,9 +27,6 @@ options INTRNG options MIPS_NIRQ=256 -# We rely on NEW_PCIB code -options NEW_PCIB - # Build kernel with gdb(1) debug symbols makeoptions DEBUG=-g Index: sys/mips/mediatek/std.rt2880 =================================================================== --- sys/mips/mediatek/std.rt2880 +++ sys/mips/mediatek/std.rt2880 @@ -26,9 +26,6 @@ options INTRNG options MIPS_NIRQ=256 -# We rely on NEW_PCIB code -options NEW_PCIB - # Build kernel with gdb(1) debug symbols makeoptions DEBUG=-g Index: sys/modules/cardbus/Makefile =================================================================== --- sys/modules/cardbus/Makefile +++ sys/modules/cardbus/Makefile @@ -6,8 +6,4 @@ SRCS= cardbus.c cardbus_cis.c cardbus_device.c \ device_if.h bus_if.h card_if.h power_if.h pci_if.h pcib_if.h -.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64" -CFLAGS += -DNEW_PCIB -.endif - .include Index: sys/modules/cbb/Makefile =================================================================== --- sys/modules/cbb/Makefile +++ sys/modules/cbb/Makefile @@ -6,8 +6,4 @@ SRCS= pccbb.c pccbb_pci.c \ device_if.h bus_if.h power_if.h card_if.h pci_if.h pcib_if.h -.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64" -CFLAGS += -DNEW_PCIB -.endif - .include Index: sys/modules/vmd/Makefile =================================================================== --- sys/modules/vmd/Makefile +++ sys/modules/vmd/Makefile @@ -10,11 +10,5 @@ device_if.h \ pci_if.h \ pcib_if.h \ - opt_global.h \ - -CFLAGS+= -include opt_global.h - -opt_global.h: - echo "#define NEW_PCIB 1" >> ${.TARGET} .include Index: sys/powerpc/conf/DEFAULTS =================================================================== --- sys/powerpc/conf/DEFAULTS +++ sys/powerpc/conf/DEFAULTS @@ -11,5 +11,3 @@ options GEOM_PART_BSD options GEOM_PART_MBR - -options NEW_PCIB Index: sys/riscv/conf/DEFAULTS =================================================================== --- sys/riscv/conf/DEFAULTS +++ sys/riscv/conf/DEFAULTS @@ -11,5 +11,3 @@ # Default partitioning schemes options GEOM_PART_BSD options GEOM_PART_MBR - -options NEW_PCIB Index: sys/riscv/include/resource.h =================================================================== --- sys/riscv/include/resource.h +++ sys/riscv/include/resource.h @@ -42,8 +42,6 @@ #define SYS_RES_MEMORY 3 /* i/o memory */ #define SYS_RES_IOPORT 4 /* i/o ports */ #define SYS_RES_GPIO 5 /* general purpose i/o */ -#ifdef NEW_PCIB #define PCI_RES_BUS 6 /* PCI bus numbers */ -#endif #endif /* !_MACHINE_RESOURCE_H_ */ Index: sys/x86/include/mptable.h =================================================================== --- sys/x86/include/mptable.h +++ sys/x86/include/mptable.h @@ -190,16 +190,12 @@ #ifdef _KERNEL struct mptable_hostb_softc { -#ifdef NEW_PCIB struct pcib_host_resources sc_host_res; int sc_decodes_vga_io; int sc_decodes_isa_io; -#endif }; -#ifdef NEW_PCIB void mptable_pci_host_res_init(device_t pcib); -#endif int mptable_pci_probe_table(int bus); int mptable_pci_route_interrupt(device_t pcib, device_t dev, int pin); #endif Index: sys/x86/pci/pci_bus.c =================================================================== --- sys/x86/pci/pci_bus.c +++ sys/x86/pci/pci_bus.c @@ -597,7 +597,7 @@ rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) if (type == PCI_RES_BUS) return (pci_domain_alloc_bus(0, child, rid, start, end, count, flags)); @@ -607,7 +607,7 @@ count, flags)); } -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) int legacy_pcib_adjust_resource(device_t dev, device_t child, int type, struct resource *r, rman_res_t start, rman_res_t end) @@ -642,7 +642,7 @@ DEVMETHOD(bus_read_ivar, legacy_pcib_read_ivar), DEVMETHOD(bus_write_ivar, legacy_pcib_write_ivar), DEVMETHOD(bus_alloc_resource, legacy_pcib_alloc_resource), -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) DEVMETHOD(bus_adjust_resource, legacy_pcib_adjust_resource), DEVMETHOD(bus_release_resource, legacy_pcib_release_resource), #else Index: sys/x86/pci/qpi.c =================================================================== --- sys/x86/pci/qpi.c +++ sys/x86/pci/qpi.c @@ -251,7 +251,7 @@ } } -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) static struct resource * qpi_pcib_alloc_resource(device_t dev, device_t child, int type, int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) @@ -285,7 +285,7 @@ /* Bus interface */ DEVMETHOD(bus_read_ivar, qpi_pcib_read_ivar), -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) DEVMETHOD(bus_alloc_resource, qpi_pcib_alloc_resource), DEVMETHOD(bus_adjust_resource, legacy_pcib_adjust_resource), DEVMETHOD(bus_release_resource, legacy_pcib_release_resource), Index: sys/x86/x86/mptable.c =================================================================== --- sys/x86/x86/mptable.c +++ sys/x86/x86/mptable.c @@ -37,18 +37,14 @@ #include #include #include -#ifdef NEW_PCIB #include -#endif #include #include #include #include -#ifdef NEW_PCIB #include -#endif #include #include #include @@ -56,9 +52,7 @@ #include #include #include -#ifdef NEW_PCIB #include -#endif #include /* string defined by the Intel MP Spec as identifying the MP table */ @@ -199,10 +193,8 @@ static void mptable_register(void *dummy); static int mptable_setup_local(void); static int mptable_setup_io(void); -#ifdef NEW_PCIB static void mptable_walk_extended_table( mptable_extended_entry_handler *handler, void *arg); -#endif static void mptable_walk_table(mptable_entry_handler *handler, void *arg); static int search_for_sig(u_int32_t target, int count); @@ -455,7 +447,6 @@ } } -#ifdef NEW_PCIB /* * Call the handler routine for each entry in the MP config extended * table. @@ -474,7 +465,6 @@ entry = (ext_entry_ptr)((char *)entry + entry->length); } } -#endif static void mptable_probe_cpus_handler(u_char *entry, void *arg) @@ -1129,7 +1119,6 @@ return (args.vector); } -#ifdef NEW_PCIB struct host_res_args { struct mptable_hostb_softc *sc; device_t dev; @@ -1257,4 +1246,3 @@ panic("failed to init hostb resources"); mptable_walk_extended_table(mptable_host_res_handler, &args); } -#endif Index: sys/x86/x86/mptable_pci.c =================================================================== --- sys/x86/x86/mptable_pci.c +++ sys/x86/x86/mptable_pci.c @@ -67,14 +67,11 @@ mptable_hostb_attach(device_t dev) { -#ifdef NEW_PCIB mptable_pci_host_res_init(dev); -#endif device_add_child(dev, "pci", -1); return (bus_generic_attach(dev)); } -#ifdef NEW_PCIB static int mptable_is_isa_range(rman_res_t start, rman_res_t end) { @@ -155,7 +152,6 @@ return (pcib_host_res_adjust(&sc->sc_host_res, child, type, r, start, end)); } -#endif static device_method_t mptable_hostb_methods[] = { /* Device interface */ @@ -168,14 +164,9 @@ /* Bus interface */ DEVMETHOD(bus_read_ivar, legacy_pcib_read_ivar), DEVMETHOD(bus_write_ivar, legacy_pcib_write_ivar), -#ifdef NEW_PCIB DEVMETHOD(bus_alloc_resource, mptable_hostb_alloc_resource), DEVMETHOD(bus_adjust_resource, mptable_hostb_adjust_resource), -#else - DEVMETHOD(bus_alloc_resource, legacy_pcib_alloc_resource), - DEVMETHOD(bus_adjust_resource, bus_generic_adjust_resource), -#endif -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) DEVMETHOD(bus_release_resource, legacy_pcib_release_resource), #else DEVMETHOD(bus_release_resource, bus_generic_release_resource),