From: tn@semihalf•com (Tomasz Nowicki)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH V1 11/11] arm64, pci, acpi: Support for ACPI based PCI hostbridge init
Date: Thu, 29 Oct 2015 16:53:26 +0100 [thread overview]
Message-ID: <563240F6.2060209@semihalf.com> (raw)
In-Reply-To: <563234E6.4050109@codeaurora.org>
On 29.10.2015 16:01, Sinan Kaya wrote:
>
>
> On 10/29/2015 7:38 AM, Tomasz Nowicki wrote:
>> On 28.10.2015 21:36, Sinan Kaya wrote:
>>> 1. ACPI code is unable to discover the interrupt numbers when objects
>>> are ordered as follows in the ACPI file
>>>
>>> PNP0A08 object
>>> PNP0C0F INTA object
>>> PNP0C0F INTB object
>>> PNP0C0F INTC object
>>> PNP0C0F INTD object
>>>
>>> This gives me invalid link context error.
>>>
>>> pci 0000:00:00.0: PCI INT A: no GSI
>>> pci 0000:01:00.0: Derived GSI for 0000:01:00.0 INT A from 0000:00:00.0
>>> acpi PNP0C0F:00: Invalid link context
>>>
>>> If I order it like this in the ACPI file,
>>>
>>> PNP0C0F INTA object
>>> PNP0C0F INTB object
>>> PNP0C0F INTC object
>>> PNP0C0F INTD object
>>> PNP0A08 object
>>>
>>> then, the legacy interrupt numbers can be discovered properly.
>>
>> Can you show full content of your PNP0C0F and PNP0A08 objects?
>>
>
> ACPI table is considered proprietary. I don't think I can get the legal
> approval in time. I can give you pieces though.
>
> Here is the _PRT
> Device (PCI0) { // PCIe port 0
> Name(_HID, EISAID("PNP0A08")) // PCI express
> Name(_CID, EISAID("PNP0A03")) // Compatible PCI Root Bridge
> {
> ....
> Name(_PRT, Package(){
> Package(){0x0FFFF, 0, \_SB.LN0A, 0}, // Slot 0, INTA
> Package(){0x0FFFF, 1, \_SB.LN0B, 0}, // Slot 0, INTB
> Package(){0x0FFFF, 2, \_SB.LN0C, 0}, // Slot 0, INTC
> Package(){0x0FFFF, 3, \_SB.LN0D, 0} // Slot 0, INTD
> })
> }
>
> Here is the PNP0C0F
>
> Device(LN0A){
> Name(_HID, EISAID("PNP0C0F")) // PCI interrupt link
> Name(_UID, 1)
> Name(_PRS, ResourceTemplate(){
> Interrupt(ResourceProducer, Level, ActiveHigh, Exclusive, , ,) {0xE8}
> })
> Method(_DIS) {}
> Method(_CRS) { Return (_PRS) }
> Method(_SRS, 1) {}
> }
>
Can you please apply patch below:
diff --git a/arch/arm64/kernel/pci.c b/arch/arm64/kernel/pci.c
index fec1c91..fe34415 100644
--- a/arch/arm64/kernel/pci.c
+++ b/arch/arm64/kernel/pci.c
@@ -48,10 +48,19 @@ resource_size_t pcibios_align_resource(void *data,
const struct resource *res,
*/
int pcibios_enable_device(struct pci_dev *dev, int mask)
{
+ int ret;
+
if (pci_has_flag(PCI_PROBE_ONLY))
return 0;
- return pci_enable_resources(dev, mask);
+ ret = pci_enable_resources(dev, mask);
+ if (ret < 0)
+ return ret;
+#ifdef CONFIG_ACPI
+ if (!dev->msi_enabled)
+ return acpi_pci_irq_enable(dev);
+#endif
+ return 0;
}
/*
@@ -61,10 +70,6 @@ int pcibios_add_device(struct pci_dev *dev)
{
if (acpi_disabled)
dev->irq = of_irq_parse_and_map_pci(dev, 0, 0);
-#ifdef CONFIG_ACPI
- else
- acpi_pci_irq_enable(dev);
-#endif
return 0;
}
and let me know if the order still matter?
Regards,
Tomasz
next prev parent reply other threads:[~2015-10-29 15:53 UTC|newest]
Thread overview: 59+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-27 16:38 [PATCH V1 00/11] MMCONFIG refactoring and ARM64 PCI hostbridge init based on ACPI Tomasz Nowicki
2015-10-27 16:38 ` [PATCH V1 01/11] x86, pci: Reorder logic of pci_mmconfig_insert() function Tomasz Nowicki
2015-10-27 16:38 ` [PATCH V1 02/11] x86, pci, acpi: Move arch-agnostic MMCONFIG (aka ECAM) and ACPI code out of arch/x86/ directory Tomasz Nowicki
2015-10-27 16:38 ` [PATCH V1 03/11] pci, acpi, mcfg: Provide generic implementation of MCFG code initialization Tomasz Nowicki
2015-10-27 16:38 ` [PATCH V1 04/11] x86, pci: mmconfig_{32, 64}.c code refactoring - remove code duplication Tomasz Nowicki
2015-10-27 16:38 ` [PATCH V1 05/11] x86, pci, ecam: mmconfig_64.c becomes default implementation for ECAM driver Tomasz Nowicki
2015-10-27 16:38 ` [PATCH V1 06/11] pci, acpi, mcfg: Provide default RAW ACPI PCI config space accessors Tomasz Nowicki
2015-10-27 16:38 ` [PATCH V1 07/11] XEN / PCI: Remove the dependence on arch x86 when PCI_MMCONFIG=y Tomasz Nowicki
2015-10-27 16:47 ` [Linaro-acpi] " Tomasz Nowicki
2015-10-27 17:25 ` Boris Ostrovsky
2015-10-28 10:49 ` Stefano Stabellini
2015-10-28 10:56 ` Tomasz Nowicki
2015-10-28 13:45 ` Hanjun Guo
2015-10-28 14:07 ` Boris Ostrovsky
2015-10-27 16:38 ` [PATCH V1 08/11] pci, acpi, ecam: Add flag to indicate whether ECAM region was hot added or not Tomasz Nowicki
2015-10-27 16:38 ` [PATCH V1 09/11] x86, pci: Use previously added ECAM hot_added flag to remove ECAM regions Tomasz Nowicki
2015-10-27 16:38 ` [PATCH V1 10/11] pci, acpi: Provide generic way to assign bus domain number Tomasz Nowicki
2015-10-28 11:38 ` Liviu.Dudau at arm.com
2015-10-28 12:47 ` [Linaro-acpi] " Tomasz Nowicki
2015-11-03 16:10 ` Lorenzo Pieralisi
2015-11-04 10:04 ` [Linaro-acpi] " Tomasz Nowicki
2015-10-27 16:38 ` [PATCH V1 11/11] arm64, pci, acpi: Support for ACPI based PCI hostbridge init Tomasz Nowicki
2015-10-28 11:49 ` Liviu.Dudau at arm.com
2015-10-28 13:42 ` Tomasz Nowicki
2015-10-28 13:51 ` Liviu.Dudau at arm.com
2015-11-03 14:32 ` Lorenzo Pieralisi
2015-11-03 16:28 ` Liviu.Dudau at arm.com
2015-10-28 18:46 ` Sinan Kaya
2015-10-28 20:36 ` Sinan Kaya
2015-10-29 11:38 ` Tomasz Nowicki
2015-10-29 15:01 ` Sinan Kaya
2015-10-29 15:53 ` Tomasz Nowicki [this message]
2015-10-29 16:20 ` Sinan Kaya
2015-10-29 14:57 ` Sinan Kaya
2015-10-29 16:27 ` Tomasz Nowicki
2015-11-03 14:15 ` Lorenzo Pieralisi
2015-11-03 14:39 ` Tomasz Nowicki
2015-11-03 15:10 ` Sinan Kaya
2015-11-03 15:59 ` Arnd Bergmann
2015-11-03 16:33 ` Sinan Kaya
2015-11-03 16:55 ` Arnd Bergmann
2015-11-03 17:43 ` Sinan Kaya
2015-11-05 14:48 ` [Linaro-acpi] " Sinan Kaya
2015-11-03 15:19 ` Hanjun Guo
2015-11-03 17:39 ` David Daney
2015-11-03 18:00 ` Gabriele Paoloni
2015-11-03 16:55 ` Lorenzo Pieralisi
2015-11-04 9:59 ` Tomasz Nowicki
2015-11-04 10:11 ` Tomasz Nowicki
2015-10-30 4:07 ` [PATCH V1 00/11] MMCONFIG refactoring and ARM64 PCI hostbridge init based on ACPI Jon Masters
2015-10-30 4:50 ` Hanjun Guo
2015-10-30 8:26 ` Tomasz Nowicki
2015-10-30 16:38 ` Suravee Suthikulpanit
2015-12-07 20:31 ` Bjorn Helgaas
2015-12-09 10:01 ` Jayachandran C.
2015-12-09 15:55 ` Lorenzo Pieralisi
2015-12-16 12:51 ` Jayachandran C.
2015-12-16 14:05 ` Lorenzo Pieralisi
2015-12-08 17:43 ` Jeremy Linton
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=563240F6.2060209@semihalf.com \
--to=tn@semihalf$(echo .)com \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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