LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Murali Karicheri <m-karicheri2@ti.com>
To: Rob Herring <robherring2@gmail.com>
Cc: Grant Likely <grant.likely@linaro.org>,
Rob Herring <robh+dt@kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
Bjorn Helgaas <bhelgaas@google.com>,
Arnd Bergmann <arnd@arndb.de>,
Suravee Suthikulanit <Suravee.Suthikulpanit@amd.com>,
Will Deacon <will.deacon@arm.com>, Joerg Roedel <joro@8bytes.org>,
Russell King - ARM Linux <linux@arm.linux.org.uk>
Subject: Re: [PATCH] pci: of : fix BUG: unable to handle kernel
Date: Wed, 11 Mar 2015 11:25:54 -0400 [thread overview]
Message-ID: <55005E82.4050607@ti.com> (raw)
In-Reply-To: <CAL_JsqJPvW5q4XwwenFTHrDG4cU5uTd7n-vLKj0mdV9FbVC4Ag@mail.gmail.com>
On 03/11/2015 08:35 AM, Rob Herring wrote:
> On Tue, Mar 10, 2015 at 10:25 AM, Murali Karicheri<m-karicheri2@ti.com> wrote:
>> On some platforms such as that based on x86, ia64 etc, root bus is
>> created with parent node passed in as NULL to pci_create_root_bus().
>> On these platforms, the patch series "PCI: get DMA configuration from
>> parent device" when applied causes kernel crash. So add a check for this
>> in of_pci_dma_configure()
>
> Wouldn't these arches have OF disabled and call an empty function?
The current patch series does have a empty function if OF is disabled.
> Regardless, we still need this.
These archs have OF enabled, but they call pci_create_root_bus() with
NULL parent node passed in. That is why the crash happens.
Murali
>
>> Signed-off-by: Murali Karicheri<m-karicheri2@ti.com>
>
> I'm assuming Bjorn will apply this.
>
> Acked-by: Rob Herring<robh@kernel.org>
>
>> ---
>> drivers/of/of_pci.c | 4 ++++
>> 1 file changed, 4 insertions(+)
>>
>> diff --git a/drivers/of/of_pci.c b/drivers/of/of_pci.c
>> index 86d3c38..a8e485c 100644
>> --- a/drivers/of/of_pci.c
>> +++ b/drivers/of/of_pci.c
>> @@ -129,6 +129,10 @@ void of_pci_dma_configure(struct pci_dev *pci_dev)
>> struct device *dev =&pci_dev->dev;
>> struct device *bridge = pci_get_host_bridge_device(pci_dev);
>>
>> + /* Some platforms can have bridge->parent set to NULL */
>> + if (!bridge->parent)
>> + return;
>> +
>> of_dma_configure(dev, bridge->parent->of_node);
>> pci_put_host_bridge_device(bridge);
>> }
>> --
>> 1.7.9.5
>>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Murali Karicheri
Linux Kernel, Texas Instruments
prev parent reply other threads:[~2015-03-11 15:26 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-10 15:25 Murali Karicheri
2015-03-11 12:35 ` Rob Herring
2015-03-11 12:49 ` Russell King - ARM Linux
2015-03-11 15:28 ` Murali Karicheri
2015-03-11 15:59 ` Rob Herring
2015-03-11 16:37 ` Murali Karicheri
2015-03-11 20:27 ` Murali Karicheri
2015-03-11 15:25 ` Murali Karicheri [this message]
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=55005E82.4050607@ti.com \
--to=m-karicheri2@ti.com \
--cc=Suravee.Suthikulpanit@amd.com \
--cc=arnd@arndb.de \
--cc=bhelgaas@google.com \
--cc=devicetree@vger.kernel.org \
--cc=grant.likely@linaro.org \
--cc=joro@8bytes.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=robh+dt@kernel.org \
--cc=robherring2@gmail.com \
--cc=will.deacon@arm.com \
--subject='Re: [PATCH] pci: of : fix BUG: unable to handle kernel' \
/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
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).