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

2015-03-23 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

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

2015-03-24 Thread Yijing Wang
On 2015/3/24 20:31, Thierry Reding wrote: > On Tue, Mar 24, 2015 at 11:34:18AM +0800, Yijing Wang wrote: >> 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_in

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

2015-03-25 Thread Yijing Wang
On 2015/3/25 7:58, Daniel Axtens wrote: > On Tue, 2015-03-24 at 11:34 +0800, Yijing Wang wrote: >> 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: Benjam

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

2015-03-25 Thread Yijing Wang
pci_create_root_bus(). It's even better if you could help test this changes. Thanks! Yijing. On 2015/3/24 11:34, 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 pointer as th

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

2015-03-06 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 Signed-off-by: Bjorn Helgaas --- drivers/pci/host-bridge.c |4 +++- drivers/pci/pci.h |4 +++- drivers/pci/probe.c

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

2015-03-06 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 Signed-off-by: Bjorn Helgaas --- drivers/pci/xen-pcifront.c | 11

[PATCH v5 12/29] PCI: Introduce new scan function pci_scan_host_bridge()

2015-03-06 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 Signed-off-by: Bjorn Helgaas --- drivers/pci/probe.c | 22 ++ include/linux/pci.h |4 2 files

[PATCH v5 26/29] PCI: Rename __pci_create_root_bus() to pci_create_root_bus()

2015-03-06 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 Signed-off-by: Bjorn Helgaas --- drivers/pci/probe.c | 27 --- include/linux/pci.h |3 --- 2 files changed, 8 i

[PATCH v5 24/29] PCI/designware: Use pci_scan_root_bus() for simplicity

2015-03-06 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 Signed-off-by: Bjorn Helgaas --- drivers/pci/host/pcie-designware.c |4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff

[PATCH v5 14/29] ia64/PCI: Refine pci_acpi_scan_root() with generic pci_host_bridge

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

[PATCH v5 11/29] PCI: Introduce pci_host_bridge_ops to support host specific operations

2015-03-06 Thread Yijing Wang
*/ 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

[PATCH v5 18/29] sparc/PCI: Claim bus resources before pci_bus_add_devices()

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

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

2015-03-06 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 Signed-off-by: Bjorn Helgaas --- drivers/pci/pci.c |5 - drivers/pci/probe.c | 12 include/linux/pci.h |3

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

2015-03-06 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 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

[PATCH v5 16/29] powerpc/pci: Use pci_scan_host_bridge() for simplicity

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

[PATCH v5 27/29] PCI: Export find_pci_host_bridge() and rename to pci_find_host_bridge()

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

[PATCH v5 25/29] PCI/xgene: Use pci_scan_root_bus() instead of pci_create_root_bus()

2015-03-06 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 Signed-off-by: Bjorn Helgaas --- drivers/pci/host/pci-xgene.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/drivers/pci

[PATCH v5 19/29] sparc/PCI: Use pci_scan_host_bridge() for simplicity

2015-03-06 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 Signed-off-by: Bjorn Helgaas --- arch/sparc/kernel/pci.c | 32 ++-

[PATCH v5 21/29] parisc/PCI: Use pci_scan_root_bus() for simplicity

2015-03-06 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.kernel.org

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

2015-03-06 Thread Yijing Wang
Now no one use weak pcibios_root_bridge_prepare(), we could remove it. Signed-off-by: Yijing Wang Signed-off-by: Bjorn Helgaas --- drivers/pci/probe.c | 16 +--- include/linux/pci.h |2 -- 2 files changed, 1 insertions(+), 17 deletions(-) diff --git a/drivers/pci/probe.c b

[PATCH v5 23/29] PCI/tegra: Remove redundant tegra_pcie_scan_bus()

2015-03-06 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. Signed-off-by: Yijing Wang CC: Thierry Reding CC: linux-te

