From: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
To: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Alan Ott <alan@softiron.co.uk>,
Bjorn Helgaas <helgaas@kernel.org>,
Graeme Gregory <graeme.gregory@linaro.org>,
Al Stone <al.stone@linaro.org>,
Bjorn Helgaas <bhelgaas@google.com>,
Mark Rutland <mark.rutland@arm.com>,
Marc Zyngier <marc.zyngier@arm.com>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
Leif Lindholm <leif.lindholm@linaro.org>,
"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
Len Brown <lenb@kernel.org>
Subject: Re: [PATCH] acpi: pci: don't ignore function ID of bridge device in _PRT
Date: Sat, 8 Apr 2017 14:22:32 +0100 [thread overview]
Message-ID: <20170408132232.GA13027@red-moon> (raw)
In-Reply-To: <CAKv+Gu9EoUo+_BDSBj_v6eS7yYdjktcbQQA_eiLoqY47y1oK6w@mail.gmail.com>
On Sat, Apr 08, 2017 at 12:22:15PM +0100, Ard Biesheuvel wrote:
> On 7 April 2017 at 19:35, Ard Biesheuvel <ard.biesheuvel@linaro.org> wrote:
> > On 7 April 2017 at 19:06, Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> wrote:
> >> On Fri, Apr 07, 2017 at 06:12:05PM +0100, Ard Biesheuvel wrote:
> >>> On 7 April 2017 at 18:06, Bjorn Helgaas <helgaas@kernel.org> wrote:
> [...]
> >
> > OK, I have changed my DSDT as follows:
> >
> >
> > Device (PCI0)
> > {
> > Name (_ADR, 0x00)
> > Name (_HID, "PNP0A08" /* PCI Express Bus */) // _HID: Hardware ID
> > Name (_CID, "PNP0A03" /* PCI Bus */) // _CID: Compatible ID
> > Name (_SEG, 0x00) // _SEG: PCI Segment
> > Name (_BBN, 0x00) // _BBN: BIOS Bus Number
> > Name (_CCA, 0x01) // _CCA: Cache Coherency Attribute
> >
> > Device (EXP1)
> > {
> > Name (_ADR, 0x20001) // _ADR: Address
> > Name (_PRT, Package () // _PRT: PCI Routing Table
> > {
> > // slot 1: dev 2 fn 1
> > Package () { 0xFFFF, 0x0, 0x0, 0x140 },
> > Package () { 0xFFFF, 0x1, 0x0, 0x141 },
> > Package () { 0xFFFF, 0x2, 0x0, 0x142 },
> > Package () { 0xFFFF, 0x3, 0x0, 0x143 }
> > }) // _PRT
> > }
> > Device (EXP2)
> > {
> > Name (_ADR, 0x20002) // _ADR: Address
> > Name (_PRT, Package () // _PRT: PCI Routing Table
> > {
> > // slot 2: dev 2 fn 2
> > Package () { 0xFFFF, 0x0, 0x0, 0x144 },
> > Package () { 0xFFFF, 0x1, 0x0, 0x145 },
> > Package () { 0xFFFF, 0x2, 0x0, 0x146 },
> > Package () { 0xFFFF, 0x3, 0x0, 0x147 }
> > }) // _PRT
> > }
> > Device (EXP3)
> > {
> > Name (_ADR, 0x20003) // _ADR: Address
> > Name (_PRT, Package () // _PRT: PCI Routing Table
> > {
> > // slot 3: dev 2 fn 3
> > Package () { 0xFFFF, 0x0, 0x0, 0x148 },
> > Package () { 0xFFFF, 0x1, 0x0, 0x149 },
> > Package () { 0xFFFF, 0x2, 0x0, 0x14a },
> > Package () { 0xFFFF, 0x3, 0x0, 0x14b }
> > }) // _PRT
> > }
> >
> > but it does not get picked up, and I am back to
> >
> > [ 3.357555] pcieport 0000:00:02.2: can't derive routing for PCI INT A
> > [ 3.370477] pcieport 0000:00:02.2: PCI INT A: no GSI
> > [ 3.380549] pcieport 0000:00:02.3: can't derive routing for PCI INT A
> > [ 3.393476] pcieport 0000:00:02.3: PCI INT A: no GSI
> >
>
> OK, this does appear to work in fact, for the devices behind the
> bridges. These messages are from the pcieport driver trying to request
> an IRQ for the bridge device itself, which no longer works now that
> the _PRT methods have been moved out.
>
> So that mostly solves the problem. I'll try adding back a _PRT in the
> PCI root device itself, but i'm not sure if I can make any inferences
> about the IRQ wiring from the data i have.
Yes and IIUC with the $SUBJECT patch applied, the endpoints would match
the _PRT entry under PNP0A08 through their bridge (PCIe port device = 2
fn = X) device entry, not their own (device = 0) (ie first look-up in
acpi_pci_irq_lookup() through acpi_pci_irq_find_prt_entry() should fail
for the endpoints, then the same look-up is carried out with the bridge
device instead and that succeeds, the _PRT entry routes IRQs for the
PCIeport AND their downstream endpoint with $SUBJECT patch applied).
If you add the _PRT under the PCIe port itself (table above) the PCIe
port can't find an ACPI parent device to route its own IRQx, that's my
reading of what's going on, I will debug it next week.
Lorenzo
WARNING: multiple messages have this Message-ID (diff)
From: lorenzo.pieralisi@arm.com (Lorenzo Pieralisi)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] acpi: pci: don't ignore function ID of bridge device in _PRT
Date: Sat, 8 Apr 2017 14:22:32 +0100 [thread overview]
Message-ID: <20170408132232.GA13027@red-moon> (raw)
In-Reply-To: <CAKv+Gu9EoUo+_BDSBj_v6eS7yYdjktcbQQA_eiLoqY47y1oK6w@mail.gmail.com>
On Sat, Apr 08, 2017 at 12:22:15PM +0100, Ard Biesheuvel wrote:
> On 7 April 2017 at 19:35, Ard Biesheuvel <ard.biesheuvel@linaro.org> wrote:
> > On 7 April 2017 at 19:06, Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> wrote:
> >> On Fri, Apr 07, 2017 at 06:12:05PM +0100, Ard Biesheuvel wrote:
> >>> On 7 April 2017 at 18:06, Bjorn Helgaas <helgaas@kernel.org> wrote:
> [...]
> >
> > OK, I have changed my DSDT as follows:
> >
> >
> > Device (PCI0)
> > {
> > Name (_ADR, 0x00)
> > Name (_HID, "PNP0A08" /* PCI Express Bus */) // _HID: Hardware ID
> > Name (_CID, "PNP0A03" /* PCI Bus */) // _CID: Compatible ID
> > Name (_SEG, 0x00) // _SEG: PCI Segment
> > Name (_BBN, 0x00) // _BBN: BIOS Bus Number
> > Name (_CCA, 0x01) // _CCA: Cache Coherency Attribute
> >
> > Device (EXP1)
> > {
> > Name (_ADR, 0x20001) // _ADR: Address
> > Name (_PRT, Package () // _PRT: PCI Routing Table
> > {
> > // slot 1: dev 2 fn 1
> > Package () { 0xFFFF, 0x0, 0x0, 0x140 },
> > Package () { 0xFFFF, 0x1, 0x0, 0x141 },
> > Package () { 0xFFFF, 0x2, 0x0, 0x142 },
> > Package () { 0xFFFF, 0x3, 0x0, 0x143 }
> > }) // _PRT
> > }
> > Device (EXP2)
> > {
> > Name (_ADR, 0x20002) // _ADR: Address
> > Name (_PRT, Package () // _PRT: PCI Routing Table
> > {
> > // slot 2: dev 2 fn 2
> > Package () { 0xFFFF, 0x0, 0x0, 0x144 },
> > Package () { 0xFFFF, 0x1, 0x0, 0x145 },
> > Package () { 0xFFFF, 0x2, 0x0, 0x146 },
> > Package () { 0xFFFF, 0x3, 0x0, 0x147 }
> > }) // _PRT
> > }
> > Device (EXP3)
> > {
> > Name (_ADR, 0x20003) // _ADR: Address
> > Name (_PRT, Package () // _PRT: PCI Routing Table
> > {
> > // slot 3: dev 2 fn 3
> > Package () { 0xFFFF, 0x0, 0x0, 0x148 },
> > Package () { 0xFFFF, 0x1, 0x0, 0x149 },
> > Package () { 0xFFFF, 0x2, 0x0, 0x14a },
> > Package () { 0xFFFF, 0x3, 0x0, 0x14b }
> > }) // _PRT
> > }
> >
> > but it does not get picked up, and I am back to
> >
> > [ 3.357555] pcieport 0000:00:02.2: can't derive routing for PCI INT A
> > [ 3.370477] pcieport 0000:00:02.2: PCI INT A: no GSI
> > [ 3.380549] pcieport 0000:00:02.3: can't derive routing for PCI INT A
> > [ 3.393476] pcieport 0000:00:02.3: PCI INT A: no GSI
> >
>
> OK, this does appear to work in fact, for the devices behind the
> bridges. These messages are from the pcieport driver trying to request
> an IRQ for the bridge device itself, which no longer works now that
> the _PRT methods have been moved out.
>
> So that mostly solves the problem. I'll try adding back a _PRT in the
> PCI root device itself, but i'm not sure if I can make any inferences
> about the IRQ wiring from the data i have.
Yes and IIUC with the $SUBJECT patch applied, the endpoints would match
the _PRT entry under PNP0A08 through their bridge (PCIe port device = 2
fn = X) device entry, not their own (device = 0) (ie first look-up in
acpi_pci_irq_lookup() through acpi_pci_irq_find_prt_entry() should fail
for the endpoints, then the same look-up is carried out with the bridge
device instead and that succeeds, the _PRT entry routes IRQs for the
PCIeport AND their downstream endpoint with $SUBJECT patch applied).
If you add the _PRT under the PCIe port itself (table above) the PCIe
port can't find an ACPI parent device to route its own IRQx, that's my
reading of what's going on, I will debug it next week.
Lorenzo
next prev parent reply other threads:[~2017-04-08 13:22 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-07 13:22 [PATCH] acpi: pci: don't ignore function ID of bridge device in _PRT Ard Biesheuvel
2017-04-07 13:22 ` Ard Biesheuvel
2017-04-07 17:06 ` Bjorn Helgaas
2017-04-07 17:06 ` Bjorn Helgaas
2017-04-07 17:12 ` Ard Biesheuvel
2017-04-07 17:12 ` Ard Biesheuvel
2017-04-07 17:49 ` Bjorn Helgaas
2017-04-07 17:49 ` Bjorn Helgaas
2017-04-07 18:06 ` Lorenzo Pieralisi
2017-04-07 18:06 ` Lorenzo Pieralisi
2017-04-07 18:35 ` Ard Biesheuvel
2017-04-07 18:35 ` Ard Biesheuvel
2017-04-07 21:36 ` Lorenzo Pieralisi
2017-04-07 21:36 ` Lorenzo Pieralisi
2017-04-08 7:04 ` Ard Biesheuvel
2017-04-08 7:04 ` Ard Biesheuvel
2017-04-08 11:22 ` Ard Biesheuvel
2017-04-08 11:22 ` Ard Biesheuvel
2017-04-08 13:22 ` Lorenzo Pieralisi [this message]
2017-04-08 13:22 ` Lorenzo Pieralisi
2017-04-08 14:02 ` Ard Biesheuvel
2017-04-08 14:02 ` Ard Biesheuvel
2017-04-07 17:07 ` Ard Biesheuvel
2017-04-07 17:07 ` Ard Biesheuvel
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=20170408132232.GA13027@red-moon \
--to=lorenzo.pieralisi@arm.com \
--cc=al.stone@linaro.org \
--cc=alan@softiron.co.uk \
--cc=ard.biesheuvel@linaro.org \
--cc=bhelgaas@google.com \
--cc=graeme.gregory@linaro.org \
--cc=helgaas@kernel.org \
--cc=leif.lindholm@linaro.org \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=marc.zyngier@arm.com \
--cc=mark.rutland@arm.com \
--cc=rjw@rjwysocki.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.