From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Kumar Gala <galak@kernel.crashing.org>
Cc: "linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>
Subject: Re: pci node question
Date: Sat, 21 Apr 2012 07:11:26 +1000 [thread overview]
Message-ID: <1334956286.3197.16.camel@pasglop> (raw)
In-Reply-To: <D04C6167-5286-4675-A6D8-32BA63305424@kernel.crashing.org>
On Fri, 2012-04-20 at 13:53 -0500, Kumar Gala wrote:
> On Apr 20, 2012, at 1:37 PM, Yoder Stuart-B08248 wrote:
>
> > There was refactoring change a while back that moved
> > the interrupt map down into the virtual pci bridge.
> >
> > example:
> > 42 /* controller at 0x200000 */
> > 43 &pci0 {
> > 44 compatible = "fsl,p2041-pcie", "fsl,qoriq-pcie-v2.2";
> > 45 device_type = "pci";
> > 46 #size-cells = <2>;
> > 47 #address-cells = <3>;
> > 48 bus-range = <0x0 0xff>;
> > 49 clock-frequency = <33333333>;
> > 50 interrupts = <16 2 1 15>;
> > 51 pcie@0 {
> > 52 reg = <0 0 0 0 0>;
> > 53 #interrupt-cells = <1>;
> > 54 #size-cells = <2>;
> > 55 #address-cells = <3>;
> > 56 device_type = "pci";
> > 57 interrupts = <16 2 1 15>;
> > 58 interrupt-map-mask = <0xf800 0 0 7>;
> > 59 interrupt-map = <
> > 60 /* IDSEL 0x0 */
> > 61 0000 0 0 1 &mpic 40 1 0 0
> > 62 0000 0 0 2 &mpic 1 1 0 0
> > 63 0000 0 0 3 &mpic 2 1 0 0
> > 64 0000 0 0 4 &mpic 3 1 0 0
> > 65 >;
> > 66 };
> > 67 };
> >
> > Why was the interrupt-map moved here?
>
> Its been a while, but I think i moved it down because of which node is used for interrupt handling in linux.
Yeah, it would swizzle if going accross the virtual P2P bridge. On the
other hand, if it's PCIe, the children of the vP2P should always be at
device 0 and thus the swizzling should be a NOP no ? So we -could- leave
it in the PHB unless I'm mistaken...
On the other hand, we probably want to fix the mapping code to handle
things like SR-IOV PFs with different device numbers... do those get
swizzled ? In that case we might want to keep things down the virtual
bridge.
> > Do we really need the error interrupt specified twice?
>
> I put it twice because it has multiple purposes, one has to do with interrupts defined by the PCI spec vs ones defined via FSL controller.
>
> > Why is there a zeroed out reg property: reg = <0 0 0 0 0> ??
>
> scratching my head, what happens if you remove it?
If you remove it, the kernel will fail to match the vP2P with the
corresponding struct pci_dev.... It's not "zeroed out". It contains a
valid bus/dev/fn ... of 0,0,0 :-)
Cheers,
Ben.
> - k
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev
next prev parent reply other threads:[~2012-04-20 21:11 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-20 18:37 pci node question Yoder Stuart-B08248
2012-04-20 18:53 ` Kumar Gala
2012-04-20 19:04 ` Scott Wood
2012-04-20 20:37 ` Kumar Gala
2012-04-20 20:53 ` Scott Wood
2012-04-20 21:24 ` Benjamin Herrenschmidt
2012-04-20 21:20 ` Benjamin Herrenschmidt
2012-04-20 21:19 ` Benjamin Herrenschmidt
2012-04-20 19:50 ` Yoder Stuart-B08248
2012-04-20 21:11 ` Benjamin Herrenschmidt [this message]
2012-04-23 15:48 ` Yoder Stuart-B08248
2012-04-23 20:21 ` Benjamin Herrenschmidt
2012-04-23 20:32 ` Yoder Stuart-B08248
2012-04-23 20:40 ` Benjamin Herrenschmidt
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=1334956286.3197.16.camel@pasglop \
--to=benh@kernel.crashing.org \
--cc=galak@kernel.crashing.org \
--cc=linuxppc-dev@lists.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).