[PATCH v1 05/21] PCI/MSI: Introduce weak arch_find_msi_chip() to find MSI chip

2014-09-05 Thread Yijing Wang
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 bus to msi_chip help pci device to find the match msi_chip and setup MSI/MSI-X irq

[PATCH v1 03/21] MSI: Remove the redundant irq_set_chip_data()

2014-09-05 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 v1 10/21] x86/MSI: Remove unused MSI weak arch functions

2014-09-05 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 v1 09/21] Irq_remapping/MSI: Use MSI chip framework to configure MSI/MSI-X irq

2014-09-05 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 |8 +++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git

[PATCH v1 08/21] x86/xen/MSI: Use MSI chip framework to configure MSI/MSI-X irq

2014-09-05 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 CC: Konrad Rzeszutek Wilk konrad.w...@oracle.com --- arch/x86/pci/xen.c | 46

[PATCH v1 17/21] arm/iop13xx/MSI: Use MSI chip framework to configure MSI/MSI-X irq

2014-09-05 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 |2 ++ arch/arm/mach-iop13xx/iq81340mc.c|1 +

[PATCH v1 16/21] s390/MSI: Use MSI chip framework to configure MSI/MSI-X irq

2014-09-05 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/s390/pci/pci.c | 18 ++ 1 files changed, 14 insertions(+), 4 deletions(-) diff

[PATCH v1 13/21] MIPS/Xlp/MSI: Use MSI chip framework to configure MSI/MSI-X irq

2014-09-05 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 v1 19/21] Sparc/MSI: Use MSI chip framework to configure MSI/MSI-X irq

2014-09-05 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 v1 15/21] Powerpc/MSI: Use MSI chip framework to configure MSI/MSI-X irq

2014-09-05 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/powerpc/kernel/msi.c | 14 -- 1 files changed, 12 insertions(+), 2 deletions(-) diff

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

2014-09-05 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 v1 21/21] PCI/MSI: Clean up unused MSI arch functions

2014-09-05 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 --- drivers/iommu/irq_remapping.c |2 +- drivers/pci/msi.c | 99 -

[PATCH v1 01/21] PCI/MSI: Clean up struct msi_chip argument

2014-09-05 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 v1 02/21] PCI/MSI: Remove useless bus-msi assignment

2014-09-05 Thread Yijing Wang
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() is useless. Signed-off-by: Yijing Wang wangyij...@huawei.com CC: Thierry Reding

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

2014-09-05 Thread Sergei Shtylyov
Hello. On 9/5/2014 2:10 PM, 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 --- arch/powerpc/kernel/msi.c | 14 -- 1

[PATCH 03/12] iommu/amd: Convert to iommu_capable() API function

2014-09-05 Thread Joerg Roedel
From: Joerg Roedel jroe...@suse.de Signed-off-by: Joerg Roedel jroe...@suse.de --- drivers/iommu/amd_iommu.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c index ecb0109..7de9276 100644 ---

[PATCH 12/12] iommu: Remove iommu_domain_has_cap() API function

2014-09-05 Thread Joerg Roedel
From: Joerg Roedel jroe...@suse.de Signed-off-by: Joerg Roedel jroe...@suse.de --- drivers/iommu/iommu.c | 13 - include/linux/iommu.h | 11 --- 2 files changed, 24 deletions(-) diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c index 319d40e..41c6a7d 100644 ---

[PATCH 00/12] iommu: Convert iommu_domain_has_cap() to iommu_capable()

2014-09-05 Thread Joerg Roedel
Hi, this patch-set removes the iommu_domain_has_cap() function from the IOMMU-API and replaces it with the new iommu_capable() function. The capabilities that can be queried with the iommu_domain_has_cap() function are not domain specific, but specific to the IOMMUs in the system, so they are

[PATCH 05/12] iommu/fsl: Convert to iommu_capable() API function

2014-09-05 Thread Joerg Roedel
From: Joerg Roedel jroe...@suse.de Cc: Varun Sethi varun.se...@freescale.com Signed-off-by: Joerg Roedel jroe...@suse.de --- drivers/iommu/fsl_pamu_domain.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/iommu/fsl_pamu_domain.c b/drivers/iommu/fsl_pamu_domain.c

[PATCH 11/12] IB/usnic: Convert to use new iommu_capable() API function

2014-09-05 Thread Joerg Roedel
From: Joerg Roedel jroe...@suse.de Cc: Upinder Malhi uma...@cisco.com Signed-off-by: Joerg Roedel jroe...@suse.de --- drivers/infiniband/hw/usnic/usnic_uiom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/hw/usnic/usnic_uiom.c

[PATCH 09/12] kvm: iommu: Convert to use new iommu_capable() API function

2014-09-05 Thread Joerg Roedel
From: Joerg Roedel jroe...@suse.de Cc: Gleb Natapov g...@kernel.org Cc: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Joerg Roedel jroe...@suse.de --- virt/kvm/iommu.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/virt/kvm/iommu.c b/virt/kvm/iommu.c index

[PATCH 07/12] iommu/msm: Convert to iommu_capable() API function

2014-09-05 Thread Joerg Roedel
From: Joerg Roedel jroe...@suse.de Signed-off-by: Joerg Roedel jroe...@suse.de --- drivers/iommu/msm_iommu.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/iommu/msm_iommu.c b/drivers/iommu/msm_iommu.c index 49f41d6..6e3dcc28 100644 ---

[PATCH 01/12] iommu: Introduce iommu_capable API function

