[PATCH v2 01/22] PCI/MSI: Clean up struct msi_chip argument

2014-09-24 Thread Yijing Wang
Msi_chip functions setup_irq/teardown_irq rarely use msi_chip argument. We can look up msi_chip pointer by the device pointer or irq number, so clean up msi_chip argument. Signed-off-by: Yijing Wang wangyij...@huawei.com CC: Thierry Reding thierry.red...@gmail.com CC: Thomas Petazzoni

[PATCH v2 15/22] MIPS/Xlr/MSI: Use MSI chip framework to configure MSI/MSI-X irq

2014-09-24 Thread Yijing Wang
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 wangyij...@huawei.com --- arch/mips/pci/pci-xlr.c | 15 +-- 1 files changed, 13 insertions(+), 2 deletions(-) diff

[PATCH v2 14/22] MIPS/Xlp/MSI: Use MSI chip framework to configure MSI/MSI-X irq

2014-09-24 Thread Yijing Wang
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 wangyij...@huawei.com --- arch/mips/pci/msi-xlp.c | 14 -- 1 files changed, 12 insertions(+), 2 deletions(-) diff

[PATCH v2 11/22] x86/MSI: Remove unused MSI weak arch functions

2014-09-24 Thread Yijing Wang
Now we can clean up MSI weak arch functions in x86. Signed-off-by: Yijing Wang wangyij...@huawei.com --- arch/x86/include/asm/pci.h |3 --- arch/x86/include/asm/x86_init.h |4 arch/x86/kernel/apic/io_apic.c |2 +- arch/x86/kernel/x86_init.c | 24

[PATCH v2 06/22] PCI/MSI: Introduce weak arch_find_msi_chip() to find MSI chip

2014-09-24 Thread Yijing Wang
() used in ARM platform, find the MSI chip by pci bus. Signed-off-by: Yijing Wang wangyij...@huawei.com --- drivers/pci/msi.c |7 ++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c index 5f8f3af..3acbe65 100644 --- a/drivers/pci/msi.c

[PATCH v2 10/22] Irq_remapping/MSI: Use MSI chip framework to configure MSI/MSI-X irq

2014-09-24 Thread Yijing Wang
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 wangyij...@huawei.com --- drivers/iommu/irq_remapping.c |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git

[PATCH v2 13/22] MIPS/Xlp: Remove the dead function destroy_irq() to fix build error

2014-09-24 Thread Yijing Wang
: some warnings being treated as errors make[1]: *** [arch/mips/pci/msi-xlp.o] Error 1 make: *** [arch/mips/pci/] Error 2 Signed-off-by: Yijing Wang wangyij...@huawei.com Cc: Thomas Gleixner t...@linutronix.de --- arch/mips/pci/msi-xlp.c |4 +--- 1 files changed, 1 insertions(+), 3 deletions

[PATCH v2 21/22] tile/MSI: Use MSI chip framework to configure MSI/MSI-X irq

2014-09-24 Thread Yijing Wang
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 wangyij...@huawei.com --- arch/tile/kernel/pci_gx.c | 14 -- 1 files changed, 12 insertions(+), 2 deletions(-) diff

[PATCH v2 04/22] x86/xen/MSI: Eliminate arch_msix_mask_irq() and arch_msi_mask_irq()

2014-09-24 Thread Yijing Wang
platforms. Keep default_msi_mask_irq() and default_msix_mask_irq() in linux/msi.h to make s390 MSI code compile happy, they wiil be removed in the later patch. Tested-by: Konrad Rzeszutek Wilk konrad.w...@oracle.com Signed-off-by: Yijing Wang wangyij...@huawei.com Acked-by: David Vrabel david.vra

[PATCH v2 16/22] Powerpc/MSI: Use MSI chip framework to configure MSI/MSI-X irq

2014-09-24 Thread Yijing Wang
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 wangyij...@huawei.com Acked-by: Michael Ellerman m...@ellerman.id.au --- arch/powerpc/kernel/msi.c | 14 -- 1 files

[PATCH v2 05/22] s390/MSI: Use __msi_mask_irq() instead of default_msi_mask_irq()

2014-09-24 Thread Yijing Wang
Now only s390/MSI use default_msi_mask_irq() and default_msix_mask_irq(), replace them with the common msi mask irq functions __msi_mask_irq() and __msix_mask_irq(). Remove default_msi_mask_irq() and default_msix_mask_irq(). Signed-off-by: Yijing Wang wangyij...@huawei.com --- arch/s390/pci