[PATCH v5 20/29] PCI: Introduce pci_bus_child_max_busnr()

2015-03-06 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 Signed-off-by: Bjorn Helgaas Signed-off-by: Fengguang Wu ---

[PATCH v5 22/29] PCI/mvebu: Use pci_common_init_dev() to simplify code

2015-03-06 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 Signed-off-by

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

2015-03-06 Thread Yijing Wang
Signed-off-by: Yijing Wang CC: Thomas Gleixner CC: x...@kernel.org Signed-off-by: Bjorn Helgaas --- 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 ad0e926..e730d31

[PATCH v5 15/29] powerpc/pci: Rename pcibios_root_bridge_prepare()

2015-03-06 Thread 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 Signed-off-by: Bjorn Helgaas --- arch/powerpc/include/asm/machdep.h

[PATCH v5 05/29] PCI: Combine PCI domain and bus number in u32 arg

2015-03-06 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 Signed-off-by: Bjorn Helgaas --- drivers/pci/probe.c | 16 +--- include/linux/pci.h |7 --- include/uapi/li

[PATCH v5 08/29] PCI: Separate pci_host_bridge creation out of pci_create_root_bus()

2015-03-06 Thread Yijing Wang
, 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 Signed-off-by: Bjorn Helgaas --- drivers/pci/host-bridge.c | 55

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

2015-03-06 Thread Yijing Wang
PCI: Don't use deprecated function pci_scan_bus_parented() Yijing Wang (28): 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: Combine PCI domain and bus number in u32 arg P

[PATCH v5 07/29] PCI: Introduce pci_host_assign_domain_nr() to assign domain

2015-03-06 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 Signed-off-by: Bjorn Helgaas --- drivers/pci/pci.c | 20 +++- include/linux/pci.h |4 2 files changed, 19

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

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

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

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

[PATCH v5 09/29] PCI: Introduce pci_host_bridge_list to manage host bridges

2015-03-06 Thread Yijing Wang
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 Signed-off-by: Bjorn Helgaas --- drivers/pci/host

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

2015-03-06 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: Richard Henderson CC: Ivan Kokshaysky CC: Matt Turner CC: David Howells CC: T

[PATCH v5 06/29] PCI: Pass PCI domain number combined with root bus number

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

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

2015-03-15 Thread Yijing Wang
>> Currently, if platform does not know the end bus number (not provide the bus >> resource), >> we will update the max bus number returned by pci_scan_child_bus() to the >> bus resource end, >> and I think this is reasonable. I consider to introduce a flag to identify >> the bus resource >> whi

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

