[RESEND PATCH 2/3] bcache: update document info

2016-06-21 Thread Yijing Wang
There is no return in continue_at(), update the documentation. Signed-off-by: Yijing Wang --- drivers/md/bcache/closure.c |2 +- drivers/md/bcache/closure.h |3 --- 2 files changed, 1 insertions(+), 4 deletions(-) diff --git a/drivers/md/bcache/closure.c b/drivers/md/bcache/closure.c

[RFC][PATCH v2 2/2] libsas: Fix hotplug issue in libsas

2016-09-26 Thread Yijing Wang
ing, the old sas port resource may have not completely deleted, the new sas port resource of the same name will be created, and this will cause calltrace about sysfs device node. Signed-off-by: Yijing Wang Signed-off-by: Yousong He Signed-off-by: Qilin Chen --- drivers/scsi/libsas/sas_at

[RFC][PATCH v2 1/2] libsas: Alloc dynamic work to avoid missing sas events

2016-09-26 Thread Yijing Wang
d them in kernel. This patch remove the static defined hotplug work, and use dynamic work to avoid missing hotplug events. Signed-off-by: Yijing Wang Signed-off-by: Yousong He Signed-off-by: Qilin Chen --- drivers/scsi/libsas/sas_event.c| 61 ++ driver

[RFC][PATCH v2 0/2] Improve libsas hotplug

2016-09-26 Thread Yijing Wang
v1-v2: Fix memory allocation issue in interrupt context. Yijing Wang (2): libsas: Alloc dynamic work to avoid missing sas events libsas: Fix hotplug issue in libsas drivers/scsi/libsas/sas_ata.c | 34 ++--- drivers/scsi/libsas/sas_discover.c | 245

[RFC][PATCH v1 1/2] libsas: Alloc dynamic work to avoid missing sas events

2016-09-12 Thread Yijing Wang
d them in kernel. This patch remove the static defined hotplug work, and use dynamic work to avoid missing hotplug events. Signed-off-by: Yijing Wang Signed-off-by: Yousong He Signed-off-by: Qilin Chen --- drivers/scsi/libsas/sas_event.c| 61 --- driver

[RFC][PATCH v1 2/2] libsas: Fix hotplug issue in libsas

2016-09-12 Thread Yijing Wang
ing, the old sas port resource may have not completely deleted, the new sas port resource of the same name will be created, and this will cause calltrace about sysfs device node. Signed-off-by: Yijing Wang Signed-off-by: Yousong He Signed-off-by: Qilin Chen --- drivers/scsi/libsas/sas_at

Re: [PATCH 2/6] PCI/MSI: add hooks to populate the msi_domain field

2014-12-08 Thread Yijing Wang
On 2014/12/9 4:12, Marc Zyngier wrote: > In order to be able to populate the device msi_domain field, > add the necesary hooks to propagate the PHB msi_domain across > secondary busses to devices. > > So far, nobody populates the initial msi_domain. > > Signed-off-by: Marc Zyngier > --- > drive

Re: [PATCH 2/6] PCI/MSI: add hooks to populate the msi_domain field