[PATCH v2 08/22] x86/MSI: Use MSI chip framework to configure MSI/MSI-X irq

2014-09-24 Thread Yijing Wang
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 wangyij...@huawei.com --- arch/x86/include/asm/pci.h |1 + arch/x86/kernel/apic/io_apic.c | 12 2 files

[PATCH v2 03/22] MSI: Remove the redundant irq_set_chip_data()

2014-09-24 Thread Yijing Wang
Currently, pcie-designware, pcie-rcar, pci-tegra drivers use irq chip_data to save the msi_chip pointer. They already call irq_set_chip_data() in their own MSI irq map functions. So irq_set_chip_data() in arch_setup_msi_irq() is useless. Signed-off-by: Yijing Wang wangyij...@huawei.com

[PATCH v2 20/22] Sparc/MSI: Use MSI chip framework to configure MSI/MSI-X irq

2014-09-24 Thread Yijing Wang
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 wangyij...@huawei.com --- arch/sparc/kernel/pci.c | 14 -- 1 files changed, 12 insertions(+), 2 deletions(-) diff

[PATCH v2 17/22] s390/MSI: Use MSI chip framework to configure MSI/MSI-X irq

2014-09-24 Thread Yijing Wang
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 wangyij...@huawei.com Acked-by: Sebastian Ott seb...@linux.vnet.ibm.com --- arch/s390/pci/pci.c | 14 -- 1 files

[PATCH v2 19/22] IA64/MSI: Use MSI chip framework to configure MSI/MSI-X irq

2014-09-24 Thread Yijing Wang
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 wangyij...@huawei.com --- arch/ia64/kernel/msi_ia64.c | 18 ++ 1 files changed, 14 insertions(+), 4 deletions

[PATCH v2 22/22] PCI/MSI: Clean up unused MSI arch functions

2014-09-24 Thread Yijing Wang
Now we use struct msi_chip in all platforms to configure MSI/MSI-X. We can clean up the unused arch functions. Signed-off-by: Yijing Wang wangyij...@huawei.com Reviewed-by: Lucas Stach l.st...@pengutronix.de --- drivers/iommu/irq_remapping.c |2 +- drivers/pci/msi.c | 100

[PATCH v2 12/22] MIPS/Octeon/MSI: Use MSI chip framework to configure MSI/MSI-X irq

2014-09-24 Thread Yijing Wang
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 wangyij...@huawei.com --- arch/mips/pci/msi-octeon.c | 35 ++- 1 files changed, 22 insertions

Re: [PATCH v2 02/22] PCI/MSI: Remove useless bus-msi assignment

2014-09-25 Thread Yijing Wang
On 2014/9/25 15:06, Thierry Reding wrote: On Thu, Sep 25, 2014 at 11:14:12AM +0800, Yijing Wang wrote: Currently, PCI drivers will initialize bus-msi in pcibios_add_bus(). pcibios_add_bus() will be called in every pci bus initialization. So the bus-msi assignment in pci_alloc_child_bus

Re: [PATCH v2 01/22] PCI/MSI: Clean up struct msi_chip argument

2014-09-25 Thread Yijing Wang
On 2014/9/25 15:15, Thierry Reding wrote: On Thu, Sep 25, 2014 at 11:14:11AM +0800, Yijing Wang wrote: Msi_chip functions setup_irq/teardown_irq rarely use msi_chip argument. That's not true. Out of the four drivers that you modify two use the parameter. And the two that don't probably

Re: [PATCH v2 03/22] MSI: Remove the redundant irq_set_chip_data()

2014-09-25 Thread Yijing Wang
On 2014/9/25 15:19, Thierry Reding wrote: On Thu, Sep 25, 2014 at 11:14:13AM +0800, Yijing Wang wrote: Currently, pcie-designware, pcie-rcar, pci-tegra drivers use irq chip_data to save the msi_chip pointer. They already call irq_set_chip_data() in their own MSI irq map functions. So

Re: [PATCH v2 06/22] PCI/MSI: Introduce weak arch_find_msi_chip() to find MSI chip

