Date: Mon, 31 Mar 2025 20:14:38 +0100 From: Jessica Clarke <jrtc27@freebsd.org> To: Colin Percival <cperciva@FreeBSD.org> Cc: "src-committers@freebsd.org" <src-committers@FreeBSD.org>, "dev-commits-src-all@freebsd.org" <dev-commits-src-all@FreeBSD.org>, "dev-commits-src-main@freebsd.org" <dev-commits-src-main@FreeBSD.org> Subject: Re: git: 0e33c2e6df7a - main - pci: Only re-route IRQs based on firmware on x86 Message-ID: <F51D8FD7-4EB5-4EE8-A1AB-867B0FC392CD@freebsd.org> In-Reply-To: <202503292018.52TKI7va048377@gitrepo.freebsd.org> References: <202503292018.52TKI7va048377@gitrepo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 29 Mar 2025, at 20:18, Colin Percival <cperciva@FreeBSD.org> wrote: >=20 > The branch main has been updated by cperciva: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3D0e33c2e6df7a5de65db40c7cc0fc97f6= 6da28ccd >=20 > commit 0e33c2e6df7a5de65db40c7cc0fc97f66da28ccd > Author: Colin Percival <cperciva@FreeBSD.org> > AuthorDate: 2025-03-28 18:07:01 +0000 > Commit: Colin Percival <cperciva@FreeBSD.org> > CommitDate: 2025-03-29 20:17:29 +0000 >=20 > pci: Only re-route IRQs based on firmware on x86 >=20 > 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. This is in fact incorrect. Whilst there may well be a leak that needs fixing, the rerouting is absolutely needed on non-x86 platforms. See 5884fab46153dee52bda660bcabca95c3cc97f44 and 7de649170fd804668da78f005c7966941b402106 for some of the history behind this. As a result of this commit the problem described in the second commit is reintroduced. Jess > Suggested by: jhb > Reviewed by: jhb > MFC after: 2 weeks > Sponsored by: Amazon > Differential Revision: https://reviews.freebsd.org/D49560 > --- > sys/dev/pci/pci.c | 2 ++ > 1 file changed, 2 insertions(+) >=20 > 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 =3D=3D devid && q->type =3D=3D PCI_QUIRK_MAP_REG) > pci_add_map(bus, dev, q->arg1, rl, force, 0); >=20 > +#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 >=20 > if (pci_usb_takeover && pci_get_class(dev) =3D=3D PCIC_SERIALBUS && > pci_get_subclass(dev) =3D=3D PCIS_SERIALBUS_USB) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?F51D8FD7-4EB5-4EE8-A1AB-867B0FC392CD>