2015-03-15 Thread Yijing Wang
On 2015/3/13 22:48, Bjorn Helgaas wrote: > On Fri, Mar 13, 2015 at 6:31 AM, Liviu Dudau wrote: >> On Thu, Mar 12, 2015 at 04:23:06PM -0500, Bjorn Helgaas wrote: >>> On Mon, Mar 09, 2015 at 10:33:57AM +0800, Yijing Wang wrote: >>>> ... >>>> Yijing Wang (29

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

2015-03-15 Thread Yijing Wang
On 2015/3/13 19:31, Liviu Dudau wrote: > On Thu, Mar 12, 2015 at 04:23:06PM -0500, Bjorn Helgaas wrote: >> On Mon, Mar 09, 2015 at 10:33:57AM +0800, Yijing Wang wrote: >>> ... >>> Yijing Wang (29): >>> PCI: Rip out pci_bus_add_devices() from pci_scan_bus() &g

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

2015-03-02 Thread Yijing Wang
>> pbm->pci_bus = pci_scan_bus(pbm->pci_first_busno, &pcic_ops, pbm); >> +if (pbm->pci_bus) >> +pci_bus_add_devices(pbm->pci_bus); >> #if 0 /* deadwood transplanted from sparc64 */ >> pci_fill_in_pbm_cookies(pbm->pci_bus, pbm, pbm->prom_node); >> pci_record_assignmen

Re: [PATCH v4 02/30] PCI: Rip out pci_bus_add_devices() from pci_scan_root_bus()

2015-03-02 Thread Yijing Wang
On 2015/3/3 9:57, Bjorn Helgaas wrote: > On Thu, Feb 26, 2015 at 04:11:56PM +0800, Yijing Wang wrote: >> Just like pci_scan_bus(), we also should rip out >> pci_bus_add_devices() from pci_scan_root_bus(). >> Lots platforms first call pci_scan_root_bus(), but >

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

2015-03-02 Thread Yijing Wang
>> --- a/drivers/pci/xen-pcifront.c >> +++ b/drivers/pci/xen-pcifront.c >> @@ -446,6 +446,7 @@ static int pcifront_scan_root(struct pcifront_device >> *pdev, >> unsigned int domain, unsigned int bus) >> { >> struct pci_bus *b; >> +LIST_HEAD(resources); >>

Re: [PATCH v4 05/30] PCI: Rename pci_scan_bus() to pci_scan_bus_legacy()

2015-03-02 Thread Yijing Wang
On 2015/3/3 10:06, Bjorn Helgaas wrote: > On Thu, Feb 26, 2015 at 04:11:59PM +0800, Yijing Wang wrote: >> 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

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

2015-03-02 Thread Yijing Wang
>> + >> +resource_list_for_each_entry_safe(window, n, resources) >> +list_move_tail(&window->node, &host->windows); >> + >> +return host; >> +} >> +EXPORT_SYMBOL(pci_create_host_bridge); > > Why does this need to be exported? I don't want code outside drivers/pci > using somet

Re: [PATCH v4 12/30] PCI: Introduce pci_host_bridge_ops to support host specific operations

2015-03-03 Thread Yijing Wang
>> +if (host->ops && host->ops->phb_prepare) { >> +error = host->ops->phb_prepare(host); >> +if(error) { > > Whitespace error. Will fix. > >> --- a/include/linux/pci.h >> +++ b/include/linux/pci.h >> @@ -400,6 +400,13 @@ static inline int pci_channel_offline(struct p

Re: [PATCH v4 13/30] PCI: Introduce new scan function pci_scan_root_bridge()

2015-03-03 Thread Yijing Wang
On 2015/3/3 10:52, Bjorn Helgaas wrote: > On Thu, Feb 26, 2015 at 04:12:07PM +0800, Yijing Wang wrote: >> Introduce new scan function pci_scan_root_bridge() to >> support host bridge drivers that need to provide platform >> own pci_host_bridge_ops. >> &g

Re: [PATCH v4 16/30] PCI/IA64: Fix the build warning about pci_domain_nr()

2015-03-03 Thread Yijing Wang
On 2015/3/3 10:56, Bjorn Helgaas wrote: > On Thu, Feb 26, 2015 at 04:12:10PM +0800, Yijing Wang wrote: >> 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...@

Re: [PATCH v4 12/30] PCI: Introduce pci_host_bridge_ops to support host specific operations

2015-03-03 Thread Yijing Wang
On 2015/3/3 11:03, Bjorn Helgaas wrote: > On Thu, Feb 26, 2015 at 04:12:06PM +0800, Yijing Wang wrote: >> Now we have weak functions like pcibios_root_bridge_prepare() >> to setup pci host bridge, We could introduce pci_host_bridge_ops >> which contain host bridge

Re: [PATCH v4 20/30] PCI/sparc: Use pci_scan_root_bridge() for simplicity

2015-03-03 Thread Yijing Wang
>> -pci_of_scan_bus(pbm, node, bus); >> -pci_bus_add_devices(bus); >> -pci_bus_register_of_sysfs(bus); >> +pci_bus_add_devices(host->bus); >> +pci_bus_register_of_sysfs(host->bus); >> >> -pci_claim_bus_resources(bus); >> +pci_claim_bus_resources(host->bus); > > Isn't

Re: [PATCH v4 22/30] PCI/Parisc: Use pci_scan_root_bus() for simplicity

2015-03-03 Thread Yijing Wang
On 2015/3/3 11:24, Bjorn Helgaas wrote: > On Thu, Feb 26, 2015 at 04:12:16PM +0800, Yijing Wang wrote: >> From: Yijing Wang > > When you write subject lines, I think it's friendly to run > "git log --oneline" on the file you're changing, and make yours >

Re: [PATCH v4 28/30] PCI: Export find_pci_host_bridge()

2015-03-03 Thread Yijing Wang
On 2015/3/3 11:40, Bjorn Helgaas wrote: > On Thu, Feb 26, 2015 at 04:12:22PM +0800, Yijing Wang wrote: >> Export find_pci_host_bridge(). >> >> Signed-off-by: Yijing Wang >> --- >> drivers/pci/host-bridge.c |2 +- >> include/linux/pci.h |1 +

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

2015-02-14 Thread Yijing Wang
>> Also we could eliminate all arch specific pci_domain_nr() after applied this >> series. >> >> I tested this series on x86 (with or without ACPI). >> Comments and tests are warmly welcome! > > Can you push a public branch out rebased against mainline for us to pull > and test please ? OK, I wi

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

2015-01-30 Thread Yijing Wang
Hi Bjorn, Any comments for this series ? I'm so sorry to bother you. :) On 2015/1/21 8:29, 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 >

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

2015-01-30 Thread Yijing Wang
On 2015/1/30 23:45, Bjorn Helgaas wrote: > On Fri, Jan 30, 2015 at 3:10 AM, Yijing Wang wrote: >> Hi Bjorn, >>Any comments for this series ? I'm so sorry to bother you. :) > > It's next in my queue after Wei Yang's powerpc sriov series. Her

[PATCH v2 18/30] PCI/powerpc: Use pci_scan_root_bridge() for simplicity

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

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

2015-01-20 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 v2 29/30] PCI: Remove platform specific pci_domain_nr()

2015-01-20 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 v2 25/30] PCI/designware: Use pci_scan_root_bus() for simplicity

2015-01-20 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 v2 30/30] PCI: Remove pci_bus_assign_domain_nr()

2015-01-20 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 |5 - drivers/pci/probe.c | 12 include/linux/pci.h |3 --- 3 files changed, 4

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

2015-01-20 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 v2 28/30] PCI: Export find_pci_host_bridge()