2014-09-25 Thread Yijing Wang
On 2014/9/25 15:26, Thierry Reding wrote: On Thu, Sep 25, 2014 at 11:14:16AM +0800, Yijing Wang wrote: Introduce weak arch_find_msi_chip() to find the match msi_chip. Currently, MSI chip associates pci bus to msi_chip. Because in ARM platform, there may be more than one MSI controller

Re: [PATCH v2 17/22] s390/MSI: Use MSI chip framework to configure MSI/MSI-X irq

2014-09-25 Thread Yijing Wang
On 2014/9/25 15:38, Thierry Reding wrote: On Thu, Sep 25, 2014 at 11:14:27AM +0800, Yijing Wang wrote: [...] diff --git a/arch/s390/pci/pci.c b/arch/s390/pci/pci.c [...] @@ -358,7 +358,7 @@ static void zpci_irq_handler(struct airq_struct *airq) } } -int arch_setup_msi_irqs(struct

Re: [PATCH v2 14/22] MIPS/Xlp/MSI: Use MSI chip framework to configure MSI/MSI-X irq

2014-09-25 Thread Yijing Wang
On 2014/9/25 15:36, Thierry Reding wrote: On Thu, Sep 25, 2014 at 11:14:24AM +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. Nit: s/irq/IRQ/ in the above. Signed-off

Re: [PATCH v2 01/22] PCI/MSI: Clean up struct msi_chip argument

2014-09-25 Thread Yijing Wang
On 2014/9/25 18:20, Thomas Gleixner wrote: On Thu, 25 Sep 2014, Thierry Reding wrote: On Thu, Sep 25, 2014 at 11:14:11AM +0800, Yijing Wang wrote: Msi_chip functions setup_irq/teardown_irq rarely use msi_chip argument. That's not true. Out of the four drivers that you modify two use

Re: [PATCH v2 15/22] MIPS/Xlr/MSI: Use MSI chip framework to configure MSI/MSI-X irq

2014-09-25 Thread Yijing Wang
On 2014/9/25 15:37, Thierry Reding wrote: On Thu, Sep 25, 2014 at 11:14:25AM +0800, Yijing Wang wrote: [...] diff --git a/arch/mips/pci/pci-xlr.c b/arch/mips/pci/pci-xlr.c [...] @@ -214,11 +214,11 @@ static int get_irq_vector(const struct pci_dev *dev) } #ifdef CONFIG_PCI_MSI -void

Re: [PATCH v2 06/22] PCI/MSI: Introduce weak arch_find_msi_chip() to find MSI chip

2014-09-25 Thread Yijing Wang
On 2014/9/25 18:38, Thomas Gleixner wrote: On Thu, 25 Sep 2014, Yijing Wang wrote: Introduce weak arch_find_msi_chip() to find the match msi_chip. Currently, MSI chip associates pci bus to msi_chip. Because in ARM platform, there may be more than one MSI controller in system. Associate pci

Re: [PATCH v2 06/22] PCI/MSI: Introduce weak arch_find_msi_chip() to find MSI chip

2014-09-25 Thread Yijing Wang
On 2014/9/25 18:38, Thomas Gleixner wrote: On Thu, 25 Sep 2014, Yijing Wang wrote: Introduce weak arch_find_msi_chip() to find the match msi_chip. Currently, MSI chip associates pci bus to msi_chip. Because in ARM platform, there may be more than one MSI controller in system. Associate pci

Re: [PATCH v2 00/22] Use MSI chip framework to configure MSI/MSI-X in all platforms

2014-09-25 Thread Yijing Wang
On 2014/9/25 22:23, Konrad Rzeszutek Wilk wrote: On Thu, Sep 25, 2014 at 11:14:10AM +0800, Yijing Wang wrote: This series is based Bjorn's pci/msi branch git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git pci/msi Is there a git tree for these patches? Hi Konrad, my git tree

Re: [PATCH v2 00/22] Use MSI chip framework to configure MSI/MSI-X in all platforms

2014-09-26 Thread Yijing Wang
The PCI core can already deal with that. An MSI chip can be set per bus and the weak pcibios_add_bus() can be used to set that. Often it might not even be necessary to do it via pcibios_add_bus() if you create the root bus directly, since you can attach the MSI chip at that time. But I'm

Re: [PATCH v2 00/22] Use MSI chip framework to configure MSI/MSI-X in all platforms

