All of lore.kernel.org
 help / color / mirror / Atom feed
From: Murali Karicheri <m-karicheri2@ti.com>
To: Murali Karicheri <m-karicheri2@ti.com>, <bhelgaas@google.com>
Cc: <grant.likely@linaro.org>, <robh+dt@kernel.org>,
	<devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<linux-pci@vger.kernel.org>, <arnd@arndb.de>,
	<Suravee.Suthikulpanit@amd.com>, <will.deacon@arm.com>,
	<joro@8bytes.org>, <linux@arm.linux.org.uk>
Subject: Re: [PATCH v1] of/pci : fix of_pci_dma_configure parent ptr NULL
Date: Thu, 12 Mar 2015 11:03:45 -0400	[thread overview]
Message-ID: <5501AAD1.9050107@ti.com> (raw)
In-Reply-To: <1426092003-16925-1-git-send-email-m-karicheri2@ti.com>

On 03/11/2015 12:40 PM, 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()
>
> Signed-off-by: Murali Karicheri<m-karicheri2@ti.com>
> 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);
>   }

BJorn,

Just wondering if you can apply this to pci/iommu to help provide enough 
baking time for this series to make into next kernel merge window.

As always, thanks for all your help.

Regards,
-- 
Murali Karicheri
Linux Kernel, Texas Instruments

WARNING: multiple messages have this Message-ID (diff)
From: Murali Karicheri <m-karicheri2@ti.com>
To: Murali Karicheri <m-karicheri2@ti.com>, bhelgaas@google.com
Cc: grant.likely@linaro.org, robh+dt@kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-pci@vger.kernel.org, arnd@arndb.de,
	Suravee.Suthikulpanit@amd.com, will.deacon@arm.com,
	joro@8bytes.org, linux@arm.linux.org.uk
Subject: Re: [PATCH v1] of/pci : fix of_pci_dma_configure parent ptr NULL
Date: Thu, 12 Mar 2015 11:03:45 -0400	[thread overview]
Message-ID: <5501AAD1.9050107@ti.com> (raw)
In-Reply-To: <1426092003-16925-1-git-send-email-m-karicheri2@ti.com>

On 03/11/2015 12:40 PM, 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()
>
> Signed-off-by: Murali Karicheri<m-karicheri2@ti.com>
> 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);
>   }

BJorn,

Just wondering if you can apply this to pci/iommu to help provide enough 
baking time for this series to make into next kernel merge window.

As always, thanks for all your help.

Regards,
-- 
Murali Karicheri
Linux Kernel, Texas Instruments

  reply	other threads:[~2015-03-12 15:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-11 16:40 [PATCH v1] of/pci : fix of_pci_dma_configure parent ptr NULL Murali Karicheri
2015-03-11 16:40 ` Murali Karicheri
2015-03-12 15:03 ` Murali Karicheri [this message]
2015-03-12 15:03   ` Murali Karicheri
2015-03-19 15:01 ` Bjorn Helgaas
2015-03-20 20:16   ` Murali Karicheri
2015-03-20 20:16     ` Murali Karicheri

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=5501AAD1.9050107@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=will.deacon@arm.com \
    /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.