aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/hyperv
diff options
context:
space:
mode:
authorJessica Clarke <jrtc27@FreeBSD.org>2024-07-18 17:55:12 +0000
committerJessica Clarke <jrtc27@FreeBSD.org>2024-07-18 17:55:12 +0000
commit8415a654d02e1c4268885e667c539873db570576 (patch)
tree95d5536889f1e984768e7a70c1074190700cd649 /sys/dev/hyperv
parent03248b3f5079c490d949f4e8725a37624d707e14 (diff)
Retire non-NEW_PCIB code and remove config option
All architectures enable NEW_PCIB in DEFAULTS (arm being the most recent to do so in 121be555997b (arm: Set NEW_PCIB in DEFAULTS rather than a subset of kernel configs")), so it's time we removed the legacy code that no longer sees much testing and has a significant maintenance burden. Reviewed by: jhb, andrew, emaste Differential Revision: https://reviews.freebsd.org/D32954
Diffstat (limited to 'sys/dev/hyperv')
-rw-r--r--sys/dev/hyperv/pcib/vmbus_pcib.c3
-rw-r--r--sys/dev/hyperv/vmbus/vmbus.c11
-rw-r--r--sys/dev/hyperv/vmbus/vmbus_var.h2
3 files changed, 1 insertions, 15 deletions
diff --git a/sys/dev/hyperv/pcib/vmbus_pcib.c b/sys/dev/hyperv/pcib/vmbus_pcib.c
index f6237535cce3..9aec2fac698a 100644
--- a/sys/dev/hyperv/pcib/vmbus_pcib.c
+++ b/sys/dev/hyperv/pcib/vmbus_pcib.c
@@ -25,7 +25,6 @@
*/
#include <sys/cdefs.h>
-#ifdef NEW_PCIB
#include "opt_acpi.h"
#include <sys/param.h>
@@ -2042,5 +2041,3 @@ DEFINE_CLASS_0(pcib, vmbus_pcib_driver, vmbus_pcib_methods,
DRIVER_MODULE(vmbus_pcib, vmbus, vmbus_pcib_driver, 0, 0);
MODULE_DEPEND(vmbus_pcib, vmbus, 1, 1, 1);
MODULE_DEPEND(vmbus_pcib, pci, 1, 1, 1);
-
-#endif /* NEW_PCIB */
diff --git a/sys/dev/hyperv/vmbus/vmbus.c b/sys/dev/hyperv/vmbus/vmbus.c
index dee738f6e373..4157a4c41cea 100644
--- a/sys/dev/hyperv/vmbus/vmbus.c
+++ b/sys/dev/hyperv/vmbus/vmbus.c
@@ -1069,15 +1069,12 @@ vmbus_alloc_resource(device_t dev, device_t child, int type, int *rid,
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);
}
@@ -1158,7 +1155,6 @@ vmbus_get_eventtq_method(device_t bus, device_t dev __unused, int cpu)
return (VMBUS_PCPU_GET(sc, event_tq, cpu));
}
-#ifdef NEW_PCIB
#define VTPM_BASE_ADDR 0xfed40000
#define FOUR_GB (1ULL << 32)
@@ -1375,7 +1371,6 @@ vmbus_free_mmio_res(device_t dev)
if (hv_fb_res)
hv_fb_res = NULL;
}
-#endif /* NEW_PCIB */
static void
vmbus_identify(driver_t *driver, device_t parent)
@@ -1460,10 +1455,8 @@ vmbus_doattach(struct vmbus_softc *sc)
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;
@@ -1681,9 +1674,7 @@ vmbus_detach(device_t dev)
mtx_destroy(&sc->vmbus_prichan_lock);
mtx_destroy(&sc->vmbus_chan_lock);
-#ifdef NEW_PCIB
vmbus_free_mmio_res(dev);
-#endif
#if defined(__aarch64__)
bus_release_resource(device_get_parent(dev), SYS_RES_IRQ, sc->vector,
diff --git a/sys/dev/hyperv/vmbus/vmbus_var.h b/sys/dev/hyperv/vmbus/vmbus_var.h
index 4e0a769402d5..cadcaa45aae5 100644
--- a/sys/dev/hyperv/vmbus/vmbus_var.h
+++ b/sys/dev/hyperv/vmbus/vmbus_var.h
@@ -127,10 +127,8 @@ struct vmbus_softc {
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
#if defined(__aarch64__)
struct resource *ires;