2014-09-27 Thread Yijing Wang
What I would like to see is a way of creating the pci_host_bridge structure outside the pci_create_root_bus(). That would then allow us to pass this sort of platform details like associated msi_chip into the host bridge and the child busses will have an easy way of finding the

Re: [PATCH v2 00/22] Use MSI chip framework to configure MSI/MSI-X in all platforms

2014-09-27 Thread Yijing Wang
On 2014/9/26 17:05, Thierry Reding wrote: On Fri, Sep 26, 2014 at 10:54:32AM +0200, Thierry Reding wrote: [...] At least for Tegra it's trivial to just hook it up in tegra_pcie_scan_bus() directly (patch attached). Really attached this time. Thierry It looks good to me, so I will

Re: [PATCH v2 06/22] PCI/MSI: Introduce weak arch_find_msi_chip() to find MSI chip

2014-09-27 Thread Yijing Wang
MSI chip in this series is to setup MSI irq, including IRQ allocation, Map, compose MSI msg ..., in different platform, many arch specific MSI irq details in it. It's difficult to extract the common data and code. I have a plan to rework MSI related irq_chips in kernel, PCI and Non-PCI,

Re: [PATCH v2 00/22] Use MSI chip framework to configure MSI/MSI-X in all platforms

2014-09-28 Thread Yijing Wang
On 2014/9/28 19:21, Liviu Dudau wrote: On Sun, Sep 28, 2014 at 10:16:12AM +0800, Yijing Wang wrote: What I would like to see is a way of creating the pci_host_bridge structure outside the pci_create_root_bus(). That would then allow us to pass this sort of platform details like associated

Re: [PATCH v2 00/22] Use MSI chip framework to configure MSI/MSI-X in all platforms

2014-09-29 Thread Yijing Wang
Not necessarily. What I have in mind is something like this: This is a good idea, what I'm worried is this series is already large, so I think we need to post another series to do it. I wasn't asking to do it here, I was just offering a suggestion (and sharing some experience) when it

Re: [PATCH v2 00/22] Use MSI chip framework to configure MSI/MSI-X in all platforms

2014-09-29 Thread Yijing Wang
On 2014/9/29 16:37, Lucas Stach wrote: Am Sonntag, den 28.09.2014, 14:11 +0800 schrieb Yijing Wang: On 2014/9/28 10:32, Yijing Wang wrote: On 2014/9/26 17:05, Thierry Reding wrote: On Fri, Sep 26, 2014 at 10:54:32AM +0200, Thierry Reding wrote: [...] At least for Tegra it's trivial to just

[PATCH v3 06/27] PCI: designware: Save msi chip in pci_sys_data

2014-10-14 Thread Yijing Wang
Save msi chip in pci_sys_data instead of assign msi chip to every pci bus in .add_bus(). Signed-off-by: Yijing Wang wangyij...@huawei.com --- drivers/pci/host/pcie-designware.c | 15 --- 1 files changed, 4 insertions(+), 11 deletions(-) diff --git a/drivers/pci/host/pcie

[PATCH v3 26/27] tile/MSI: Use MSI chip framework to configure MSI/MSI-X irq

2014-10-14 Thread Yijing Wang
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 wangyij...@huawei.com --- arch/tile/include/asm/pci.h | 10 ++ arch/tile/kernel/pci_gx.c | 13 +++-- 2 files

[PATCH v3 18/27] MIPS/Xlp: Remove the dead function destroy_irq() to fix build error

2014-10-14 Thread Yijing Wang
: some warnings being treated as errors make[1]: *** [arch/mips/pci/msi-xlp.o] Error 1 make: *** [arch/mips/pci/] Error 2 Signed-off-by: Yijing Wang wangyij...@huawei.com Cc: Thomas Gleixner t...@linutronix.de --- arch/mips/pci/msi-xlp.c |4 +--- 1 files changed, 1 insertions(+), 3 deletions

[PATCH v3 02/27] x86/xen/MSI: Eliminate arch_msix_mask_irq() and arch_msi_mask_irq()

2014-10-14 Thread Yijing Wang
in the later patch. Signed-off-by: Yijing Wang wangyij...@huawei.com CC: David Vrabel david.vra...@citrix.com CC: Konrad Rzeszutek Wilk konrad.w...@oracle.com --- Hi David and Konrad, I dropped the Acked-by and tested-by, because this version has a lot changes compared to last. So, I guess you may

