From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rob Herring Subject: Re: [PATCH] pci: of : fix BUG: unable to handle kernel Date: Wed, 11 Mar 2015 07:35:45 -0500 Message-ID: References: <1426001139-18419-1-git-send-email-m-karicheri2@ti.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: In-Reply-To: <1426001139-18419-1-git-send-email-m-karicheri2-l0cyMroinI0@public.gmane.org> Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Murali Karicheri Cc: Grant Likely , Rob Herring , "devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , "linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , "linux-pci-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , Bjorn Helgaas , Arnd Bergmann , Suravee Suthikulanit , Will Deacon , Joerg Roedel , Russell King - ARM Linux List-Id: devicetree@vger.kernel.org On Tue, Mar 10, 2015 at 10:25 AM, Murali Karicheri 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? Regardless, we still need this. > Signed-off-by: Murali Karicheri I'm assuming Bjorn will apply this. Acked-by: Rob Herring > --- > 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 devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html