linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Jingoo Han" <jingoohan1@gmail.com>
To: "'Bjorn Helgaas'" <bhelgaas@google.com>,
	"'Lorenzo Pieralisi'" <lorenzo.pieralisi@arm.com>
Cc: "'Thomas Petazzoni'" <thomas.petazzoni@free-electrons.com>,
	"'Jayachandran C'" <jchandra@broadcom.com>,
	"'Pratyush Anand'" <pratyush.anand@gmail.com>,
	"'Russell King'" <linux@arm.linux.org.uk>,
	"'Arnd Bergmann'" <arnd@arndb.de>,
	"'Gabriele Paoloni'" <gabriele.paoloni@huawei.com>,
	"'Marc Zyngier'" <marc.zyngier@arm.com>,
	<linux-pci@vger.kernel.org>, "'Duc Dang'" <dhdang@apm.com>,
	"'Michal Simek'" <michal.simek@xilinx.com>,
	"'Simon Horman'" <horms@verge.net.au>,
	"'James Morse'" <james.morse@arm.com>,
	"'Tanmay Inamdar'" <tinamdar@apm.com>,
	"'Thierry Reding'" <thierry.reding@gmail.com>,
	<linux-arm-kernel@lists.infradead.org>,
	"'Jason Cooper'" <jason@lakedaemon.net>,
	"'Jingoo Han'" <jingoohan1@gmail.com>
Subject: Re: [PATCH v5 3/9] ARM/PCI, designware, xilinx: Use pci_scan_root_bus_msi()
Date: Thu, 6 Aug 2015 23:49:16 +0900	[thread overview]
Message-ID: <000501d0d057$177e4df0$467ae9d0$@com> (raw)
In-Reply-To: <20150804215411.9189.53901.stgit@bhelgaas-glaptop2.roam.corp.google.com>

On Wednesday, August 05, 2015 6:54 AM, Bjorn Helgaas wrote:
> 
> From: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
> 
> ARM previously stored the msi_controller pointer in its sysdata, struct
> pci_sys_data, and implemented pcibios_msi_controller() to retrieve it.
> That made PCI host controller drivers specific to ARM because they had to
> put the msi_controller pointer in the ARM-specific pci_sys_data.
> 
> There is now a generic mechanism, pci_scan_root_bus_msi(), for giving the
> msi_controller pointer to the PCI core.  Use this for all ARM systems and
> for the DesignWare and Xilinx PCI host controller drivers.
> 
> This removes an ARM dependency from the DesignWare, DRA7xx, EXYNOS, i.MX6,
> Keystone, Layerscape, SPEAr13xx, and Xilinx drivers.
> 
> [bhelgaas: changelog, split into separate patch]
> Suggested-by: Russell King <linux@arm.linux.org.uk>
> Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
> CC: Pratyush Anand <pratyush.anand@gmail.com>
> CC: Arnd Bergmann <arnd@arndb.de>
> CC: Jingoo Han <jingoohan1@gmail.com>

Acked-by: Jingoo Han <jingoohan1@gmail.com>

Best regards,
Jingoo Han