[PATCH v3 07/27] PCI: rcar: Save msi chip in pci_sys_data

2014-10-14 Thread Yijing Wang
Save msi chip in pci_sys_data instead of assign msi chip to every pci bus in .add_bus(). Signed-off-by: Yijing Wang wangyij...@huawei.com --- drivers/pci/host/pcie-rcar.c | 13 +++-- 1 files changed, 3 insertions(+), 10 deletions(-) diff --git a/drivers/pci/host/pcie-rcar.c b/drivers

[PATCH v3 25/27] Sparc/MSI: Use MSI chip framework to configure MSI/MSI-X irq

2014-10-14 Thread Yijing Wang
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 wangyij...@huawei.com --- arch/sparc/kernel/pci.c | 14 -- arch/sparc/kernel/pci_impl.h | 12 2

[PATCH v3 21/27] Powerpc/MSI: Use MSI chip framework to configure MSI/MSI-X irq

2014-10-14 Thread Yijing Wang
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 wangyij...@huawei.com --- Hi Michael, I dropped the Acked-by , because this version has a lot changes compared to last. So, I guess

[PATCH v3 15/27] x86/MSI: Remove unused MSI weak arch functions

2014-10-14 Thread Yijing Wang
Now we can clean up MSI weak arch functions in x86. Signed-off-by: Yijing Wang wangyij...@huawei.com --- arch/x86/include/asm/pci.h |5 + arch/x86/include/asm/x86_init.h |4 arch/x86/kernel/apic/io_apic.c | 21 + arch/x86/kernel/x86_init.c | 24

[PATCH v3 14/27] Irq_remapping/MSI: Use MSI chip framework to configure MSI/MSI-X irq

2014-10-14 Thread Yijing Wang
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 wangyij...@huawei.com --- drivers/iommu/irq_remapping.c | 11 --- 1 files changed, 8 insertions(+), 3 deletions(-) diff

[PATCH v3 10/27] PCI/MSI: Remove useless bus-msi assignment

2014-10-14 Thread Yijing Wang
Now msi chip is saved in pci_sys_data in arm, we could clean the bus-msi assignment in pci core. Signed-off-by: Yijing Wang wangyij...@huawei.com CC: Thierry Reding thierry.red...@gmail.com CC: Thomas Petazzoni thomas.petazz...@free-electrons.com --- drivers/pci/probe.c |1 - 1 files changed

[PATCH v3 13/27] x86/xen/MSI: Use MSI chip framework to configure MSI/MSI-X irq

2014-10-14 Thread Yijing Wang
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 wangyij...@huawei.com Acked-by: David Vrabel david.vra...@citrix.com CC: Konrad Rzeszutek Wilk konrad.w...@oracle.com --- arch/x86

[PATCH v3 00/27] Use MSI chip framework to configure MSI/MSI-X in all platforms

2014-10-14 Thread Yijing Wang
MSI bug in xen running in x86. Rename arch_get_match_msi_chip() to arch_find_msi_chip(). Drop use struct device as the msi_chip argument, we will do that later in another patchset. Yijing Wang (27): MSI: Remove the redundant irq_set_chip_data() x86/xen/MSI: Eliminate arch_msix_mask_irq

[PATCH v3 19/27] MIPS/Xlp/MSI: Use MSI chip framework to configure MSI/MSI-X irq

2014-10-14 Thread Yijing Wang
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 wangyij...@huawei.com --- arch/mips/include/asm/netlogic/xlp-hal/pcibus.h |1 + arch/mips/pci/msi-xlp.c

[PATCH v3 09/27] arm/PCI: Clean unused pcibios_add_bus() and pcibios_remove_bus()

2014-10-14 Thread Yijing Wang
MSI chip will be saved in pci_sys_data, now we can clean up pcibios_add_bus() and pcibios_remove_bus() in arm, and use pci_find_msi_chip() to get msi chip in core MSI code. Signed-off-by: Yijing Wang wangyij...@huawei.com --- arch/arm/include/asm/mach/pci.h |4 arch/arm/kernel/bios32.c

[PATCH v3 11/27] PCI/MSI: Refactor struct msi_chip to make it become more common

2014-10-14 Thread Yijing Wang
.restore_irqs(), .teardown_irqs() and .setup_irqs() to make it become more common. Signed-off-by: Yijing Wang wangyij...@huawei.com Reviewed-by: Lucas Stach l.st...@pengutronix.de --- drivers/pci/msi.c | 15 +++ include/linux/msi.h |4 2 files changed, 19 insertions(+), 0 deletions