2015-01-20 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 26cefce..288ac69 100644 --- a/drivers

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

2015-01-20 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 v2 22/30] PCI/Parisc: Use pci_scan_root_bus() for simplicity

2015-01-20 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. We could also remove the pci bus resource(dino_current_bus,255) and pci_bus_update_busn_res_end

[PATCH v2 17/30] PCI/powerpc: Rename pcibios_root_bridge_prepare()

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

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

2015-01-20 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: Richard Henderson CC: Ivan Kokshaysky CC: Matt Turner CC: David Howells CC: T

[PATCH v2 21/30] PCI: Introduce pci_bus_child_max_busnr()

2015-01-20 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 v2 07/30] PCI: Pass PCI domain number combined with root bus number

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

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

2015-01-20 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 CC: Thierry Reding CC: linux-te

[PATCH v2 20/30] PCI/sparc: Use pci_scan_root_bridge() for simplicity

2015-01-20 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 CC: "David S. Miller" CC: sparcli...@vger.kernel.org --- arch/sparc/kernel/pci.c | 32 ++-- 1 files changed, 22 inserti

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

2015-01-20 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 | 14 +++--- include/linux/pci.h |4 2 files changed, 15 insertions(+), 3 deletions(-) diff

[PATCH v2 19/30] PCI: Remove weak pcibios_root_bridge_prepare()