> CC: Simon Horman <horms@verge.net.au>
> CC: Russell King <linux@arm.linux.org.uk>
> CC: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> CC: Thierry Reding <thierry.reding@gmail.com>
> CC: Michal Simek <michal.simek@xilinx.com>
> CC: Marc Zyngier <marc.zyngier@arm.com>
> ---
>  arch/arm/include/asm/mach/pci.h    |    2 --
>  arch/arm/kernel/bios32.c           |    5 +++--
>  drivers/pci/host/pcie-designware.c |    6 +++---
>  drivers/pci/host/pcie-xilinx.c     |    5 ++---
>  4 files changed, 8 insertions(+), 10 deletions(-)
> 
> diff --git a/arch/arm/include/asm/mach/pci.h b/arch/arm/include/asm/mach/pci.h
> index 28b9bb3..c074e7a 100644
> --- a/arch/arm/include/asm/mach/pci.h
> +++ b/arch/arm/include/asm/mach/pci.h
> @@ -19,9 +19,7 @@ struct pci_bus;
>  struct device;
> 
>  struct hw_pci {
> -#ifdef CONFIG_PCI_MSI
>  	struct msi_controller *msi_ctrl;
> -#endif
>  	struct pci_ops	*ops;
>  	int		nr_controllers;
>  	void		**private_data;
> diff --git a/arch/arm/kernel/bios32.c b/arch/arm/kernel/bios32.c
> index 4e95260..283bc1c 100644
> --- a/arch/arm/kernel/bios32.c
> +++ b/arch/arm/kernel/bios32.c
> @@ -486,8 +486,9 @@ static void pcibios_init_hw(struct device *parent, struct hw_pci *hw,
>  			if (hw->scan)
>  				sys->bus = hw->scan(nr, sys);
>  			else
> -				sys->bus = pci_scan_root_bus(parent, sys->busnr,
> -						hw->ops, sys, &sys->resources);
> +				sys->bus = pci_scan_root_bus_msi(parent,
> +					sys->busnr, hw->ops, sys,
> +					&sys->resources, hw->msi_ctrl);
> 
>  			if (WARN(!sys->bus, "PCI: unable to scan bus!")) {
>  				kfree(sys);
> diff --git a/drivers/pci/host/pcie-designware.c b/drivers/pci/host/pcie-designware.c
> index 69486be..bd0aeec 100644
> --- a/drivers/pci/host/pcie-designware.c
> +++ b/drivers/pci/host/pcie-designware.c
> @@ -526,7 +526,6 @@ int dw_pcie_host_init(struct pcie_port *pp)
> 
>  #ifdef CONFIG_PCI_MSI
>  	dw_pcie_msi_chip.dev = pp->dev;
> -	dw_pci.msi_ctrl = &dw_pcie_msi_chip;
>  #endif
> 
>  	dw_pci.nr_controllers = 1;
> @@ -708,8 +707,9 @@ static struct pci_bus *dw_pcie_scan_bus(int nr, struct pci_sys_data *sys)
>  	struct pcie_port *pp = sys_to_pcie(sys);
> 
>  	pp->root_bus_nr = sys->busnr;
> -	bus = pci_scan_root_bus(pp->dev, sys->busnr,
> -				  &dw_pcie_ops, sys, &sys->resources);
> +	bus = pci_scan_root_bus_msi(pp->dev, sys->busnr, &dw_pcie_ops, sys,
> +				    &sys->resources, &dw_pcie_msi_chip);
> +
>  	if (!bus)
>  		return NULL;
> 
> diff --git a/drivers/pci/host/pcie-xilinx.c b/drivers/pci/host/pcie-xilinx.c
> index f1a06a0..526807d 100644
> --- a/drivers/pci/host/pcie-xilinx.c
> +++ b/drivers/pci/host/pcie-xilinx.c
> @@ -647,8 +647,8 @@ static struct pci_bus *xilinx_pcie_scan_bus(int nr, struct pci_sys_data *sys)
>  	struct pci_bus *bus;
> 
>  	port->root_busno = sys->busnr;
> -	bus = pci_scan_root_bus(port->dev, sys->busnr, &xilinx_pcie_ops,
> -				sys, &sys->resources);
> +	bus = pci_scan_root_bus_msi(port->dev, sys->busnr, &xilinx_pcie_ops,
> +				sys, &sys->resources, &xilinx_pcie_msi_chip);
> 
>  	return bus;
>  }
> @@ -847,7 +847,6 @@ static int xilinx_pcie_probe(struct platform_device *pdev)
> 
>  #ifdef CONFIG_PCI_MSI
>  	xilinx_pcie_msi_chip.dev = port->dev;
> -	hw.msi_ctrl = &xilinx_pcie_msi_chip;
>  #endif
>  	pci_common_init_dev(dev, &hw);
> 


  reply	other threads:[~2015-08-06 14:49 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-04 21:53 [PATCH v5 0/9] ARM: PCI: kill pcibios_msi_controller() Bjorn Helgaas
2015-08-04 21:53 ` [PATCH v5 1/9] ARM/PCI: Replace panic with WARN messages on failures Bjorn Helgaas
2015-08-06 14:46   ` Jingoo Han
2015-08-04 21:54 ` [PATCH v5 2/9] PCI: Add pci_scan_root_bus_msi() Bjorn Helgaas
2015-08-06 14:47   ` Jingoo Han
2015-08-04 21:54 ` [PATCH v5 3/9] ARM/PCI, designware, xilinx: Use pci_scan_root_bus_msi() Bjorn Helgaas
2015-08-06 14:49   ` Jingoo Han [this message]
2015-08-04 21:54 ` [PATCH v5 4/9] ARM/PCI: Remove msi_controller from struct pci_sys_data Bjorn Helgaas
2015-08-06 14:51   ` Jingoo Han
2015-08-04 21:54 ` [PATCH v5 5/9] PCI/MSI: Remove unused pcibios_msi_controller() hook Bjorn Helgaas
2015-08-04 21:54 ` [PATCH v5 6/9] PCI: Drop references acquired by of_parse_phandle() Bjorn Helgaas
2015-08-10 21:39   ` Bjorn Helgaas
2015-08-10 22:19     ` Rob Herring
2015-08-12 11:24   ` Lorenzo Pieralisi
2015-08-04 21:54 ` [PATCH v5 7/9] PCI: xgene: Set msi_controller->dev to platform_device, not pci_bus Bjorn Helgaas
2015-08-04 22:58   ` Bjorn Helgaas
2015-08-04 21:54 ` [PATCH v5 8/9] PCI: xgene: Look for OF "msi-parent" in host controller, not root bus Bjorn Helgaas
2015-08-04 21:54 ` [PATCH v5 9/9] PCI: xgene: Use pci_scan_root_bus_msi() Bjorn Helgaas
2015-08-06 15:26   ` Marc Zyngier
2015-08-06 16:41     ` Ley Foon Tan
2015-08-06 16:53       ` Marc Zyngier
2015-08-07  2:18         ` Ley Foon Tan
2015-08-10 22:04     ` Bjorn Helgaas
2015-08-10 22:28       ` Duc Dang
2015-08-04 23:00 ` [PATCH v5 0/9] ARM: PCI: kill pcibios_msi_controller() Bjorn Helgaas

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='000501d0d057$177e4df0$467ae9d0$@com' \
    --to=jingoohan1@gmail.com \
    --cc=arnd@arndb.de \
    --cc=bhelgaas@google.com \
    --cc=dhdang@apm.com \
    --cc=gabriele.paoloni@huawei.com \
    --cc=horms@verge.net.au \
    --cc=james.morse@arm.com \
    --cc=jason@lakedaemon.net \
    --cc=jchandra@broadcom.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=marc.zyngier@arm.com \
    --cc=michal.simek@xilinx.com \
    --cc=pratyush.anand@gmail.com \
    --cc=thierry.reding@gmail.com \
    --cc=thomas.petazzoni@free-electrons.com \
    --cc=tinamdar@apm.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 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).