2014-09-05 Thread Joerg Roedel
From: Joerg Roedel jroe...@suse.de This function will replace the current iommu_domain_has_cap function and clean up the interface while at it. Signed-off-by: Joerg Roedel jroe...@suse.de --- drivers/iommu/iommu.c | 18 +++--- include/linux/iommu.h | 7 +++ 2 files changed, 22

[PATCH 10/12] vfio: Convert to use new iommu_capable() API function

2014-09-05 Thread Joerg Roedel
From: Joerg Roedel jroe...@suse.de Cc: Alex Williamson alex.william...@redhat.com Signed-off-by: Joerg Roedel jroe...@suse.de --- drivers/vfio/vfio_iommu_type1.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/vfio/vfio_iommu_type1.c

[PATCH 02/12] iommu: Convert iommu-caps from define to enum

2014-09-05 Thread Joerg Roedel
From: Joerg Roedel jroe...@suse.de Allow compile-time type-checking. Signed-off-by: Joerg Roedel jroe...@suse.de --- drivers/iommu/iommu.c | 2 +- include/linux/iommu.h | 11 +++ 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/drivers/iommu/iommu.c

[PATCH 04/12] iommu/arm-smmu: Convert to iommu_capable() API function

2014-09-05 Thread Joerg Roedel
From: Joerg Roedel jroe...@suse.de Cc: Will Deacon will.dea...@arm.com Signed-off-by: Joerg Roedel jroe...@suse.de --- drivers/iommu/arm-smmu.c | 35 ++- 1 file changed, 26 insertions(+), 9 deletions(-) diff --git a/drivers/iommu/arm-smmu.c

[PATCH 08/12] iommu/tegra: Convert to iommu_capable() API function

2014-09-05 Thread Joerg Roedel
From: Joerg Roedel jroe...@suse.de Cc: Hiroshi Doyu hd...@nvidia.com Signed-off-by: Joerg Roedel jroe...@suse.de --- drivers/iommu/tegra-gart.c | 7 +++ drivers/iommu/tegra-smmu.c | 7 +++ 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/drivers/iommu/tegra-gart.c

Re: [PATCH 2/2] iommu/omap: Fix iommu archdata name for DT-based devices

2014-09-05 Thread Laurent Pinchart
Hi Suman, On Thursday 04 September 2014 16:17:53 Suman Anna wrote: Hi Laurent, On Wednesday 03 September 2014 18:58:32 Suman Anna wrote: A device is tied to an iommu through its archdata field. The archdata is allocated on the fly for DT-based devices automatically through the

Re: [PATCHv2 2/2] iommu/omap: Fix iommu archdata name for DT-based devices

2014-09-05 Thread Laurent Pinchart
Hi Suman, Thank you for the patch. On Thursday 04 September 2014 17:27:30 Suman Anna wrote: A device is tied to an iommu through its archdata field. The archdata is allocated on the fly for DT-based devices automatically through the .add_device iommu ops. The current logic incorrectly

RE: [PATCH v1 1/1] iommu/amd: set iommu for early mapped ioapic/hpet

2014-09-05 Thread Su, Friendy
Hi, Joerg, -Original Message- From: j...@8bytes.org [mailto:j...@8bytes.org] Sent: Wednesday, September 03, 2014 11:06 PM To: Su, Friendy Cc: iommu@lists.linux-foundation.org; linux-ker...@vger.kernel.org Subject: Re: [PATCH v1 1/1] iommu/amd: set iommu for early mapped ioapic/hpet

[PATCH v2 1/1] iommu/amd: set iommu for early mapped ioapic/hpet

2014-09-05 Thread Su, Friendy
From: Su Friendy friendy...@sony.com.cn Subject: iommu/amd: make early mapped ioapic/hpet override IVHD The early mapped ioapic/hpet specified by kernel boot parameter ivrs_ioapic[ID]/ivrs_hpet[ID] always override the ioapic/hpet with same ID reported by ACPI IVHD table. Current driver still

Re: [PATCHv2 0/2] OMAP IOMMU Fixes for DT-clients

2014-09-05 Thread Joerg Roedel
On Thu, Sep 04, 2014 at 05:27:28PM -0500, Suman Anna wrote: Suman Anna (2): iommu/omap: Check for valid archdata in attach_dev iommu/omap: Fix iommu archdata name for DT-based devices drivers/iommu/omap-iommu.c | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-)

Re: [PATCH v2] iommu/fsl: Fix warning resulting from adding PCI device twice

2014-09-05 Thread Joerg Roedel
On Thu, Sep 04, 2014 at 05:08:45PM +0530, Varun Sethi wrote: iommu_group_get_for_dev determines the iommu group for the PCI device and adds the device to the group. In the PAMU driver we were again adding the device to the same group without checking if the device already had an iommu

Re: [Xen-devel] [PATCH v1 08/21] x86/xen/MSI: Use MSI chip framework to configure MSI/MSI-X irq

2014-09-05 Thread David Vrabel
On 05/09/14 11:09, 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. [...] --- a/arch/x86/pci/xen.c +++ b/arch/x86/pci/xen.c [...] @@ -418,9 +430,9 @@ int __init pci_xen_init(void)

Re: ath9k and AMD IOMMU alias breakage on 3.16?

2014-09-05 Thread Alex Williamson
On Fri, 2014-09-05 at 20:00 -0700, Jason Newton wrote: Hi, I have an AR9462 connected over minipcie, it came with the ASRock FM2A88x-itx motherboard and I'm using an AMD A10-7850K cpu with it. When I have IOMMU enabled, and this is desirable for opencl related things, the AR9462