From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTP id DB767DDF09 for ; Tue, 2 Oct 2007 07:43:13 +1000 (EST) Subject: Re: Problem with OF interrupt parsing code From: Benjamin Herrenschmidt To: Scott Wood In-Reply-To: <470168B4.7090005@freescale.com> References: <20071001210025.314240@gmx.net> <470165F6.7030505@freescale.com> <470168B4.7090005@freescale.com> Content-Type: text/plain Date: Tue, 02 Oct 2007 07:43:01 +1000 Message-Id: <1191274981.6310.19.camel@pasglop> Mime-Version: 1.0 Cc: linuxppc-dev@ozlabs.org Reply-To: benh@kernel.crashing.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Mon, 2007-10-01 at 16:37 -0500, Scott Wood wrote: > Scott Wood wrote: > >> The problem occurs now, if there is no device node defined for another > >> PCI device. In this case, of_irq_map_pci() checks for an interrupt pin, > >> searches again for the host bridge node and calls of_irq_map_raw() with > >> the device node of the host bridge. The function finds the > >> #interrupt-cells, #address-cells, interrupt-controller properties, but > >> fails to find the interrupt-map property (because it's missing in the > >> device tree). Therefore the function then tries to find a new parent, > >> which leads to an endless loop (it always selects the PCI2ISA southbridge > >> in the device tree). > > > > That seems likely... there should probably be some loop detection. > > Actually, it doesn't -- it should stop when it sees the > interrupt-controller property in the i8259 node, at which point it'll be > trying to use the raw PCI IRQ pin number as an i8259 IRQ. This is > Unlikely To Work(tm). It will work in the specific 8259 case I suppose since it gets the legacy 1:1 mapping... but it sucks :-) Ben.