2014-12-09 Thread Yijing Wang
>>> +void __weak pcibios_set_phb_msi_domain(struct pci_bus *bus) >>> +{ >>> +} >>> + >>> +static void pci_set_bus_msi_domain(struct pci_bus *bus) >>> +{ >>> + struct pci_dev *bridge = bus->self; >>> + >>> + if (!bridge) >>> + pcibios_set_phb_msi_domain(bus); >>> + else >>> +

Re: [PATCH 2/6] PCI/MSI: add hooks to populate the msi_domain field

2014-12-09 Thread Yijing Wang
>>> Well, this is not supposed to be a perfect solution yet, but instead a >>> basis for discussion. What I'd like to find out is: >>> >>> - What is the minimum granularity for associating a device with its MSI >>> domain in existing platforms? >> >> PCI device, after Gerry's msi irq domain patchse

Re: [PATCH v6 00/17] Introduce ACPI for ARM64 based on ACPI 5.1

2015-01-05 Thread Yijing Wang
ase refer to the test result below [1]. We can boot the system successfully using PSCI on our ARM64 hardware using this patch set, of course we need to add some more patches (GICv3), but with this patch set: You could add my Tested-by: Yijing Wang if you want. if you want me to test the

Re: [PATCH v2 03/30] xen/PCI: Don't use deprecated function pci_scan_bus_parented()

2015-01-22 Thread Yijing Wang
On 2015/1/23 4:25, Konrad Rzeszutek Wilk wrote: > On Wed, Jan 21, 2015 at 08:29:58AM +0800, Yijing Wang wrote: >> From: Arnd Bergmann >> >> Use pci_scan_root_bus() instead of deprecated function >> pci_scan_bus_parented(). >> >> Signed-off-by: Arnd Bergman

Re: [PATCH v2 23/30] PCI/mvebu: Use pci_common_init_dev() to simplify code

2015-01-22 Thread Yijing Wang
On 2015/1/23 1:40, Thomas Petazzoni wrote: > Dear Yijing Wang, > > On Wed, 21 Jan 2015 08:30:18 +0800, Yijing Wang wrote: >> Mvebu_pcie_scan_bus() is not necessary, we could use >> pci_common_init_dev() instead of pci_common_init(), >> and pass the device

Re: [PATCH v2 2/8] PCI/MSI: Add hooks to populate the msi_domain field

2015-01-13 Thread Yijing Wang
>>> +static void pci_set_msi_domain(struct pci_dev *dev) >>> +{ >>> + /* >>> +* If no domain has been set through the pcibios callback, >>> +* inherit the default from the bus device. >>> +*/ >>> + if (!dev_get_msi_domain(&dev->dev)) >>> + dev_set_msi_domain(&dev->dev, >>>

Re: [PATCH v2 2/8] PCI/MSI: Add hooks to populate the msi_domain field

2015-01-13 Thread Yijing Wang
On 2015/1/9 1:06, Marc Zyngier wrote: > In order to be able to populate the device msi_domain field, > add the necesary hooks to propagate the PHB msi_domain across > secondary busses to devices. > > So far, nobody populates the initial msi_domain. Acked-by: Yijing Wang >

[PATCH 16/28] PCI/powerpc: Use pci_scan_root_bridge() for simplicity

2015-01-15 Thread Yijing Wang
Now we could use pci_scan_root_bridge() to scan pci buses, provide powerpc specific pci_host_bridge_ops. Signed-off-by: Yijing Wang --- arch/powerpc/kernel/pci-common.c | 57 -- 1 files changed, 36 insertions(+), 21 deletions(-) diff --git a/arch/powerpc

[PATCH 09/28] PCI: Separate pci_host_bridge creation out of pci_create_root_bus()

2015-01-15 Thread Yijing Wang
operations like pcibios_root_bridge_prepare(). Signed-off-by: Yijing Wang --- drivers/pci/host-bridge.c | 78 + drivers/pci/probe.c | 121 +++-- include/linux/pci.h |6 ++- 3 files changed, 134 insertions(+), 71

[PATCH 21/28] PCI/mvebu: Use pci_common_init_dev() to simplify code

2015-01-15 Thread Yijing Wang
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 --- drivers/pci/host/pci-mvebu.c | 18

[PATCH 22/28] PCI/tegra: Remove redundant tegra_pcie_scan_bus()

2015-01-15 Thread Yijing Wang
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 --- drivers/pci/host/pci-tegra.c | 15

[PATCH 20/28] PCI/Parisc: Use pci_scan_root_bus() for simplicity

2015-01-15 Thread Yijing Wang
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 --- drivers/parisc/dino.c| 11 ++- drivers/parisc

[PATCH 07/28] PCI: Pass PCI domain number combined with root bus number

2015-01-15 Thread Yijing Wang
arm/arm64 to assign domain number in later patch. Signed-off-by: Yijing Wang --- arch/alpha/kernel/pci.c |5 +++-- arch/alpha/kernel/sys_nautilus.c |3 ++- arch/ia64/pci/pci.c |4 ++-- arch/ia64/sn/kernel/io_init.c|5 +++-- arch/microblaze/pci/pci

[PATCH 02/28] PCI: Rip out pci_bus_add_devices() from pci_scan_root_bus()

2015-01-15 Thread Yijing Wang
. 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: David Howells CC: Tony Luck CC: Michal Simek CC: Ralf Baechle CC: Koichi Yasu

[PATCH 08/28] PCI: Introduce pci_host_assign_domain_nr() to assign domain

2015-01-15 Thread Yijing Wang
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 | 47 +++ include/linux/pci.h |4 2 files changed, 51

[PATCH 06/28] PCI: Combine PCI domain and bus number in u32 arg

2015-01-15 Thread Yijing Wang
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

[PATCH 00/28] Refine PCI scan interfaces and make generic pci host bridge

2015-01-15 Thread Yijing Wang
lcome! Arnd Bergmann (1): xen/PCI: Don't use deprecated function pci_scan_bus_parented() Yijing Wang (27): PCI: Rip out pci_bus_add_devices() from pci_scan_bus() PCI: Rip out pci_bus_add_devices() from pci_scan_root_bus() PCI: Remove deprecated pci_scan_bus_parented() PCI: Rename pc

[PATCH 18/28] PCI/sparc: Use pci_scan_root_bridge() for simplicity

2015-01-15 Thread Yijing Wang
Now we could use pci_scan_root_bridge() to scan pci buses, provide sparc specific pci_host_bridge_ops. Signed-off-by: Yijing Wang --- arch/sparc/kernel/pci.c | 30 -- 1 files changed, 24 insertions(+), 6 deletions(-) diff --git a/arch/sparc/kernel/pci.c b/arch

[PATCH 05/28] PCI: Rename pci_scan_bus() to pci_scan_bus_legacy()

2015-01-15 Thread Yijing Wang
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

[PATCH 27/28] PCI: Remove platform specific pci_domain_nr()

2015-01-15 Thread Yijing Wang
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

[PATCH 01/28] PCI: Rip out pci_bus_add_devices() from pci_scan_bus()

2015-01-15 Thread Yijing Wang
() should be used in flow 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

[PATCH 04/28] PCI: Remove deprecated pci_scan_bus_parented()

2015-01-15 Thread Yijing Wang
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 7cf577f..e44de73

[PATCH 24/28] PCI/xgene: Use pci_scan_root_bus() instead of pci_create_root_bus()

2015-01-15 Thread Yijing Wang
Use pci_scan_root_bus() instead of pci_create_root_bus() + pci_scan_child_bus() for simplicity. Signed-off-by: Yijing Wang --- 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/host/pci-xgene.c

[PATCH 26/28] PCI: Export find_pci_host_bridge()

2015-01-15 Thread Yijing Wang
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 ccbf168..74f7572 100644 --- a/drivers

[PATCH 23/28] PCI/designware: Use pci_scan_root_bus() for simplicity

2015-01-15 Thread Yijing Wang
Use pci_scan_root_bus() instead of pci_create_root_bus() + pci_scan_child_bus() for simplicity. Signed-off-by: Yijing Wang --- drivers/pci/host/pcie-designware.c |4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/drivers/pci/host/pcie-designware.c b/drivers/pci/host

[PATCH 25/28] PCI: Rename __pci_create_root_bus() to pci_create_root_bus()

2015-01-15 Thread Yijing Wang
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(-)

[PATCH 28/28] PCI: Remove pci_bus_assign_domain_nr()

2015-01-15 Thread Yijing Wang
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 | 48 +--- drivers/pci/probe.c | 12 include/linux

[PATCH 03/28] xen/PCI: Don't use deprecated function pci_scan_bus_parented()

2015-01-15 Thread Yijing Wang
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

[PATCH 15/28] PCI/powerpc: Rename pcibios_root_bridge_prepare() for better readability

2015-01-15 Thread Yijing Wang
Pcibios_root_bridge_prepare() in powerpc is used to set root bus speed. So rename it to pcibios_set_root_bus_speed() for better readability. Signed-off-by: Yijing Wang --- arch/powerpc/include/asm/machdep.h |2 +- arch/powerpc/kernel/pci-common.c |4 ++-- arch/powerpc

[PATCH 10/28] PCI: Save sysdata in pci_host_bridge drvdata

2015-01-15 Thread Yijing Wang
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

[PATCH 17/28] PCI: Remove weak pcibios_root_bridge_prepare()

2015-01-15 Thread Yijing Wang
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

[PATCH 19/28] PCI: Introduce pci_bus_child_max_busnr()

2015-01-15 Thread Yijing Wang
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.

[PATCH 11/28] PCI: Introduce pci_host_bridge_ops to setup host bridge

2015-01-15 Thread Yijing Wang
pci_host_bridge *); } Signed-off-by: Yijing Wang --- drivers/pci/host-bridge.c | 12 ++-- drivers/pci/probe.c | 19 ++- include/linux/pci.h | 16 ++-- 3 files changed, 38 insertions(+), 9 deletions(-) diff --git a/drivers/pci/host-bridge.c b/drivers/pci

[PATCH 13/28] PCI/x86: Refine pci_acpi_scan_root() with generic pci_host_bridge

2015-01-15 Thread Yijing Wang
Signed-off-by: Yijing Wang --- 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 8edea63..f9a55c2 100644 --- a/arch/x86/pci/acpi.c +++ b/arch/x86/pci/acpi.c @@ -467,6

[PATCH 14/28] PCI/IA64: Refine pci_acpi_scan_root() with generic pci_host_bridge

2015-01-15 Thread Yijing Wang
From: Yijing Wang Signed-off-by: Yijing Wang --- 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 e457015..7736c02 100644 --- a/arch/ia64/pci/pci.c +++ b/arch/ia64/pci

[PATCH 12/28] PCI: Introduce new scan function pci_scan_root_bridge()

2015-01-15 Thread 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

Re: [PATCH v2 2/8] PCI/MSI: Add hooks to populate the msi_domain field

2015-01-13 Thread Yijing Wang
> static struct pci_bus *pci_alloc_child_bus(struct pci_bus *parent, > struct pci_dev *bridge, int busnr) > { > @@ -713,6 +727,7 @@ static struct pci_bus *pci_alloc_child_bus(struct pci_bus > *parent, > bridge->subordinate = child; > > add_dev: >

Re: [PATCH 01/28] PCI: Rip out pci_bus_add_devices() from pci_scan_bus()

2015-01-18 Thread Yijing Wang
On 2015/1/17 7:16, Yinghai Lu wrote: > On Fri, Jan 16, 2015 at 3:15 PM, Yinghai Lu wrote: >> On Thu, Jan 15, 2015 at 5:43 PM, Yijing Wang wrote: >>> Pci_bus_add_devices() should not be placed in pci_scan_bus(). >>> Now pci device will be added to driver core once i

Re: [PATCH 08/28] PCI: Introduce pci_host_assign_domain_nr() to assign domain

2015-01-18 Thread Yijing Wang
>> I'm confused: the same code is already part of the PCI tree, but with >> Lorenzo Pieralisi listed as the patch author. The code is good, >> and I acked it in the past, but one of you is (probably by accident) >> misattributing the patch. >> >> Assuming that the patch that is already merged in ne

Re: [PATCH 09/28] PCI: Separate pci_host_bridge creation out of pci_create_root_bus()

2015-01-18 Thread Yijing Wang
On 2015/1/16 17:34, Arnd Bergmann wrote: > On Friday 16 January 2015 09:44:07 Yijing Wang wrote: >> We want to make a generic pci_host_bridge, then we could >> place common PCI infos like domain number in it. Ripping >> out pci_host_bridge creation from pci_create_root_bu

Re: [PATCH 10/28] PCI: Save sysdata in pci_host_bridge drvdata

2015-01-18 Thread Yijing Wang
On 2015/1/16 17:18, Arnd Bergmann wrote: > On Friday 16 January 2015 09:44:08 Yijing Wang wrote: >> @@ -2066,11 +2064,11 @@ struct pci_bus *pci_scan_root_bus(struct device >> *parent, u32 db, >> { >> struct pci_host_bridge *host; >> >> - h

Re: [PATCH 23/28] PCI/designware: Use pci_scan_root_bus() for simplicity

2015-01-18 Thread Yijing Wang
On 2015/1/18 0:39, Sergei Shtylyov wrote: > Hello. > > On 1/16/2015 4:44 AM, Yijing Wang wrote: > >> Use pci_scan_root_bus() instead of pci_create_root_bus() + >> pci_scan_child_bus() for simplicity. > >> Signed-off-by: Yijing Wang >> --- >>

Re: [PATCH 18/28] PCI/sparc: Use pci_scan_root_bridge() for simplicity

2015-01-18 Thread Yijing Wang
On 2015/1/16 18:01, Arnd Bergmann wrote: > On Friday 16 January 2015 09:44:16 Yijing Wang wrote: >> +static void pci_host_bridge_probe_mode( >> + struct pci_host_bridge *host) >> +{ >> + host->of_scan = true; >> +} >> > > I pro

Re: [PATCH 27/28] PCI: Remove platform specific pci_domain_nr()

2015-01-18 Thread Yijing Wang
On 2015/1/16 17:44, Arnd Bergmann wrote: > On Friday 16 January 2015 09:44:25 Yijing Wang wrote: >> >> +int pci_domain_nr(struct pci_bus *bus) >> +{ >> + struct pci_host_bridge *host = find_pci_host_bridge(bus); >> + >> + return host->domain;

Re: [PATCH 18/28] PCI/sparc: Use pci_scan_root_bridge() for simplicity

2015-01-19 Thread Yijing Wang
On 2015/1/19 16:44, Arnd Bergmann wrote: > On Monday 19 January 2015 11:17:02 Yijing Wang wrote: >> On 2015/1/16 18:01, Arnd Bergmann wrote: >>> On Friday 16 January 2015 09:44:16 Yijing Wang wrote: >>>> +static void pci_host_bridge_probe_mode( >>>> +

Re: [PATCH 08/28] PCI: Introduce pci_host_assign_domain_nr() to assign domain

2015-01-19 Thread Yijing Wang
On 2015/1/19 17:50, Arnd Bergmann wrote: > On Monday 19 January 2015 10:14:44 Yijing Wang wrote: >>>> I'm confused: the same code is already part of the PCI tree, but with >>>> Lorenzo Pieralisi listed as the patch author. The code is good, >>>> a

Re: [PATCH v6 09/30] PCI: Separate pci_host_bridge creation out of pci_create_root_bus()

2015-03-22 Thread Yijing Wang
>> +struct pci_host_bridge *pci_create_host_bridge( >> +struct device *parent, u32 db, struct list_head *resources) >> +{ >> +int error; >> +int bus = PCI_BUSNUM(db); >> +int domain = PCI_DOMAIN(db); >> +struct pci_host_bridge *host; >> +struct resource_entry *window, *n

[PATCH v9 08/30] PCI: Update pci_host_bridge bus resource

2015-04-03 Thread Yijing Wang
From: Yijing Wang Sometimes, the bus resource start number is not equal to root bus number. For example, in pci_scan_bus(), we always add the default bus resource which start bus number is 0, but the root bus number callers given may != 0, so we need to update pci_host_bridge bus resource

[PATCH v9 16/30] PCI: Introduce pci_bus_child_max_busnr()

2015-04-03 Thread Yijing Wang
complete. But pci scan functions won't return the actual max bus number. So we could use pci_bus_child_max_busnr() to find that. Signed-off-by: Fengguang Wu Signed-off-by: Yijing Wang --- drivers/pci/hotplug/acpiphp_glue.c | 29 + drivers/pci/pci.c

[PATCH v9 29/30] PCI: Remove pci_bus_assign_domain_nr()

2015-04-03 Thread Yijing Wang
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. Also move pci_host_assign_domain_nr() to drivers/pci/host-bridge.c for simplicity. Signed-off-by: Yijing Wang --- drivers/pci/host-bridge.c | 63

[PATCH v9 26/30] PCI/xgene: Use pci_scan_root_bus() instead of pci_create_root_bus()

2015-04-03 Thread Yijing Wang
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

[PATCH v9 30/30] PCI: Clean up CONFIG_PCI_DOMAINS_GENERIC

2015-04-03 Thread Yijing Wang
Now we could clean up CONFIG_PCI_DOMAINS_GENERIC. Signed-off-by: Yijing Wang --- arch/arm/Kconfig |3 --- arch/arm64/Kconfig|3 --- drivers/pci/host-bridge.c | 11 ++- drivers/pci/pci.c |2 -- 4 files changed, 6 insertions(+), 13 deletions(-) diff

[PATCH v9 05/30] PCI: Introduce pci_host_assign_domain_nr() to assign domain

2015-04-03 Thread Yijing Wang
Introduce pci_host_assign_domain_nr() to assign domain number for pci_host_bridge. In the later patch, we would assign domain in pci_create_host_bridge, clean up the pci_bus_assign_domain_nr() and move this function into drivers/pci/host-bridge.c. Signed-off-by: Yijing Wang --- drivers/pci

[PATCH v9 03/30] PCI: Save domain in pci_host_bridge

2015-04-03 Thread Yijing Wang
Save domain in pci_host_bridge, so we could get domain from pci_host_bridge, and at the end of series, we could clean up the arch specific pci_domain_nr(). For arm, we pass -1 as the domain number, we would update the domain number in core by pci_bus_assign_domain_nr(). Signed-off-by: Yijing Wang

[PATCH v9 06/30] PCI: Separate pci_host_bridge creation out of pci_create_root_bus()

2015-04-03 Thread Yijing Wang
This patch separate pci_host_bridge creation out of pci_create_root_bus(), and try to make a generic pci_host_bridge, then we could make it hold host bridge specific operations like pcibios_root_bridge_prepare(). The changes are transparent to platform host bridge drivers. Signed-off-by: Yijing

[PATCH v9 18/30] ia64/PCI: Refine pci_acpi_scan_root() with generic pci_host_bridge

2015-04-03 Thread Yijing Wang
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, 19 insertions(+), 15 deletions(-) diff --git a/arch/ia64/pci/pci.c b/arch/ia64/pci/pci.c index c642bc8

[PATCH v9 00/30] Refine PCI scan interfaces and make generic pci host bridge

2015-04-03 Thread Yijing Wang
ific pci_host_bridge operations 3. pci_scan_host_bridge() 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: Remove deprecated pci_scan_bus_parented() PCI: Sav

[PATCH v9 02/30] PCI: Remove deprecated pci_scan_bus_parented()

2015-04-03 Thread Yijing Wang
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

Re: [PATCH] PCI: Save sysdata in pci_host_bridge drvdata

2015-04-03 Thread Yijing Wang
Please ignore this one, it is the same as [PATCH v9 11/30] PCI: Save sysdata in pci_host_bridge drvdata. Thanks! Yijing. On 2015/4/3 17:25, Yijing Wang wrote: > Save platform specific sysdata in pci_host_bridge > drvdata, host bridge specific operation need to > access it before th

[PATCH v9 24/30] PCI/tegra: Remove redundant tegra_pcie_scan_bus()

2015-04-03 Thread Yijing Wang
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. Tested-by: Thierry Reding Signed-off-by: Yijing Wang Acked-by

[PATCH v9 27/30] PCI: Rename __pci_create_root_bus() to pci_create_root_bus()

2015-04-03 Thread Yijing Wang
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 | 35 +-- include/linux/pci.h |3 --- 2 files changed, 9 insertions(+), 29 delet

[PATCH v9 13/30] PCI: Move pcibios_root_bridge_prepare() to pci_create_host_bridge()

2015-04-03 Thread Yijing Wang
Move pcibios_root_bridge_prepare() to pci_create_host_bridge(). Signed-off-by: Yijing Wang --- drivers/pci/host-bridge.c | 16 +--- drivers/pci/probe.c |3 --- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/drivers/pci/host-bridge.c b/drivers/pci/host

[PATCH v9 15/30] PCI: Introduce new scan function pci_scan_host_bridge()

2015-04-03 Thread Yijing Wang
Introduce new scan function pci_scan_host_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 | 22 ++ include/linux/pci.h |3 +++ 2 files changed, 25 insertions(+), 0

[PATCH v9 10/30] PCI: Introduce pci_host_bridge_list to manage host bridges

2015-04-03 Thread Yijing Wang
Introduce pci_host_bridge_list to manage pci host bridges in system, this make us have the ability to check whether the new host would conflict with existing one. Then we could remove bus alreay exist check in __pci_create_root_bus(). Signed-off-by: Yijing Wang --- drivers/pci/host-bridge.c

[PATCH v9 07/30] PCI: Add default bus resource in pci_host_bridge

2015-04-03 Thread Yijing Wang
whether the new pci host bridge conflict with existing one. Signed-off-by: Yijing Wang --- drivers/pci/host-bridge.c | 20 drivers/pci/probe.c | 26 ++ include/linux/pci.h |2 ++ 3 files changed, 32 insertions(+), 16 deletions(-) diff

[PATCH v9 25/30] PCI/designware: Use pci_scan_root_bus() for simplicity

2015-04-03 Thread Yijing Wang
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

[PATCH] PCI: Save sysdata in pci_host_bridge drvdata

2015-04-03 Thread Yijing Wang
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 |3 ++- drivers/pci/pci.h |2 +- drivers/pci/probe.c | 20

[PATCH v9 21/30] sparc/PCI: Use pci_scan_host_bridge() for simplicity

2015-04-03 Thread Yijing Wang
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 --- arch/sparc/kernel/pci.c | 28 ++-- 1 files changed, 22 insertions(+), 6

[PATCH v9 22/30] parisc/PCI: Use pci_scan_root_bus() for simplicity

2015-04-03 Thread Yijing Wang
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.

[PATCH v9 04/30] PCI: Move pci_bus_assign_domain_nr() declaration into drivers/pci/pci.h

2015-04-03 Thread Yijing Wang
pci_bus_assign_domain_nr() is only called in probe.c, Move pci_bus_assign_domain_nr() declaration into drivers/pci/pci.h. Signed-off-by: Yijing Wang --- drivers/pci/pci.h |9 + include/linux/pci.h |6 -- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a

[PATCH v9 19/30] powerpc/pci: Use pci_scan_host_bridge() for simplicity

2015-04-03 Thread Yijing Wang
Now we could use pci_scan_host_bridge() to scan pci buses, provide powerpc specific pci_host_bridge_ops. Signed-off-by: Yijing Wang CC: Benjamin Herrenschmidt CC: linuxppc-...@lists.ozlabs.org --- arch/powerpc/kernel/pci-common.c | 62 +++-- 1 files changed

[PATCH v9 28/30] PCI: Remove platform specific pci_domain_nr()

2015-04-03 Thread Yijing Wang
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

[PATCH v9 17/30] x86/PCI: Refine pci_acpi_scan_root() with generic pci_host_bridge

2015-04-03 Thread Yijing Wang
Signed-off-by: Yijing Wang CC: Thomas Gleixner CC: x...@kernel.org --- arch/x86/pci/acpi.c | 37 + 1 files changed, 21 insertions(+), 16 deletions(-) diff --git a/arch/x86/pci/acpi.c b/arch/x86/pci/acpi.c index d2655d5..877acaf 100644 --- a/arch/x86/pci

[PATCH v9 01/30] xen/PCI: Don't use deprecated function pci_scan_bus_parented()

2015-04-03 Thread Yijing Wang
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 | 16 +--- 1 files changed

[PATCH v9 09/30] PCI: Introduce pci_host_first_busnr() function

2015-04-03 Thread Yijing Wang
Use it to get the first bus number of the bus resource. Signed-off-by: Yijing Wang --- drivers/pci/pci.h | 11 +++ drivers/pci/probe.c | 19 ++- 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h index 8526790

[PATCH v9 23/30] PCI/mvebu: Use pci_common_init_dev() to simplify code

2015-04-03 Thread Yijing Wang
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

[PATCH v9 14/30] PCI: Introduce pci_host_bridge_ops to support host specific operations

2015-04-03 Thread Yijing Wang
: Yijing Wang --- drivers/pci/host-bridge.c |9 - drivers/pci/pci.h |5 +++-- drivers/pci/probe.c | 11 --- include/linux/pci.h |9 + 4 files changed, 28 insertions(+), 6 deletions(-) diff --git a/drivers/pci/host-bridge.c b/drivers/pci/host

[PATCH v9 12/30] powerpc/PCI: Rename pcibios_root_bridge_prepare() to pcibios_set_root_bus_speed()

2015-04-03 Thread Yijing Wang
d add pci_host_bridge_ops to do the same thing in later patch. Signed-off-by: Yijing Wang --- arch/powerpc/include/asm/machdep.h |2 +- arch/powerpc/kernel/pci-common.c |8 +++- arch/powerpc/platforms/pseries/pci.c |8 arch/powerpc/platforms/pseries/pser

[PATCH v9 11/30] PCI: Save sysdata in pci_host_bridge drvdata

2015-04-03 Thread Yijing Wang
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 |3 ++- drivers/pci/pci.h |2 +- drivers/pci/probe.c | 20

[PATCH v9 20/30] PCI: Remove pcibios_root_bridge_prepare() and pcibos_set_root_bus_speed()

2015-04-03 Thread Yijing Wang
Now no one use weak pcibios_root_bridge_prepare() and pcibios_set_root_bus_speed, we could clean up them. Signed-off-by: Yijing Wang --- drivers/pci/host-bridge.c |4 drivers/pci/probe.c | 18 +- include/linux/pci.h |2 -- 3 files changed, 1 insertions

Re: [PATCH v9 19/30] powerpc/pci: Use pci_scan_host_bridge() for simplicity

2015-04-06 Thread Yijing Wang
hanks very much for your test and review. Thanks! Yijing. > > > On Fri, 2015-04-03 at 17:25 +0800, Yijing Wang wrote: >> Now we could use pci_scan_host_bridge() to scan >> pci buses, provide powerpc specific pci_host_bridge_ops. >> >> Sign

Re: [PATCH v10 00/29] Refine PCI scan interfaces and make generic pci host bridge

2015-04-26 Thread Yijing Wang
root_bus_speed() > sparc/PCI: Use pci_scan_host_bridge() for simplicity > parisc/PCI: Use pci_scan_root_bus() for simplicity > PCI/mvebu: Use pci_common_init_dev() to simplify code > PCI/tegra: Remove redundant tegra_pcie_scan_bus() > PCI/designware: Use pci_scan_

Re: [PATCH v9 06/30] PCI: Separate pci_host_bridge creation out of pci_create_root_bus()

2015-04-07 Thread Yijing Wang
>> +/* >> + * If support CONFIG_PCI_DOMAINS_GENERIC, use >> + * pci_host_assign_domain_nr() to update domain >> + * number. >> + */ >> +host->domain = domain; >> +pci_host_assign_domain_nr(host); > > I think it's a bit confusing that there's another "host->domain =" > a

Re: [PATCH v9 07/30] PCI: Add default bus resource in pci_host_bridge

2015-04-08 Thread Yijing Wang
>> diff --git a/include/linux/pci.h b/include/linux/pci.h >> index 1542df8..f189dfb 100644 >> --- a/include/linux/pci.h >> +++ b/include/linux/pci.h >> @@ -404,6 +404,8 @@ struct pci_host_bridge { >> int domain; >> struct device dev; >> struct pci_bus *bus;/* root bus */

Re: [PATCH v9 23/30] PCI/mvebu: Use pci_common_init_dev() to simplify code

2015-04-08 Thread Yijing Wang
nd Armada 38x > SoCs, and I didn't saw any regression. So you can add my: > > Reviewed-by: Gregory CLEMENT > Tested-by: Gregory CLEMENT Great, thanks very much! Thanks! Yijing. > > > >> Signed-off-by: Yijing Wang >> CC: Thomas Petazzoni >> CC: Jason

Re: [PATCH v9 03/30] PCI: Save domain in pci_host_bridge

2015-04-08 Thread Yijing Wang
On 2015/4/8 16:09, Gregory CLEMENT wrote: > Hi Yijing, > > On 03/04/2015 11:25, Yijing Wang wrote: >> Save domain in pci_host_bridge, so we could get domain >> from pci_host_bridge, and at the end of series, we could >> clean up the arch specific pci_domain_nr(). Fo

Re: [PATCH v9 08/30] PCI: Update pci_host_bridge bus resource

2015-04-08 Thread Yijing Wang
On 2015/4/8 6:42, Bjorn Helgaas wrote: > On Fri, Apr 03, 2015 at 05:25:42PM +0800, Yijing Wang wrote: >> From: Yijing Wang >> >> Sometimes, the bus resource start number is not equal to >> root bus number. For example, in pci_scan_bus(), we always >> add the def

[PATCH v10 01/29] xen/PCI: Don't use deprecated function pci_scan_bus_parented()

2015-04-21 Thread Yijing Wang
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 | 16 +--- 1 files changed

[PATCH v10 27/29] PCI: Rename __pci_create_root_bus() to pci_create_root_bus()

2015-04-21 Thread Yijing Wang
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 | 57 +++--- include/linux/pci.h |3 -- 2 files changed, 17 insertio

[PATCH v10 29/29] PCI: Remove pci_bus_assign_domain_nr()

2015-04-21 Thread Yijing Wang
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. Also move pci_host_assign_domain_nr() to drivers/pci/host-bridge.c for simplicity. Signed-off-by: Yijing Wang --- drivers/pci/host-bridge.c | 68

[PATCH v10 23/29] PCI/mvebu: Use pci_common_init_dev() to simplify code

2015-04-21 Thread Yijing Wang
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. Tested-by: Gregory CLEMENT Signed-off-by: Yijing Wang Reviewed-by: Gregory CLEMENT

[PATCH v10 17/29] x86/PCI: Refine pci_acpi_scan_root() with generic pci_host_bridge

2015-04-21 Thread Yijing Wang
Signed-off-by: Yijing Wang CC: Thomas Gleixner CC: x...@kernel.org --- arch/x86/pci/acpi.c | 37 + 1 files changed, 21 insertions(+), 16 deletions(-) diff --git a/arch/x86/pci/acpi.c b/arch/x86/pci/acpi.c index d6aab1c..ec16499 100644 --- a/arch/x86/pci

[PATCH v10 22/29] parisc/PCI: Use pci_scan_root_bus() for simplicity

2015-04-21 Thread Yijing Wang
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.

<    1   2   3   4   5   6   7   8   9   10   >