summaryrefslogtreecommitdiffstats
path: root/sys/dev/pci
diff options
context:
space:
mode:
authordfr <dfr@FreeBSD.org>2000-04-08 14:17:18 +0000
committerdfr <dfr@FreeBSD.org>2000-04-08 14:17:18 +0000
commitc9bf4be3c29d14ce9b4af20459517870eed8bce9 (patch)
treeb0ea9aab688814aec913835039451900941b1619 /sys/dev/pci
parent2d18287eb4e48e437d5e7a756df6f20a59c7e176 (diff)
downloadFreeBSD-src-c9bf4be3c29d14ce9b4af20459517870eed8bce9.zip
FreeBSD-src-c9bf4be3c29d14ce9b4af20459517870eed8bce9.tar.gz
* Factor out the object system from new-bus so that it can be used by
non-device code. * Re-implement the method dispatch to improve efficiency. The new system takes about 40ns for a method dispatch on a 300Mhz PII which is only 10ns slower than a direct function call on the same hardware. This changes the new-bus ABI slightly so make sure you re-compile any driver modules which you use.
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/pci.c2
-rw-r--r--sys/dev/pci/pci_if.m2
2 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c
index faa813b..574d567 100644
--- a/sys/dev/pci/pci.c
+++ b/sys/dev/pci/pci.c
@@ -940,7 +940,7 @@ compat_pci_handler(module_t mod, int type, void *data)
bzero(driver, sizeof(driver_t));
driver->name = dvp->pd_name;
driver->methods = pci_compat_methods;
- driver->softc = sizeof(struct pci_devinfo *);
+ driver->size = sizeof(struct pci_devinfo *);
driver->priv = dvp;
devclass_add_driver(pci_devclass, driver);
break;
diff --git a/sys/dev/pci/pci_if.m b/sys/dev/pci/pci_if.m
index 95b0081..e055f42 100644
--- a/sys/dev/pci/pci_if.m
+++ b/sys/dev/pci/pci_if.m
@@ -26,6 +26,8 @@
# $FreeBSD$
#
+#include <sys/bus.h>
+
INTERFACE pci;
METHOD u_int32_t read_config {
OpenPOWER on IntegriCloud