linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Michael Neuling <mikey@neuling.org>
To: Jia Hongtao <B38951@freescale.com>
Cc: B07421@freescale.com, linux-next@vger.kernel.org,
	linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH V10] powerpc/fsl-pci: Unify pci/pcie initialization code
Date: Tue, 18 Sep 2012 19:56:14 +1000	[thread overview]
Message-ID: <14502.1347962174@neuling.org> (raw)
In-Reply-To: <1346139848-28021-1-git-send-email-B38951@freescale.com>

> +static int __devinit fsl_pci_probe(struct platform_device *pdev)
> +{
> +	int ret;
> +	struct device_node *node;
> +	struct pci_controller *hose;
> +
> +	node = pdev->dev.of_node;
> +	ret = fsl_add_bridge(node, fsl_pci_primary == node);
>  
>  #ifdef CONFIG_SWIOTLB
> -	/*
> -	 * if we couldn't map all of DRAM via the dma windows
> -	 * we need SWIOTLB to handle buffers located outside of
> -	 * dma capable memory region
> -	 */
> -	if (memblock_end_of_DRAM() - 1 > max)
> -		ppc_swiotlb_enable = 1;
> +	if (ret == 0) {
> +		hose = pci_find_hose_for_OF_device(pdev->dev.of_node);
> +
> +		/*
> +		 * if we couldn't map all of DRAM via the dma windows
> +		 * we need SWIOTLB to handle buffers located outside of
> +		 * dma capable memory region
> +		 */
> +		if (memblock_end_of_DRAM() - 1 > hose->dma_window_base_cur +
> +				hose->dma_window_size)
> +			ppc_swiotlb_enable = 1;
> +	}
>  #endif
> +
> +	mpc85xx_pci_err_probe(pdev);
> +
> +	return 0;
> +}

This breaks when CONFIG_SWIOTLB is disabled (chroma_defconfig hit this
next-20120918), but think this could also hit in Linus tree:

  arch/powerpc/sysdev/fsl_pci.c: In function 'fsl_pci_probe':
  arch/powerpc/sysdev/fsl_pci.c:867:25: error: unused variable 'hose' [-Werror=unused-variable]
  cc1: all warnings being treated as errors

Mikey

  parent reply	other threads:[~2012-09-18  9:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-28  7:44 [PATCH V10] powerpc/fsl-pci: Unify pci/pcie initialization code Jia Hongtao
2012-08-30 16:53 ` Kumar Gala
2012-08-31  2:25   ` Jia Hongtao-B38951
2012-09-11  4:49     ` Jia Hongtao-B38951
2012-09-12 20:20 ` Kumar Gala
2012-09-17  2:12   ` Jia Hongtao-B38951
2012-09-18  9:56 ` Michael Neuling [this message]
2012-09-18 10:34   ` Jia Hongtao-B38951

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=14502.1347962174@neuling.org \
    --to=mikey@neuling.org \
    --cc=B07421@freescale.com \
    --cc=B38951@freescale.com \
    --cc=linux-next@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    /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 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).