2015-01-20 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 v2 12/30] PCI: Introduce pci_host_bridge_ops to support host specific operations

2015-01-20 Thread Yijing Wang
*/ 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

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

2015-01-20 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 v2 10/30] PCI: Introduce pci_host_bridge_list to manage host bridges

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

[PATCH v2 13/30] PCI: Introduce new scan function pci_scan_root_bridge()

2015-01-20 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

[PATCH v2 15/30] PCI/IA64: Refine pci_acpi_scan_root() with generic pci_host_bridge

2015-01-20 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, 18 insertions(+), 16 deletions(-) diff --git a/arch/ia64/pci/pci.c b/arch/ia64/pci/pci.c index e457015

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

2015-01-20 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 v2 05/30] PCI: Rename pci_scan_bus() to pci_scan_bus_legacy()

2015-01-20 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 v2 09/30] PCI: Separate pci_host_bridge creation out of pci_create_root_bus()

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

[PATCH v2 16/30] PCI/IA64: Fix the build warning about pci_domain_nr()

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

[PATCH v2 14/30] PCI/x86: Refine pci_acpi_scan_root() with generic pci_host_bridge

2015-01-20 Thread Yijing Wang
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 8edea63..f9a55c2 100644 --- a/arch/x86/pci

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

2015-01-20 Thread Yijing Wang
ests 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() PCI: Remove deprecated pci_scan_bus_parented()

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

2015-01-20 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 v2 06/30] PCI: Combine PCI domain and bus number in u32 arg

2015-01-20 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 v2 01/30] PCI: Rip out pci_bus_add_devices() from pci_scan_bus()

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

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

2015-02-26 Thread Yijing Wang
On 2015/2/27 7:57, Bjorn Helgaas wrote: > On Thu, Feb 26, 2015 at 04:11:54PM +0800, Yijing Wang wrote: >> v3->v4: >> Fix the rebase issue. > > This did apply on v4.0-rc1, but with many whitespace complaints: > > Importing patch "pci-pass-pci-domain-numb

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

2015-02-15 Thread Yijing Wang
>> I tested this series on x86 (with or without ACPI). >> Comments and tests are warmly welcome! > > Can you push a public branch out rebased against mainline for us to pull > and test please ? Hi Lorenzo, I rebased the series and you could pull it from g...@github.com:YijingWang/linux-pci.git f

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

2015-02-15 Thread Yijing Wang
On 2015/2/16 11:13, Benjamin Herrenschmidt wrote: > On Mon, 2015-02-16 at 09:18 +0800, Yijing Wang wrote: >>>> I tested this series on x86 (with or without ACPI). >>>> Comments and tests are warmly welcome! >>> >>> Can you push a public branch out re

[PATCH v2] block: Don't register a registered bdi device

2017-01-17 Thread Yijing Wang
device again. -v2: remove the spin lock protect, because the sd_probe caller should guarantee the scsi_device valid, and the bdi device is unregister when scsi_device/block queue removed. Signed-off-by: Yijing Wang --- block/genhd.c | 3 ++- 1 file changed, 2 insertions(+), 1 d

[PATCH] block: Don't register a registered bdi device

2017-01-10 Thread Yijing Wang
n kernel. This patch check the bdi device state before register a new bdi device to avoid register a registered bdi device again. Signed-off-by: Yijing Wang --- block/genhd.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/block/genhd.c b/block/genhd.c index fcd6d4f..2c2f9

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

2016-07-01 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, 3 insertions(+), 2 deletions(-) diff --git a/drivers/md/bcache/closure.c b/drivers/md/bcache/closure.c

[PATCH v2 3/3] bcache: Remove redundant block_size assignment

2016-07-01 Thread Yijing Wang
We have assigned sb->block_size before the switch, so remove the redundant one. Reviewed-by: Coly Li Signed-off-by: Yijing Wang Acked-by: Eric Wheeler --- drivers/md/bcache/super.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/drivers/md/bcache/super.c b/drivers

