Date: Fri, 6 Jun 2003 21:13:17 +0200 From: Bernd Walter <ticso@cicely12.cicely.de> To: "M. Warner Losh" <imp@bsdimp.com> Cc: current@freebsd.org Subject: Re: [PATCH] Tweak re-routing of PCI interrupts Message-ID: <20030606191316.GB1290@cicely12.cicely.de> In-Reply-To: <20030606.123654.96603092.imp@bsdimp.com> References: <XFMail.20030606141331.jhb@FreeBSD.org> <20030606.123654.96603092.imp@bsdimp.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Jun 06, 2003 at 12:36:54PM -0600, M. Warner Losh wrote: > In message: <XFMail.20030606141331.jhb@FreeBSD.org> > John Baldwin <jhb@FreeBSD.org> writes: > : I have a small tweak to the PCI code that re-routes PCI interrupts. > : Basically, it does two things, 1) make the comment less ia64-specific > : and 2) if the interrupt route returns an invalid IRQ (i.e. 255), then > : we don't change the intline. In other words, if we can't route the > : interrupt, we just assume that the firmware knows more than we do and > : go with the value it stuck in the register. 1) is a no-brainer, but > : I wonder what people think about 2). Patch below: > > I think #2 isn't so good. #1 is a no-brainer :-) > > : #if ... > ... > : + irq = PCIB_ROUTE_INTERRUPT(pcib, dev, cfg->intpin); > : + if (PCI_INTERRUPT_VALID(irq)) > : + cfg->intline = irq; > : + else > : #endif > : + irq = cfg->intline; > : + resource_list_add(rl, SYS_RES_IRQ, 0, irq, irq, 1); > : } > : } > > The part I don't like is that if we can't route an interrupt, we > assume that the interrupt that was written there before is good and > routed. This strikes me as an unwise assumption. Also, we haven't Unless you find a reliable way to ask the BIOS how the board is wired, whatelse would you do than trust the inline register? > recorded our info in the underlying pci register. Don't know if that > will matter for other OSes that are booted after we are. -- B.Walter BWCT http://www.bwct.de ticso@bwct.de info@bwct.de
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030606191316.GB1290>