summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2005-09-17 23:57:53 +0000
committerimp <imp@FreeBSD.org>2005-09-17 23:57:53 +0000
commitd01ccbd79e832c78b4229e46202ca7173c55319c (patch)
treed68e76ad93d6ef7fc93b4003e6e293216a74d30f /sys
parent02556fa478b1eb1a968e3174e45538a09260bc06 (diff)
downloadFreeBSD-src-d01ccbd79e832c78b4229e46202ca7173c55319c.zip
FreeBSD-src-d01ccbd79e832c78b4229e46202ca7173c55319c.tar.gz
Expose legacy_pcib_alloc_resource, and use it in the mptable pci bus
implementation, like other routines in the legacy bus. This should fix problems with resource allocation on MP systems without ACPI enabled.
Diffstat (limited to 'sys')
-rw-r--r--sys/i386/i386/mptable_pci.c2
-rw-r--r--sys/i386/include/legacyvar.h2
-rw-r--r--sys/i386/pci/pci_bus.c2
3 files changed, 4 insertions, 2 deletions
diff --git a/sys/i386/i386/mptable_pci.c b/sys/i386/i386/mptable_pci.c
index 660ced6..5a34373 100644
--- a/sys/i386/i386/mptable_pci.c
+++ b/sys/i386/i386/mptable_pci.c
@@ -84,7 +84,7 @@ static device_method_t mptable_hostb_methods[] = {
DEVMETHOD(bus_print_child, bus_generic_print_child),
DEVMETHOD(bus_read_ivar, legacy_pcib_read_ivar),
DEVMETHOD(bus_write_ivar, legacy_pcib_write_ivar),
- DEVMETHOD(bus_alloc_resource, bus_generic_alloc_resource),
+ DEVMETHOD(bus_alloc_resource, legacy_pcib_alloc_resource),
DEVMETHOD(bus_release_resource, bus_generic_release_resource),
DEVMETHOD(bus_activate_resource, bus_generic_activate_resource),
DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource),
diff --git a/sys/i386/include/legacyvar.h b/sys/i386/include/legacyvar.h
index 81e8712..91f784f 100644
--- a/sys/i386/include/legacyvar.h
+++ b/sys/i386/include/legacyvar.h
@@ -49,5 +49,7 @@ void legacy_pcib_write_config(device_t dev, int bus, int slot, int func,
int reg, u_int32_t data, int bytes);
int legacy_pcib_write_ivar(device_t dev, device_t child, int which,
uintptr_t value);
+struct resource *legacy_pcib_alloc_resource(device_t dev, device_t child,
+ int type, int *rid, u_long start, u_long end, u_long count, u_int flags);
#endif /* !_MACHINE_LEGACYVAR_H_ */
diff --git a/sys/i386/pci/pci_bus.c b/sys/i386/pci/pci_bus.c
index afd4bc6..0c9fc3b 100644
--- a/sys/i386/pci/pci_bus.c
+++ b/sys/i386/pci/pci_bus.c
@@ -485,7 +485,7 @@ SYSCTL_ULONG(_hw_pci, OID_AUTO, host_mem_start, CTLFLAG_RDTUN,
"Limit the host bridge memory to being above this address. Must be\n\
set at boot via a tunable.");
-static struct resource *
+struct resource *
legacy_pcib_alloc_resource(device_t dev, device_t child, int type, int *rid,
u_long start, u_long end, u_long count, u_int flags)
{
OpenPOWER on IntegriCloud