[PATCH v3 08/27] PCI: mvebu: Save msi chip in pci_sys_data

2014-10-14 Thread Yijing Wang
Save msi chip in pci_sys_data instead of assign msi chip to every pci bus in .add_bus(). Signed-off-by: Yijing Wang wangyij...@huawei.com --- drivers/pci/host/pci-mvebu.c | 10 +++--- 1 files changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/pci/host/pci-mvebu.c b/drivers/pci

[PATCH v3 22/27] s390/MSI: Use MSI chip framework to configure MSI/MSI-X irq

2014-10-14 Thread Yijing Wang
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 wangyij...@huawei.com --- Hi Sebastian, I dropped the Acked-by , because this version has a lot changes compared to last. So, I

[PATCH v3 04/27] arm/MSI: Save MSI chip in pci_sys_data

2014-10-14 Thread Yijing Wang
to be initialized in pci host bridge driver. Currently, pci hostbridge drivers create pci_host_bridge in pci_create_root_bus(), and pass arch specific pci sysdata to core pci scan functions. So pci arch sysdata is good place to save msi chip. Signed-off-by: Yijing Wang wangyij...@huawei.com --- arch

[PATCH v3 05/27] PCI: tegra: Save msi chip in pci_sys_data

2014-10-14 Thread Yijing Wang
Save msi chip in pci_sys_data instead of assign msi chip to every pci bus in .add_bus(). Signed-off-by: Yijing Wang wangyij...@huawei.com --- drivers/pci/host/pci-tegra.c | 13 +++-- 1 files changed, 3 insertions(+), 10 deletions(-) diff --git a/drivers/pci/host/pci-tegra.c b/drivers

[PATCH v3 27/27] PCI/MSI: Clean up unused MSI arch functions

2014-10-14 Thread Yijing Wang
Now we use struct msi_chip in all platforms to configure MSI/MSI-X. We can clean up the unused arch functions. Signed-off-by: Yijing Wang wangyij...@huawei.com --- Hi Lucas, I dropped the reviewed-by, because this version has a lot changes compared to last one, I guess you may want to check

[PATCH v3 23/27] arm/iop13xx/MSI: Use MSI chip framework to configure MSI/MSI-X irq

2014-10-14 Thread Yijing Wang
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 wangyij...@huawei.com --- arch/arm/mach-iop13xx/include/mach/pci.h |4 arch/arm/mach-iop13xx/iq81340mc.c|3

[PATCH v3 20/27] MIPS/Xlr/MSI: Use MSI chip framework to configure MSI/MSI-X irq

2014-10-14 Thread Yijing Wang
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 wangyij...@huawei.com --- arch/mips/pci/pci-xlr.c | 17 +++-- 1 files changed, 15 insertions(+), 2 deletions(-) diff

[PATCH v3 24/27] IA64/MSI: Use MSI chip framework to configure MSI/MSI-X irq

2014-10-14 Thread Yijing Wang
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 wangyij...@huawei.com --- arch/ia64/include/asm/pci.h | 10 ++ arch/ia64/kernel/msi_ia64.c | 14 ++ arch/ia64

[PATCH v3 03/27] s390/MSI: Use __msi_mask_irq() instead of default_msi_mask_irq()

2014-10-14 Thread Yijing Wang
Now only s390/MSI use default_msi_mask_irq() and default_msix_mask_irq(), replace them with the common msi mask irq functions __msi_mask_irq() and __msix_mask_irq(). Remove default_msi_mask_irq() and default_msix_mask_irq(). Signed-off-by: Yijing Wang wangyij...@huawei.com --- arch/s390/pci

[PATCH v3 12/27] x86/MSI: Use MSI chip framework to configure MSI/MSI-X irq

2014-10-14 Thread Yijing Wang
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 wangyij...@huawei.com --- arch/x86/include/asm/pci.h | 13 + arch/x86/kernel/apic/io_apic.c | 19

Re: [PATCH v3 22/27] s390/MSI: Use MSI chip framework to configure MSI/MSI-X irq

2014-10-16 Thread Yijing Wang
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 wangyij...@huawei.com --- Hi Sebastian, I

