diff options
| author | Colin Percival <cperciva@FreeBSD.org> | 2025-03-28 18:07:01 +0000 |
|---|---|---|
| committer | Colin Percival <cperciva@FreeBSD.org> | 2025-03-29 20:17:29 +0000 |
| commit | 0e33c2e6df7a5de65db40c7cc0fc97f66da28ccd (patch) | |
| tree | 138ceb7a9b294bc29f689ec43bb33dc3d73eea8d | |
| parent | 4cb527be7a251d89fa5955532300e08eec136051 (diff) | |
pci: Only re-route IRQs based on firmware on x86
There is a (very historical) call to pci_assign_interrupt for the
purpose of routing IRQs which may have been set up wrong by x86 BIOS
or firmware. On non-x86 systems, this is unnecessary; and on INTRNG
systems it results in a (synthetic) IRQ leak and ultimately a kernel
panic after many hotplug/unplug cycles.
Suggested by: jhb
Reviewed by: jhb
MFC after: 2 weeks
Sponsored by: Amazon
Differential Revision: https://reviews.freebsd.org/D49560
| -rw-r--r-- | sys/dev/pci/pci.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c index fe99d6beb029..3a51e4c38296 100644 --- a/sys/dev/pci/pci.c +++ b/sys/dev/pci/pci.c @@ -4175,6 +4175,7 @@ pci_add_resources(device_t bus, device_t dev, int force, uint32_t prefetchmask) if (q->devid == devid && q->type == PCI_QUIRK_MAP_REG) pci_add_map(bus, dev, q->arg1, rl, force, 0); +#if defined(__i386__) || defined(__amd64__) if (cfg->intpin > 0 && PCI_INTERRUPT_VALID(cfg->intline)) { /* * Try to re-route interrupts. Sometimes the BIOS or @@ -4184,6 +4185,7 @@ pci_add_resources(device_t bus, device_t dev, int force, uint32_t prefetchmask) */ pci_assign_interrupt(bus, dev, 1); } +#endif if (pci_usb_takeover && pci_get_class(dev) == PCIC_SERIALBUS && pci_get_subclass(dev) == PCIS_SERIALBUS_USB) { |
