Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102085973
D43430.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
3 KB
Referenced Files
None
Subscribers
None
D43430.diff
View Options
diff --git a/sys/x86/include/legacyvar.h b/sys/x86/include/legacyvar.h
--- a/sys/x86/include/legacyvar.h
+++ b/sys/x86/include/legacyvar.h
@@ -62,6 +62,10 @@
struct resource *r, rman_res_t start, rman_res_t end);
int legacy_pcib_release_resource(device_t dev, device_t child, int type,
int rid, struct resource *r);
+int legacy_pcib_activate_resource(device_t dev, device_t child, int type,
+ int rid, struct resource *r);
+int legacy_pcib_deactivate_resource(device_t dev, device_t child, int type,
+ int rid, struct resource *r);
int legacy_pcib_alloc_msi(device_t pcib, device_t dev, int count,
int maxcount, int *irqs);
int legacy_pcib_alloc_msix(device_t pcib, device_t dev, int *irq);
diff --git a/sys/x86/pci/pci_bus.c b/sys/x86/pci/pci_bus.c
--- a/sys/x86/pci/pci_bus.c
+++ b/sys/x86/pci/pci_bus.c
@@ -625,6 +625,24 @@
return (pci_domain_release_bus(0, child, rid, r));
return (bus_generic_release_resource(dev, child, type, rid, r));
}
+
+int
+legacy_pcib_activate_resource(device_t dev, device_t child, int type, int rid,
+ struct resource *r)
+{
+ if (type == PCI_RES_BUS)
+ return (pci_domain_activate_bus(0, child, rid, r));
+ return (bus_generic_activate_resource(dev, child, type, rid, r));
+}
+
+int
+legacy_pcib_deactivate_resource(device_t dev, device_t child, int type, int rid,
+ struct resource *r)
+{
+ if (type == PCI_RES_BUS)
+ return (pci_domain_deactivate_bus(0, child, rid, r));
+ return (bus_generic_deactivate_resource(dev, child, type, rid, r));
+}
#endif
static device_method_t legacy_pcib_methods[] = {
@@ -643,12 +661,14 @@
#if defined(NEW_PCIB) && defined(PCI_RES_BUS)
DEVMETHOD(bus_adjust_resource, legacy_pcib_adjust_resource),
DEVMETHOD(bus_release_resource, legacy_pcib_release_resource),
+ DEVMETHOD(bus_activate_resource, legacy_pcib_activate_resource),
+ DEVMETHOD(bus_deactivate_resource, legacy_pcib_deactivate_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),
+#endif
DEVMETHOD(bus_setup_intr, bus_generic_setup_intr),
DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr),
diff --git a/sys/x86/pci/qpi.c b/sys/x86/pci/qpi.c
--- a/sys/x86/pci/qpi.c
+++ b/sys/x86/pci/qpi.c
@@ -284,12 +284,14 @@
DEVMETHOD(bus_alloc_resource, qpi_pcib_alloc_resource),
DEVMETHOD(bus_adjust_resource, legacy_pcib_adjust_resource),
DEVMETHOD(bus_release_resource, legacy_pcib_release_resource),
+ DEVMETHOD(bus_activate_resource, legacy_pcib_activate_resource),
+ DEVMETHOD(bus_deactivate_resource, legacy_pcib_deactivate_resource),
#else
DEVMETHOD(bus_alloc_resource, bus_generic_alloc_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),
+#endif
DEVMETHOD(bus_setup_intr, bus_generic_setup_intr),
DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr),
diff --git a/sys/x86/x86/mptable_pci.c b/sys/x86/x86/mptable_pci.c
--- a/sys/x86/x86/mptable_pci.c
+++ b/sys/x86/x86/mptable_pci.c
@@ -174,11 +174,13 @@
#endif
#if defined(NEW_PCIB) && defined(PCI_RES_BUS)
DEVMETHOD(bus_release_resource, legacy_pcib_release_resource),
+ DEVMETHOD(bus_activate_resource, legacy_pcib_activate_resource),
+ DEVMETHOD(bus_deactivate_resource, legacy_pcib_deactivate_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),
+#endif
DEVMETHOD(bus_setup_intr, bus_generic_setup_intr),
DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr),
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 8, 10:49 AM (21 h, 11 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14533633
Default Alt Text
D43430.diff (3 KB)
Attached To
Mode
D43430: x86: Use pci_domain_[de]activate_bus for PCI_RES_BUS resources
Attached
Detach File
Event Timeline
Log In to Comment