Re: [PATCH v3 21/27] Powerpc/MSI: Use MSI chip framework to configure MSI/MSI-X irq

2014-10-17 Thread 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 Wang wangyij...@huawei.com --- Hi

Re: [PATCH v3 04/27] arm/MSI: Save MSI chip in pci_sys_data

2014-10-20 Thread Yijing Wang
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 chip. In fact, all pci devices

Re: [PATCH v3 02/27] x86/xen/MSI: Eliminate arch_msix_mask_irq() and arch_msi_mask_irq()

2014-10-22 Thread Yijing Wang
On 2014/10/23 12:25, Bjorn Helgaas wrote: On Wed, Oct 15, 2014 at 11:06:50AM +0800, Yijing Wang wrote: Commit 0e4ccb1505a9 (PCI: Add x86_msi.msi_mask_irq() and msix_mask_irq()) introduced two __weak arch functions arch_msix_mask_irq() and arch_msi_mask_irq() to work around a bug when running

Re: [PATCH v3 05/27] PCI: tegra: Save msi chip in pci_sys_data

2014-10-23 Thread Yijing Wang
On 2014/10/23 13:18, Bjorn Helgaas wrote: On Wed, Oct 15, 2014 at 11:06:53AM +0800, Yijing Wang wrote: Save msi chip in pci_sys_data instead of assign msi chip to every pci bus in .add_bus(). Signed-off-by: Yijing Wang wangyij...@huawei.com --- drivers/pci/host/pci-tegra.c | 13

Re: [PATCH v3 10/27] PCI/MSI: Remove useless bus-msi assignment

2014-10-23 Thread Yijing Wang
On 2014/10/23 13:41, Bjorn Helgaas wrote: On Wed, Oct 15, 2014 at 11:06:58AM +0800, Yijing Wang wrote: Now msi chip is saved in pci_sys_data in arm, we could clean the bus-msi assignment in pci core. Signed-off-by: Yijing Wang wangyij...@huawei.com CC: Thierry Reding thierry.red

Re: [PATCH v3 09/27] arm/PCI: Clean unused pcibios_add_bus() and pcibios_remove_bus()

