diff options
author | jhb <jhb@FreeBSD.org> | 2004-11-23 22:26:44 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2004-11-23 22:26:44 +0000 |
commit | fb979fee7e3df1dfcf653e7ecb6dfd0d5e29d725 (patch) | |
tree | b12db010cf220f4fc5b064dcbaea39d6686d6afa /sys/dev/acpica/acpi_pcib_acpi.c | |
parent | 278f52e7a7437df96f1c2a2f1513356a05dcc7dc (diff) | |
download | FreeBSD-src-fb979fee7e3df1dfcf653e7ecb6dfd0d5e29d725.zip FreeBSD-src-fb979fee7e3df1dfcf653e7ecb6dfd0d5e29d725.tar.gz |
Rework the ACPI PCI link code.
- Use a new-bus device driver for the ACPI PCI link devices. The devices
are called pci_linkX. The driver includes suspend/resume support so that
the ACPI bridge drivers no longer have to poke the links to get them
to handle suspend/resume. Also, the code to handle which IRQs a link is
routed to and choosing an IRQ when a link is not already routed is all
contained in the link driver. The PCI bridge drivers now ask the link
driver which IRQ to use once they determine that a _PRT entry does not
use a hardwired interrupt number.
- The new link driver includes support for multiple IRQ resources per
link device as well as preserving any non-IRQ resources when adjusting
the IRQ that a link is routed to.
- The entire approach to routing when using a link device is now
link-centric rather than pci bus/device/pin specific. Thus, when
using a tunable to override the default IRQ settings, one now uses
a single tunable to route an entire link rather than routing a single
device that uses the link (which has great foot-shooting potential if
the user tries to route the same link to two different IRQs using two
different pci bus/device/pin hints). For example, to adjust the IRQ
that \_SB_.LNKA uses, one would set 'hw.pci.link.LNKA.irq=10' from the
loader.
- As a side effect of having the link driver, unused link devices will now
be disabled when they are probed.
- The algorithm for choosing an IRQ for a link that doesn't already have an
IRQ assigned is now much closer to the one used in $PIR routing. When a
link is routed via an ISA IRQ, only known-good IRQs that the BIOS has
already used are used for routing instead of using probabilities to
guess at which IRQs are probably not used by an ISA device. One change
from $PIR is that the SCI is always considered a viable ISA IRQ, so that
if the BIOS does not setup any IRQs the kernel will degenerate to routing
all interrupts over the SCI. For non ISA IRQs, interrupts are picked
from the possible pool using a simplistic weighting algorithm.
Tested by: ru, scottl, others on acpi@
Reviewed by: njl
Diffstat (limited to 'sys/dev/acpica/acpi_pcib_acpi.c')
-rw-r--r-- | sys/dev/acpica/acpi_pcib_acpi.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/acpica/acpi_pcib_acpi.c b/sys/dev/acpica/acpi_pcib_acpi.c index 5614f6c..b1d14ab 100644 --- a/sys/dev/acpica/acpi_pcib_acpi.c +++ b/sys/dev/acpica/acpi_pcib_acpi.c @@ -297,8 +297,9 @@ acpi_pcib_write_config(device_t dev, int bus, int slot, int func, int reg, static int acpi_pcib_acpi_route_interrupt(device_t pcib, device_t dev, int pin) { + struct acpi_hpcib_softc *sc = device_get_softc(pcib); - return (acpi_pcib_route_interrupt(pcib, dev, pin)); + return (acpi_pcib_route_interrupt(pcib, dev, pin, &sc->ap_prt)); } static u_long acpi_host_mem_start = 0x80000000; |