From: "Gerhard Pircher" <gerhard_pircher@gmx.net>
To: linuxppc-dev@ozlabs.org
Subject: Problem with OF interrupt parsing code
Date: Mon, 01 Oct 2007 23:00:25 +0200 [thread overview]
Message-ID: <20071001210025.314240@gmx.net> (raw)
Hi,
I think I found an issue in the OF interrupt parsing code, although I
have to admit that my device tree source doesn't really follow the
specification.
First some information about my target setup. I didn't specify an
interrupt-map and interrupt-map-mask property in the pci node, because
AFAIK there are three different AmigaOne models with different IRQ
routing. Secondly the AmigaOne is a desktop system with 4 PCI/AGP slots,
thus I can't specify device nodes for all possible devices. By looking at
pci_read_irq_line() in pci_common.c it should be possible for the kernel
to fall back to the interrupt settings in the PCI config space of every
device.
Unfortunately I couldn't capture the kernel log, because the serial
console is not yet working, so here comes a description of what I think
is going on.
Well, pci_read_irq_line() starts with PCI device 00:00.0 (PCI host bridge)
and invokes of_irq_map_pci() in prom_parse.c. It find the predefined
device node in the device tree. Since of_irq_map_one() can't find an
interrupt property in the device node, it returns to pci_read_irq_line()
and setups the interrupt mapping based on the settings in the PCI config
space. So far so good.
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).
Can somebody confirm my explanation? It would help, if the kernel could
fall back to the PCI settings in this case, too.
Thanks!
regards,
Gerhard
--
GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS.
Alle Infos und kostenlose Anmeldung: http://www.gmx.net/de/go/freemail
next reply other threads:[~2007-10-01 21:00 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-01 21:00 Gerhard Pircher [this message]
2007-10-01 21:11 ` Problem with OF interrupt parsing code Gerhard Pircher
2007-10-01 21:39 ` Benjamin Herrenschmidt
2007-10-01 22:33 ` Segher Boessenkool
2007-10-01 22:54 ` Benjamin Herrenschmidt
2007-10-01 22:55 ` Benjamin Herrenschmidt
2007-10-01 23:36 ` Segher Boessenkool
2007-10-02 12:38 ` Gerhard Pircher
2007-10-02 22:03 ` Benjamin Herrenschmidt
2007-10-03 7:43 ` Gerhard Pircher
2007-10-01 21:26 ` Scott Wood
2007-10-01 21:37 ` Scott Wood
2007-10-01 21:43 ` Benjamin Herrenschmidt
2007-10-01 21:48 ` Scott Wood
2007-10-01 22:07 ` Benjamin Herrenschmidt
2007-10-02 12:46 ` Gerhard Pircher
2007-10-01 21:36 ` Benjamin Herrenschmidt
-- strict thread matches above, loose matches on Subject: below --
2007-10-02 12:40 Gerhard Pircher
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071001210025.314240@gmx.net \
--to=gerhard_pircher@gmx.net \
--cc=linuxppc-dev@ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).