2014-10-23 Thread Yijing Wang
/* * Swizzle the device pin each time we cross a bridge. If a platform does * not provide a swizzle function, we perform the standard PCI swizzling. @@ -478,8 +464,6 @@ static void pcibios_init_hw(struct device *parent, struct hw_pci *hw, sys-swizzle = hw-swizzle;

Re: [PATCH v3 00/27] Use MSI chip framework to configure MSI/MSI-X in all platforms

2014-10-23 Thread Yijing Wang
arch_get_match_msi_chip() to arch_find_msi_chip(). Drop use struct device as the msi_chip argument, we will do that later in another patchset. Yijing Wang (27): This is a lot of stuff, and it's not all related, so putting it all together in one series makes it hard for me to deal

[PATCH 11/16] s390/MSI: Use MSI controller framework to configure MSI/MSI-X irq

2014-10-27 Thread Yijing Wang
Use MSI controller 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 wangyij...@huawei.com Acked-by: Sebastian Ott seb...@linux.vnet.ibm.com --- arch/s390/include/asm/pci.h |1 + arch/s390/pci

[PATCH 13/16] IA64/MSI: Use MSI controller framework to configure MSI/MSI-X irq

2014-10-27 Thread Yijing Wang
Use MSI controller 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 wangyij...@huawei.com --- arch/ia64/include/asm/pci.h |3 ++- arch/ia64/kernel/msi_ia64.c | 24

[PATCH 07/16] MIPS/Octeon/MSI: Use MSI controller framework to configure MSI/MSI-X irq

2014-10-27 Thread Yijing Wang
Use MSI controller 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 wangyij...@huawei.com --- arch/mips/include/asm/octeon/pci-octeon.h |4 +++ arch/mips/pci/msi-octeon.c

[PATCH 10/16] Powerpc/MSI: Use MSI controller framework to configure MSI/MSI-X irq

2014-10-27 Thread Yijing Wang
Use MSI controller 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 wangyij...@huawei.com Acked-by: Michael Ellerman m...@ellerman.id.au --- arch/powerpc/include/asm/pci-bridge.h |8

[PATCH 16/16] PCI/MSI: Clean up unused MSI arch functions

2014-10-27 Thread Yijing Wang
Now we use MSI controller in all platforms to configure MSI/MSI-X. We can clean up the unused arch functions. Signed-off-by: Yijing Wang wangyij...@huawei.com Reviewed-by: Lucas Stach l.st...@pengutronix.de --- drivers/pci/msi.c | 90

[PATCH 00/16] Use MSI controller framework to configure MSI/MSI-X

2014-10-27 Thread Yijing Wang
/21] x86/xen/MSI: Eliminate..., export msi_chip instead of #ifdef to fix MSI bug in xen running in x86. Rename arch_get_match_msi_chip() to arch_find_msi_chip(). Drop use struct device as the msi_chip argument, we will do that later in another patchset. Yijing Wang (16): PCI/MSI: Refactor MSI

[PATCH 04/16] Irq_remapping/MSI: Use MSI controller framework to configure MSI/MSI-X irq

2014-10-27 Thread Yijing Wang
Use MSI controller 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 wangyij...@huawei.com --- drivers/iommu/irq_remapping.c | 11 --- 1 files changed, 8 insertions(+), 3 deletions

[PATCH 06/16] Mips/MSI: Save MSI controller in pci sysdata

2014-10-27 Thread Yijing Wang
Save MSI controller in pci sysdata, add arch pcibios_msi_controller() to extract out MSI controller. Signed-off-by: Yijing Wang wangyij...@huawei.com --- arch/mips/include/asm/pci.h |3 +++ arch/mips/pci/pci.c |9 + 2 files changed, 12 insertions(+), 0 deletions(-) diff

[PATCH 09/16] MIPS/Xlr/MSI: Use MSI controller framework to configure MSI/MSI-X irq

2014-10-27 Thread Yijing Wang
Use MSI controller 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 wangyij...@huawei.com --- arch/mips/pci/pci-xlr.c | 17 +++-- 1 files changed, 15 insertions(+), 2 deletions

[PATCH 08/16] MIPS/Xlp/MSI: Use MSI controller framework to configure MSI/MSI-X irq

2014-10-27 Thread Yijing Wang
Use MSI controller 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 wangyij...@huawei.com --- arch/mips/include/asm/netlogic/xlp-hal/pcibus.h |1 + arch/mips/pci/msi-xlp.c

[PATCH 14/16] Sparc/MSI: Use MSI controller framework to configure MSI/MSI-X irq

2014-10-27 Thread Yijing Wang
Use MSI controller 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 wangyij...@huawei.com Acked-by: David S. Miller da...@davemloft.net --- arch/sparc/kernel/pci.c | 20

[PATCH 05/16] x86/MSI: Remove unused MSI weak arch functions

2014-10-27 Thread Yijing Wang
Now we can clean up MSI weak arch functions in x86. Signed-off-by: Yijing Wang wangyij...@huawei.com --- arch/x86/include/asm/pci.h |5 + arch/x86/include/asm/x86_init.h |4 arch/x86/kernel/apic/io_apic.c | 21 + arch/x86/kernel/x86_init.c | 24

[PATCH 15/16] tile/MSI: Use MSI controller framework to configure MSI/MSI-X irq

2014-10-27 Thread Yijing Wang
Use MSI controller 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 wangyij...@huawei.com --- arch/tile/include/asm/pci.h |2 ++ arch/tile/kernel/pci_gx.c | 18 -- 2 files

[PATCH 12/16] arm/iop13xx/MSI: Use MSI controller framework to configure MSI/MSI-X irq

2014-10-27 Thread Yijing Wang
Use MSI controller 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 wangyij...@huawei.com --- arch/arm/mach-iop13xx/include/mach/pci.h |4 arch/arm/mach-iop13xx/iq81340mc.c|3

[PATCH 03/16] x86/xen/MSI: Use MSI controller framework to configure MSI/MSI-X irq

2014-10-27 Thread Yijing Wang
Use MSI controller 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 wangyij...@huawei.com CC: David Vrabel david.vra...@citrix.com CC: Konrad Rzeszutek Wilk konrad.w...@oracle.com --- arch/x86

[PATCH 02/16] x86/MSI: Use MSI controller framework to configure MSI/MSI-X irq

2014-10-27 Thread Yijing Wang
Use MSI controller 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 wangyij...@huawei.com --- arch/x86/include/asm/pci.h |4 arch/x86/kernel/apic/io_apic.c | 25

<    1   2