From: Matt Porter <mmporter@home.com>
To: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Cc: Michel Lanners <mlan@cpu.lu>,
grant@borg.umn.edu, linuxppc-dev@lists.linuxppc.org
Subject: Re: Grabbing an Interrupt for a Brain-dead PCI Device
Date: Wed, 8 Mar 2000 07:15:54 -0700 [thread overview]
Message-ID: <20000308071553.A5939@home.com> (raw)
In-Reply-To: <Pine.GSO.4.10.10003080927450.1992-100000@dandelion.sonytel.be>; from Geert.Uytterhoeven@sonycom.com on Wed, Mar 08, 2000 at 09:31:42AM +0100
On Wed, Mar 08, 2000 at 09:31:42AM +0100, Geert Uytterhoeven wrote:
>
> On Tue, 7 Mar 2000, Michel Lanners wrote:
> > If this is in a PowerMac (at least those previous to UMA), then there
> > is a fixed IRQ per physical slot. All 4 PCI interrupt lines are OR'ed
> > together per slot.
> >
> > However, there are other IRQ routing schemes as well... the above being
> > the easiest one, because the IRQ value can be hardcoded based on the
> > slot, which you can determine by software.
>
> The most popular routing scheme looks like this:
>
> #INTA(slot_nr) -> pci_int(slot_nr % 4)
> #INTB(slot_nr) -> pci_int((slot_nr+1) % 4)
> #INTC(slot_nr) -> pci_int((slot_nr+2) % 4)
> #INTD(slot_nr) -> pci_int((slot_nr+3) % 4)
>
> where
>
> pci_int(0) = #INTW
> pci_int(1) = #INTX
> pci_int(2) = #INTY
> pci_int(3) = #INTZ
>
> Hence if all boards use one interrupt (the first interrupt on a board _must_ be
> #INTA), they're evenly spread across the available interrupt sources.
This is documented in the PCI spec as the suggested method of routing irqs.
We usually call it the standard PCI swizzle, since the interrupts
tumble as they pass through each bridge. I added this algorithm into
prep_pci.c for MCG boards recently since it is pretty crucial for CPCI
systems that are loaded up with bridges. There are also plenty of regular
PCI boards that have a P2P and multiple single function devices on board
that also require this routing (old dual Ethernet cards come to mind,
slapping two 21x4x chips and a transparent bridge onboard).
--
Matt Porter
mmporter@home.com
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
next prev parent reply other threads:[~2000-03-08 14:15 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-03-05 21:30 HELP: Power Mac G3 PCI Strangeness in 2.2 and 2.3 Grant Erickson
2000-03-06 11:04 ` Geert Uytterhoeven
2000-03-07 20:40 ` Grabbing an Interrupt for a Brain-dead PCI Device Grant Erickson
2000-03-07 21:00 ` Geert Uytterhoeven
2000-03-07 22:00 ` Michel Lanners
2000-03-08 8:31 ` Geert Uytterhoeven
2000-03-08 14:15 ` Matt Porter [this message]
2000-03-08 18:47 ` Grant Erickson
2000-03-08 19:12 ` Geert Uytterhoeven
2000-03-09 6:58 ` Michel Lanners
2000-03-09 12:52 ` Gabriel Paubert
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=20000308071553.A5939@home.com \
--to=mmporter@home.com \
--cc=Geert.Uytterhoeven@sonycom.com \
--cc=grant@borg.umn.edu \
--cc=linuxppc-dev@lists.linuxppc.org \
--cc=mlan@cpu.lu \
/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).