[PATCH v2 1/3] bcache: Remove redundant parameter for cache_alloc()

2016-07-01 Thread Yijing Wang
Cache_sb is not used in cache_alloc, and we have copied sb info to cache->sb already, remove it. Reviewed-by: Coly Li Signed-off-by: Yijing Wang --- drivers/md/bcache/super.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/md/bcache/super.c b/drivers

[PATCH v3 1/3] bcache: Remove redundant parameter for cache_alloc()

2016-07-03 Thread Yijing Wang
Cache_sb is not used in cache_alloc, and we have copied sb info to cache->sb already, remove it. Reviewed-by: Coly Li Signed-off-by: Yijing Wang --- drivers/md/bcache/super.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/md/bcache/super.c b/drivers

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

2016-07-03 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, 3 insertions(+), 2 deletions(-) diff --git a/drivers/md/bcache/closure.c b/drivers/md/bcache/closure.c

[PATCH v3 3/3] bcache: Remove redundant block_size assignment

2016-07-03 Thread Yijing Wang
We have assigned sb->block_size before the switch, so remove the redundant one. Reviewed-by: Coly Li Signed-off-by: Yijing Wang Acked-by: Eric Wheeler --- drivers/md/bcache/super.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/drivers/md/bcache/super.c b/drivers

[PATCH 1/2] bcache: Remove redundant set_capacity

2016-11-24 Thread Yijing Wang
set_capacity() has been called in bcache_device_init(), remove the redundant one. Signed-off-by: Yijing Wang --- drivers/md/bcache/super.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c index 849ad44..b638a16 100644 --- a/drivers/md

[PATCH 2/2] bcache: remove unused parameter

2016-11-24 Thread Yijing Wang
Parameter bio is no longer used, clean it. Signed-off-by: Yijing Wang --- drivers/md/bcache/request.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/md/bcache/request.c b/drivers/md/bcache/request.c index 40ffe5e..bf6e432 100644 --- a/drivers/md/bcache

Re: [PATCH 17/36] PCI: Add support for more than two alt_size under same bridge

2015-07-14 Thread Yijing Wang
_size: 8M/17M. > > At same time, child bridges must align/size: 4M/12M, 2M/6M. > and prarent bridge must align/size: 4M/20M. > > So at last, we use 8M/17M as parent bridge alt_align/alt_size. Tested-by: Yijing Wang Hi Yinghai, does this patch depend on the previous items in thi

Re: [PATCH 17/36] PCI: Add support for more than two alt_size under same bridge

2015-07-14 Thread Yijing Wang
On 2015/7/15 13:08, Yinghai Lu wrote: > On Tue, Jul 14, 2015 at 8:07 PM, Yijing Wang wrote: >> On 2015/7/7 7:39, Yinghai Lu wrote: >>> Need to increase size to make sure it could fit all alt entries. >>> >>> So at last, we use 8M/17M as parent bridge alt_ali

Re: [RFC Patch V1 00/12] Reorganize struct msi_desc to prepare for support of generic MSI

2015-07-09 Thread Yijing Wang
struct msi_desc > genirq, PCI: Reorginize struct msi_desc to prepare for support of > generic MSI > genirq, PCI: Move alloc_msi_entry() from PCI MSI code into generic > MSI code Great, it loos good to me, for patch 1,6,8,9,10,11,12, Reviewed-by: Yijing Wang > >

[PATCH 0/2] Enhance libsas hotplug feature

2017-05-19 Thread Yijing Wang
tplug order issues. Yijing Wang (2): libsas: Don't process sas events in static works libsas: Enhance libsas hotplug drivers/scsi/libsas/sas_discover.c | 58 +--- drivers/scsi/libsas/sas_event.c| 90 ++ drivers/scsi/libsas/sas

<    5   6   7   8   9   10   11   >