On 2014/11/17 18:08, Arnd Bergmann wrote:
> On Monday 17 November 2014 18:21:35 Yijing Wang wrote:
>> - list_for_each_entry(window, resources, list)
>> - if (window->res->flags & IORESOURCE_BUS) {
>> - found = true;
&
>> +LIST_HEAD(pci_host_bridge_list);
>> +DECLARE_RWSEM(pci_host_bridge_sem);
>
> Unless the pci_host_bridge_sem is accessed thousands of times per second,
> it's normally better to use a simple mutex instead.
OK, I will use simple mutex instead.
>
>> +static struct resource busn_resource = {
>
On 2014/11/17 22:13, Arnd Bergmann wrote:
> On Monday 17 November 2014 18:21:34 Yijing Wang wrote:
>> This series is based Linux 3.18-rc1 and Lorenzo Pieralisi's
>> arm PCI domain cleanup patches, link:
>> https://patchwork.ozlabs.org/patch/407585/
>>
>
On 2014/11/18 17:30, Arnd Bergmann wrote:
> On Tuesday 18 November 2014 16:32:26 Yijing Wang wrote:
>
>>>> +static struct resource busn_resource = {
>>>> + .name = "PCI busn",
>>>> + .start = 0,
>>>> + .end= 255,
>&g
On 2014/11/18 17:36, Arnd Bergmann wrote:
> On Tuesday 18 November 2014 15:44:23 Yijing Wang wrote:
>> On 2014/11/17 18:08, Arnd Bergmann wrote:
>>> On Monday 17 November 2014 18:21:35 Yijing Wang wrote:
>>>> - list_for_each_entry(window, resources, list)
>&g
On 2014/11/18 19:45, Lorenzo Pieralisi wrote:
> On Tue, Nov 18, 2014 at 11:30:11AM +, Arnd Bergmann wrote:
>> On Tuesday 18 November 2014 19:17:32 Yijing Wang wrote:
>>> On 2014/11/17 22:13, Arnd Bergmann wrote:
>>>> On Monday 17 November 2014 18:21:34 Yijing Wa
On 2014/11/18 19:30, Arnd Bergmann wrote:
> On Tuesday 18 November 2014 19:17:32 Yijing Wang wrote:
>> On 2014/11/17 22:13, Arnd Bergmann wrote:
>>> On Monday 17 November 2014 18:21:34 Yijing Wang wrote:
>>>> This series is based Linux 3.18-rc1 and Lorenzo Pieralisi
We need, some platforms pass NULL pointer as host bridge parent.
>>>
>>> But those don't have to use the new pci_create_host_bridge() function,
>>> right?
>>
>> As I mentioned in another reply, I hope all pci host drivers could use
>> pci_create_host_bridge(), keep different PCI scan interface
On 2014/10/16 20:13, Sebastian Ott wrote:
> On Wed, 15 Oct 2014, Yijing Wang wrote:
>> Use MSI chip framework instead of arch MSI functions to configure
>> MSI/MSI-X irq. So we can manage MSI/MSI-X irq in a unified framework.
>>
>> Signed-off-by: Yijing Wang
>
On 2014/10/17 15:23, Michael Ellerman wrote:
> On Wed, 2014-10-15 at 11:07 +0800, Yijing Wang wrote:
>> Use MSI chip framework instead of arch MSI functions to configure
>> MSI/MSI-X irq. So we can manage MSI/MSI-X irq in a unified framework.
>>
>> Signed-off-by: Yijing
On 2014/10/21 1:21, Lorenzo Pieralisi wrote:
> On Wed, Oct 15, 2014 at 04:06:52AM +0100, Yijing Wang wrote:
>> Saving msi chip in pci_sys_data can make pci bus and
>> devices don't need to know msi chip detail, it also
>> make pci enumeration code be decoupled from msi
On 2015/5/21 3:47, Bjorn Helgaas wrote:
> I think we have some issues with the e1000e usage of
> pci_disable_link_state_locked(), which Yinghai added with 9f728f53dd70
> ("PCI/e1000e: Add and use pci_disable_link_state_locked()").
>
> That fixed an AER deadlock in the following path, where pci_bus
On 2015/5/21 3:47, Bjorn Helgaas wrote:
> I think we have some issues with the e1000e usage of
> pci_disable_link_state_locked(), which Yinghai added with 9f728f53dd70
> ("PCI/e1000e: Add and use pci_disable_link_state_locked()").
>
> That fixed an AER deadlock in the following path, where pci_bus
On 2015/2/26 7:09, Bjorn Helgaas wrote:
> On Wed, Jan 21, 2015 at 08:29:55AM +0800, Yijing Wang wrote:
>> v1->v2:
>> Split pci_host_bridge_list into a new patch, remove .phb_probe_mode
>> and rework powerpc .phb_of_scan_bus() for simpilicty suggested by
>>
From: Yijing Wang
Now pci_bus_add_devices() has been ripped out
from pci_scan_root_bus(), we could use pci_scan_root_bus()
instead of pci_create_root_bus() + pci_scan_child_bus()
for simplicity. We could also remove the pci bus
resource(dino_current_bus,255) and pci_bus_update_busn_res_end
Introduce pci_host_bridge_list to manage pci host
bridges in system, so we could detect whether
the host in domain:bus is alreay registered.
Then we could remove bus alreay exist test in
__pci_create_root_bus().
Signed-off-by: Yijing Wang
---
drivers/pci/host-bridge.c | 24
Now no one use pci_create_root_bus(), we could remove it
and rename __pci_create_root_bus() to pci_create_root_bus().
Signed-off-by: wangyij...@huawei.com
---
drivers/pci/probe.c | 27 ---
include/linux/pci.h |3 ---
2 files changed, 8 insertions(+), 22 deletions(-)
.
For arm hw_pci->scan() functions which call
pci_scan_root_bus(), it's no need to change anything,
because pci_bus_add_devices() will be called later
in pci_common_init_dev().
Signed-off-by: Yijing Wang
CC: Richard Henderson
CC: Ivan Kokshaysky
CC: Matt Turner
CC: David Howells
CC: T
arm/arm64 to assign domain number
in later patch.
Signed-off-by: Yijing Wang
CC: Richard Henderson
CC: Ivan Kokshaysky
CC: Matt Turner
CC: Tony Luck
CC: Fenghua Yu
CC: Michal Simek
CC: Ralf Baechle
CC: Benjamin Herrenschmidt
CC: Paul Mackerras
CC: Michael Ellerman
CC: Sebastian Ott
CC
Export find_pci_host_bridge().
Signed-off-by: Yijing Wang
---
drivers/pci/host-bridge.c |2 +-
include/linux/pci.h |1 +
2 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/pci/host-bridge.c b/drivers/pci/host-bridge.c
index 4a2baa2..51e24f8 100644
--- a/drivers
Now we save the domain number in pci_host_bridge,
we could remove pci_bus_assign_domain_nr() and
clean the domain member in pci_bus.
Signed-off-by: Yijing Wang
---
drivers/pci/pci.c |5 -
drivers/pci/probe.c | 12
include/linux/pci.h |3 ---
3 files changed, 4
Now we could use pci_scan_root_bridge() to scan
pci buses, provide powerpc specific pci_host_bridge_ops.
Suggested-by: Arnd Bergmann
Signed-off-by: Yijing Wang
CC: Benjamin Herrenschmidt
CC: linuxppc-...@lists.ozlabs.org
---
arch/powerpc/include/asm/machdep.h |2 +-
arch/powerpc
Now pci_host_bridge holds the domain number,
so we could eliminate all platform specific
pci_domain_nr().
Signed-off-by: Yijing Wang
---
arch/alpha/include/asm/pci.h |2 --
arch/ia64/include/asm/pci.h |1 -
arch/microblaze/pci/pci-common.c | 11 ---
arch/mips/include
,
we could use the generic pci_host_bridge to hold
host bridge specific operations like
pcibios_root_bridge_prepare(). The changes are
transparent to platform host bridge drivers.
Signed-off-by: Yijing Wang
---
drivers/pci/host-bridge.c | 56 ++
drivers/pci/probe.c
Use pci_scan_root_bus() instead of pci_create_root_bus() +
pci_scan_child_bus() for simplicity.
Signed-off-by: Yijing Wang
CC: Tanmay Inamdar
---
drivers/pci/host/pci-xgene.c |3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/drivers/pci/host/pci-xgene.c b/drivers/pci
Use pci_scan_root_bus() instead of pci_create_root_bus() +
pci_scan_child_bus() for simplicity.
Signed-off-by: Yijing Wang
CC: Mohit Kumar
CC: Jingoo Han
---
drivers/pci/host/pcie-designware.c |4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/drivers/pci/host/pcie
used like:
pci_scan_bus() (mandatory)
pci_fixup_irqs() (optional)
pci_bus_size_bridges() (optional)
pci_pci_bus_assign_resources() (optional)
pci_bus_add_devices() (mandatory)
Signed-off-by: Yijing Wang
CC: "David S. Miller"
CC: Geert Uytterhoeven
CC: Guan Xuetao
CC: Richard Henderson
dge to save domain number. Finally,
we could eliminate lots of the platform specific
pci_domain_nr() in the last of the series.
Signed-off-by: Yijing Wang
---
drivers/pci/probe.c | 16 +---
include/linux/pci.h |7 ---
include/uapi/linux/pci.h |3 +++
3 files chan
Introduce pci_host_assign_domain_nr() to assign domain
number for pci_host_bridge. Later we will remove
pci_bus_assign_domain_nr().
Signed-off-by: Yijing Wang
---
drivers/pci/pci.c | 14 +++---
include/linux/pci.h |4
2 files changed, 15 insertions(+), 3 deletions(-)
diff
Pci_scan_bus() is called by legacy pci host drivers,
the legacy host drivers mean they use NULL as parent
device, use all IO/MEM as default resources. Rename
pci_scan_bus() to pci_scan_bus_legacy() for better
readability.
Signed-off-by: Yijing Wang
---
arch/alpha/kernel/sys_nautilus.c |2
ries on x86 (with or without ACPI).
Comments and tests are warmly welcome!
Arnd Bergmann (1):
xen/PCI: Don't use deprecated function pci_scan_bus_parented()
Yijing Wang (29):
PCI: Rip out pci_bus_add_devices() from pci_scan_bus()
PCI: Rip out pci_bus_add_devices() from pci_scan_root_bus
No one uses pci_scan_bus_parented() any more,
remove it.
Signed-off-by: Yijing Wang
---
drivers/pci/probe.c | 19 ---
include/linux/pci.h |2 --
2 files changed, 0 insertions(+), 21 deletions(-)
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index 8ef0375..699a238
Save platform specific sysdata in pci_host_bridge
drvdata, host bridge specific operation need to
access it before the pci bus creation.
Signed-off-by: Yijing Wang
---
drivers/pci/host-bridge.c |4 +++-
drivers/pci/probe.c | 18 --
include/linux/pci.h |3
Mvebu_pcie_scan_bus() is not necessary, we could use
pci_common_init_dev() instead of pci_common_init(),
and pass the device pointer as the parent. Then
pci_scan_root_bus() will be called to scan the pci busses.
Signed-off-by: Yijing Wang
CC: Thomas Petazzoni
CC: Jason Cooper
---
drivers/pci
From: Arnd Bergmann
Use pci_scan_root_bus() instead of deprecated function
pci_scan_bus_parented().
Signed-off-by: Arnd Bergmann
Signed-off-by: Yijing Wang
CC: Konrad Rzeszutek Wilk
CC: xen-de...@lists.xenproject.org
---
drivers/pci/xen-pcifront.c | 10 +++---
1 files changed, 7
*/
int (*phb_prepare)(struct pci_host_bridge *host);
/* platform specific of scan hook to scan pci device */
void (*phb_of_scan_bus)(struct pci_host_bridge *);
}
We could easily extend it to support different host bridge
specific operations.
Signed-off-by: Yijing Wang
Introduce new scan function pci_scan_root_bridge() to
support host bridge drivers that need to provide platform
own pci_host_bridge_ops.
Signed-off-by: Yijing Wang
---
drivers/pci/probe.c | 21 +
include/linux/pci.h |3 +++
2 files changed, 24 insertions(+), 0
Now pci_scan_root_bus() is almost simliar to
pci_create_root_bus() + pci_scan_child_bus().
So we could use common pci_scan_root_bus() in
pci_common_init_dev() to scan pci busses.
tegra_pcie_scan_bus() is redundant, remove it.
Signed-off-by: Yijing Wang
CC: Thierry Reding
CC: linux-te
Signed-off-by: Yijing Wang
CC: Thomas Gleixner
CC: x...@kernel.org
---
arch/x86/pci/acpi.c | 36
1 files changed, 20 insertions(+), 16 deletions(-)
diff --git a/arch/x86/pci/acpi.c b/arch/x86/pci/acpi.c
index 5bfe983..3feb12c 100644
--- a/arch/x86/pci
Should pass pci_bus * instead of pci_dev * to pci_domain_nr().
Signed-off-by: Yijing Wang
CC: Tony Luck
CC: Fenghua Yu
CC: linux-i...@vger.kernel.org
---
arch/ia64/sn/kernel/io_acpi_init.c |6 +++---
arch/ia64/sn/kernel/io_init.c |2 +-
2 files changed, 4 insertions(+), 4
Now we could use pci_scan_root_bridge() to scan
pci buses, provide sparc specific pci_host_bridge_ops.
Signed-off-by: Yijing Wang
CC: "David S. Miller"
CC: sparcli...@vger.kernel.org
---
arch/sparc/kernel/pci.c | 32 ++--
1 files changed, 22 inserti
Now no one use weak pcibios_root_bridge_prepare(),
we could remove it.
Signed-off-by: Yijing Wang
---
drivers/pci/probe.c | 15 ---
include/linux/pci.h |2 --
2 files changed, 0 insertions(+), 17 deletions(-)
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index
From: Yijing Wang
Signed-off-by: Yijing Wang
CC: Tony Luck
CC: Fenghua Yu
CC: linux-i...@vger.kernel.org
---
arch/ia64/pci/pci.c | 34 ++
1 files changed, 18 insertions(+), 16 deletions(-)
diff --git a/arch/ia64/pci/pci.c b/arch/ia64/pci/pci.c
index e4cda61
Sometimes, we need to know the highest reserved
busnr for children bus. Because parent's
bus->busn_res could have padding in it.
This function return the max child busnr as
pci_scan_child_bus().
Signed-off-by: Yijing Wang
---
drivers/pci/hotplug/acpiphp_glue.
Pcibios_root_bridge_prepare() in powerpc is used
to set root bus speed. Rename it to
pcibios_set_root_bus_speed() for better readability.
Signed-off-by: Yijing Wang
CC: Benjamin Herrenschmidt
CC: linuxppc-...@lists.ozlabs.org
---
arch/powerpc/include/asm/machdep.h |2 +-
arch/powerpc
Now we could use pci_scan_root_bridge() to scan
pci buses, provide powerpc specific pci_host_bridge_ops.
Suggested-by: Arnd Bergmann
Signed-off-by: Yijing Wang
CC: Benjamin Herrenschmidt
CC: linuxppc-...@lists.ozlabs.org
---
arch/powerpc/include/asm/machdep.h |2 +-
arch/powerpc
No one uses pci_scan_bus_parented() any more,
remove it.
Signed-off-by: Yijing Wang
---
drivers/pci/probe.c | 19 ---
include/linux/pci.h |2 --
2 files changed, 0 insertions(+), 21 deletions(-)
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index 8ef0375..699a238
Introduce pci_host_bridge_list to manage pci host
bridges in system, so we could detect whether
the host in domain:bus is alreay registered.
Then we could remove bus alreay exist test in
__pci_create_root_bus().
Signed-off-by: Yijing Wang
---
drivers/pci/host-bridge.c | 24
Should pass pci_bus * instead of pci_dev * to pci_domain_nr().
Signed-off-by: Yijing Wang
CC: Tony Luck
CC: Fenghua Yu
CC: linux-i...@vger.kernel.org
---
arch/ia64/sn/kernel/io_acpi_init.c |6 +++---
arch/ia64/sn/kernel/io_init.c |2 +-
2 files changed, 4 insertions(+), 4
Now pci_scan_root_bus() is almost simliar to
pci_create_root_bus() + pci_scan_child_bus().
So we could use common pci_scan_root_bus() in
pci_common_init_dev() to scan pci busses.
tegra_pcie_scan_bus() is redundant, remove it.
Signed-off-by: Yijing Wang
CC: Thierry Reding
CC: linux-te
Now no one use pci_create_root_bus(), we could remove it
and rename __pci_create_root_bus() to pci_create_root_bus().
Signed-off-by: wangyij...@huawei.com
---
drivers/pci/probe.c | 27 ---
include/linux/pci.h |3 ---
2 files changed, 8 insertions(+), 22 deletions(-)
Mvebu_pcie_scan_bus() is not necessary, we could use
pci_common_init_dev() instead of pci_common_init(),
and pass the device pointer as the parent. Then
pci_scan_root_bus() will be called to scan the pci busses.
Signed-off-by: Yijing Wang
CC: Thomas Petazzoni
CC: Jason Cooper
---
drivers/pci
From: Yijing Wang
Now pci_bus_add_devices() has been ripped out
from pci_scan_root_bus(), we could use pci_scan_root_bus()
instead of pci_create_root_bus() + pci_scan_child_bus()
for simplicity. We could also remove the pci bus
resource(dino_current_bus,255) and pci_bus_update_busn_res_end
Sometimes, we need to know the highest reserved
busnr for children bus. Because parent's
bus->busn_res could have padding in it.
This function return the max child busnr as
pci_scan_child_bus().
Signed-off-by: Yijing Wang
---
drivers/pci/hotplug/acpiphp_glue.
arm/arm64 to assign domain number
in later patch.
Signed-off-by: Yijing Wang
CC: Richard Henderson
CC: Ivan Kokshaysky
CC: Matt Turner
CC: Tony Luck
CC: Fenghua Yu
CC: Michal Simek
CC: Ralf Baechle
CC: Benjamin Herrenschmidt
CC: Paul Mackerras
CC: Michael Ellerman
CC: Sebastian Ott
CC
Now we could use pci_scan_root_bridge() to scan
pci buses, provide sparc specific pci_host_bridge_ops.
Signed-off-by: Yijing Wang
CC: "David S. Miller"
CC: sparcli...@vger.kernel.org
---
arch/sparc/kernel/pci.c | 32 ++--
1 files changed, 22 inserti
Use pci_scan_root_bus() instead of pci_create_root_bus() +
pci_scan_child_bus() for simplicity.
Signed-off-by: Yijing Wang
CC: Mohit Kumar
CC: Jingoo Han
---
drivers/pci/host/pcie-designware.c |4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/drivers/pci/host/pcie
Export find_pci_host_bridge().
Signed-off-by: Yijing Wang
---
drivers/pci/host-bridge.c |2 +-
include/linux/pci.h |1 +
2 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/pci/host-bridge.c b/drivers/pci/host-bridge.c
index 4a2baa2..51e24f8 100644
--- a/drivers
Now pci_host_bridge holds the domain number,
so we could eliminate all platform specific
pci_domain_nr().
Signed-off-by: Yijing Wang
---
arch/alpha/include/asm/pci.h |2 --
arch/ia64/include/asm/pci.h |1 -
arch/microblaze/pci/pci-common.c | 11 ---
arch/mips/include
Now we save the domain number in pci_host_bridge,
we could remove pci_bus_assign_domain_nr() and
clean the domain member in pci_bus.
Signed-off-by: Yijing Wang
---
drivers/pci/pci.c |5 -
drivers/pci/probe.c | 12
include/linux/pci.h |3 ---
3 files changed, 4
.
For arm hw_pci->scan() functions which call
pci_scan_root_bus(), it's no need to change anything,
because pci_bus_add_devices() will be called later
in pci_common_init_dev().
Signed-off-by: Yijing Wang
CC: Richard Henderson
CC: Ivan Kokshaysky
CC: Matt Turner
CC: David Howells
CC: T
Use pci_scan_root_bus() instead of pci_create_root_bus() +
pci_scan_child_bus() for simplicity.
Signed-off-by: Yijing Wang
CC: Tanmay Inamdar
---
drivers/pci/host/pci-xgene.c |3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/drivers/pci/host/pci-xgene.c b/drivers/pci
From: Yijing Wang
Signed-off-by: Yijing Wang
CC: Tony Luck
CC: Fenghua Yu
CC: linux-i...@vger.kernel.org
---
arch/ia64/pci/pci.c | 34 ++
1 files changed, 18 insertions(+), 16 deletions(-)
diff --git a/arch/ia64/pci/pci.c b/arch/ia64/pci/pci.c
index e4cda61
Now no one use weak pcibios_root_bridge_prepare(),
we could remove it.
Signed-off-by: Yijing Wang
---
drivers/pci/probe.c | 15 ---
include/linux/pci.h |2 --
2 files changed, 0 insertions(+), 17 deletions(-)
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index
*/
int (*phb_prepare)(struct pci_host_bridge *host);
/* platform specific of scan hook to scan pci device */
void (*phb_of_scan_bus)(struct pci_host_bridge *);
}
We could easily extend it to support different host bridge
specific operations.
Signed-off-by: Yijing Wang
Pcibios_root_bridge_prepare() in powerpc is used
to set root bus speed. Rename it to
pcibios_set_root_bus_speed() for better readability.
Signed-off-by: Yijing Wang
CC: Benjamin Herrenschmidt
CC: linuxppc-...@lists.ozlabs.org
---
arch/powerpc/include/asm/machdep.h |2 +-
arch/powerpc
Signed-off-by: Yijing Wang
CC: Thomas Gleixner
CC: x...@kernel.org
---
arch/x86/pci/acpi.c | 36
1 files changed, 20 insertions(+), 16 deletions(-)
diff --git a/arch/x86/pci/acpi.c b/arch/x86/pci/acpi.c
index 5bfe983..3feb12c 100644
--- a/arch/x86/pci
Pci_scan_bus() is called by legacy pci host drivers,
the legacy host drivers mean they use NULL as parent
device, use all IO/MEM as default resources. Rename
pci_scan_bus() to pci_scan_bus_legacy() for better
readability.
Signed-off-by: Yijing Wang
---
arch/alpha/kernel/sys_nautilus.c |2
used like:
pci_scan_bus() (mandatory)
pci_fixup_irqs() (optional)
pci_bus_size_bridges() (optional)
pci_pci_bus_assign_resources() (optional)
pci_bus_add_devices() (mandatory)
Signed-off-by: Yijing Wang
CC: "David S. Miller"
CC: Geert Uytterhoeven
CC: Guan Xuetao
CC: Richard Henderson
Save platform specific sysdata in pci_host_bridge
drvdata, host bridge specific operation need to
access it before the pci bus creation.
Signed-off-by: Yijing Wang
---
drivers/pci/host-bridge.c |4 +++-
drivers/pci/probe.c | 18 --
include/linux/pci.h |3
Introduce new scan function pci_scan_root_bridge() to
support host bridge drivers that need to provide platform
own pci_host_bridge_ops.
Signed-off-by: Yijing Wang
---
drivers/pci/probe.c | 21 +
include/linux/pci.h |3 +++
2 files changed, 24 insertions(+), 0
On 2015/2/26 13:51, Bjorn Helgaas wrote:
> On Thu, Feb 26, 2015 at 09:29:17AM +0800, Yijing Wang wrote:
>> v2->v3:
>> Rebase this series on v4.0-rc1.
>
> Hm, still doesn't apply for me:
Hi Bjorn, I redo the series, I guess the errors were introduced by calling
From: Arnd Bergmann
Use pci_scan_root_bus() instead of deprecated function
pci_scan_bus_parented().
Signed-off-by: Arnd Bergmann
Signed-off-by: Yijing Wang
CC: Konrad Rzeszutek Wilk
CC: xen-de...@lists.xenproject.org
---
drivers/pci/xen-pcifront.c | 10 +++---
1 files changed, 7
()
for callers provide its own parent and io/mem/bus resources
Arnd Bergmann (1):
xen/PCI: Don't use deprecated function pci_scan_bus_parented()
Yijing Wang (29):
PCI: Rip out pci_bus_add_devices() from pci_scan_bus()
PCI: Rip out pci_bus_add_devices() from pci_scan_root_bus()
PCI
,
we could use the generic pci_host_bridge to hold
host bridge specific operations like
pcibios_root_bridge_prepare(). The changes are
transparent to platform host bridge drivers.
Signed-off-by: Yijing Wang
---
drivers/pci/host-bridge.c | 56 ++
drivers/pci/probe.c
Introduce pci_host_assign_domain_nr() to assign domain
number for pci_host_bridge. Later we will remove
pci_bus_assign_domain_nr().
Signed-off-by: Yijing Wang
---
drivers/pci/pci.c | 14 +++---
include/linux/pci.h |4
2 files changed, 15 insertions(+), 3 deletions(-)
diff
dge to save domain number. Finally,
we could eliminate lots of the platform specific
pci_domain_nr() in the last of the series.
Signed-off-by: Yijing Wang
---
drivers/pci/probe.c | 16 +---
include/linux/pci.h |7 ---
include/uapi/linux/pci.h |3 +++
3 files chan
used like:
pci_scan_bus() (mandatory)
pci_fixup_irqs() (optional)
pci_bus_size_bridges() (optional)
pci_pci_bus_assign_resources() (optional)
pci_bus_add_devices() (mandatory)
Signed-off-by: Yijing Wang
CC: "David S. Miller"
CC: Geert Uytterhoeven
CC: Guan Xuetao
CC: Richard Henderson
Pcibios_root_bridge_prepare() in powerpc is used
to set root bus speed. Rename it to
pcibios_set_root_bus_speed() for better readability.
Signed-off-by: Yijing Wang
CC: Benjamin Herrenschmidt
CC: linuxppc-...@lists.ozlabs.org
Signed-off-by: Bjorn Helgaas
---
arch/powerpc/include/asm/machdep.h
Now we save the domain number in pci_host_bridge,
we could remove pci_bus_assign_domain_nr() and
clean the domain member in pci_bus.
Signed-off-by: Yijing Wang
Signed-off-by: Bjorn Helgaas
---
drivers/pci/pci.c |5 -
drivers/pci/probe.c | 12
include/linux/pci.h |3
Now we could use pci_scan_host_bridge() to scan
pci buses, provide sparc specific pci_host_bridge_ops.
Signed-off-by: Yijing Wang
CC: "David S. Miller"
CC: sparcli...@vger.kernel.org
Signed-off-by: Bjorn Helgaas
---
arch/sparc/kernel/pci.c | 32 ++-
Pci_claim_bus_resources() should be called before
pci_bus_add_devices(), or driver may failed to
load, because the resources had not claimed.
Signed-off-by: Yijing Wang
---
arch/sparc/kernel/pci.c |3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/arch/sparc/kernel/pci.c
dge to save domain number. Finally,
we could eliminate lots of the platform specific
pci_domain_nr() in the last of the series.
Signed-off-by: Yijing Wang
Signed-off-by: Bjorn Helgaas
---
drivers/pci/probe.c | 16 +---
include/linux/pci.h |7 ---
include/uapi/li
arm/arm64 to assign domain number
in later patch.
Signed-off-by: Yijing Wang
CC: Richard Henderson
CC: Ivan Kokshaysky
CC: Matt Turner
CC: Tony Luck
CC: Fenghua Yu
CC: Michal Simek
CC: Ralf Baechle
CC: Benjamin Herrenschmidt
CC: Paul Mackerras
CC: Michael Ellerman
CC: Sebastian Ott
CC
Now no one use pci_create_root_bus(), we could remove it
and rename __pci_create_root_bus() to pci_create_root_bus().
Signed-off-by: wangyij...@huawei.com
Signed-off-by: Bjorn Helgaas
---
drivers/pci/probe.c | 27 ---
include/linux/pci.h |3 ---
2 files changed, 8 i
Use pci_scan_root_bus() instead of pci_create_root_bus() +
pci_scan_child_bus() for simplicity.
Signed-off-by: Yijing Wang
CC: Tanmay Inamdar
Signed-off-by: Bjorn Helgaas
---
drivers/pci/host/pci-xgene.c |3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/drivers/pci
.
For arm hw_pci->scan() functions which call
pci_scan_root_bus(), it's no need to change anything,
because pci_bus_add_devices() will be called later
in pci_common_init_dev().
Signed-off-by: Yijing Wang
CC: Richard Henderson
CC: Ivan Kokshaysky
CC: Matt Turner
CC: David Howells
CC: T
From: Yijing Wang
Signed-off-by: Yijing Wang
CC: Tony Luck
CC: Fenghua Yu
CC: linux-i...@vger.kernel.org
Signed-off-by: Bjorn Helgaas
---
arch/ia64/pci/pci.c | 34 ++
1 files changed, 18 insertions(+), 16 deletions(-)
diff --git a/arch/ia64/pci/pci.c b
*/
int (*prepare)(struct pci_host_bridge *host);
/* platform specific of scan hook to scan pci device */
void (*scan_bus)(struct pci_host_bridge *);
}
We could easily extend it to support different host bridge
specific operations.
Signed-off-by: Yijing Wang
Signed-off-by
Introduce pci_host_assign_domain_nr() to assign domain
number for pci_host_bridge. Later we will remove
pci_bus_assign_domain_nr().
Signed-off-by: Yijing Wang
Signed-off-by: Bjorn Helgaas
---
drivers/pci/pci.c | 20 +++-
include/linux/pci.h |4
2 files changed, 19
No one uses pci_scan_bus_parented() any more,
remove it.
Signed-off-by: Yijing Wang
Signed-off-by: Bjorn Helgaas
---
drivers/pci/probe.c | 19 ---
include/linux/pci.h |2 --
2 files changed, 0 insertions(+), 21 deletions(-)
diff --git a/drivers/pci/probe.c b/drivers/pci
Now pci_host_bridge holds the domain number,
so we could eliminate all platform specific
pci_domain_nr().
Signed-off-by: Yijing Wang
Signed-off-by: Bjorn Helgaas
---
arch/alpha/include/asm/pci.h |2 --
arch/ia64/include/asm/pci.h |1 -
arch/microblaze/pci/pci-common.c | 11
Signed-off-by: Yijing Wang
Signed-off-by: Bjorn Helgaas
---
drivers/pci/host-bridge.c |6 +++---
drivers/pci/pci.h |2 ++
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/pci/host-bridge.c b/drivers/pci/host-bridge.c
index bc1de59..51f0a82 100644
--- a
Sometimes, we need to know the highest reserved
busnr for children bus. Because parent's
bus->busn_res could have padding in it.
This function return the max child busnr as
pci_scan_child_bus().
Signed-off-by: Yijing Wang
Signed-off-by: Bjorn Helgaas
Signed-off-by: Fengguang Wu
---
Save platform specific sysdata in pci_host_bridge
drvdata, host bridge specific operation need to
access it before the pci bus creation.
Signed-off-by: Yijing Wang
Signed-off-by: Bjorn Helgaas
---
drivers/pci/host-bridge.c |4 +++-
drivers/pci/pci.h |4 +++-
drivers/pci/probe.c
On 2015/3/6 22:19, Rob Herring wrote:
> On Fri, Mar 6, 2015 at 3:33 AM, Yijing Wang wrote:
>> Now we could use pci_scan_host_bridge() to scan
>> pci buses, provide powerpc specific pci_host_bridge_ops.
>>
>> Suggested-by: Arnd Bergmann
>> Signed-off-by: Yijing Wa
From: Yijing Wang
Now pci_bus_add_devices() has been ripped out
from pci_scan_root_bus(), we could use pci_scan_root_bus()
instead of pci_create_root_bus() + pci_scan_child_bus()
for simplicity.
Signed-off-by: Yijing Wang
CC: "James E.J. Bottomley"
CC: linux-par...@vger.kernel.org
Now we could use pci_scan_host_bridge() to scan
pci buses, provide powerpc specific pci_host_bridge_ops.
Suggested-by: Arnd Bergmann
Signed-off-by: Yijing Wang
CC: Benjamin Herrenschmidt
CC: linuxppc-...@lists.ozlabs.org
Signed-off-by: Bjorn Helgaas
---
arch/powerpc/include/asm/machdep.h
Now pci_scan_root_bus() is almost similar to
pci_create_root_bus() + pci_scan_child_bus().
So we could use common pci_scan_root_bus() in
pci_common_init_dev() to scan pci busses.
tegra_pcie_scan_bus() is redundant, remove it.
Signed-off-by: Yijing Wang
CC: Thierry Reding
CC: linux-te
Use pci_scan_root_bus() instead of pci_create_root_bus() +
pci_scan_child_bus() for simplicity.
Signed-off-by: Yijing Wang
CC: Mohit Kumar
CC: Jingoo Han
Signed-off-by: Bjorn Helgaas
---
drivers/pci/host/pcie-designware.c |4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff
701 - 800 of 1016 matches
Mail list logo