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 malfu

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

2014-09-05 Thread wangyijing
> 在 2014年9月5日,18:47,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 >> --- >> arch/po

Re: [RFC PATCH v2 2/7] dma-mapping: replace set_arch_dma_coherent_ops with arch_setup_dma_ops

2014-09-05 Thread Grygorii Strashko
Hi Will, On 09/02/2014 08:56 PM, Will Deacon wrote: > set_arch_dma_coherent_ops is called from of_dma_configure in order to > swizzle the architectural dma-mapping functions over to a cache-coherent > implementation. This is currently implemented only for ARM. > > In anticipation of re-using this

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

2014-09-05 Thread wangyijing
> 在 2014年9月5日,18:42,Sergei Shtylyov 写道: > > Hello. > >> On 9/5/2014 2:09 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 >> --- >> drivers/

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: [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: [PATCH v2 1/1] iommu/amd: set iommu for early mapped ioapic/hpet

2014-09-05 Thread Joerg Roedel
On Fri, Sep 05, 2014 at 07:25:14PM +0800, Su, Friendy wrote: > This issue is found on a mother board whose BIOS reports wrong > IOAPIC devid in IVHD table. Without this fix, the early mapped > does not really override IVHD. So that the wrong reported IOAPIC > does not work. The problem you describ

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

2014-09-05 Thread Sergei Shtylyov
On 9/5/2014 3:33 PM, wangyijing 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 --- arch/powerpc/kernel/msi.c | 14 -- 1 files changed, 12 insertions(+),

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

2014-09-05 Thread Su, Friendy
From: Su Friendy 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 uses devid in IVHD to se

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 > ioapi

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 assig

Re: [PATCHv2 1/2] iommu/omap: Check for valid archdata in attach_dev

2014-09-05 Thread Laurent Pinchart
Hi Suman, Thank you for the patch. On Thursday 04 September 2014 17:27:29 Suman Anna wrote: > Any device requiring to be attached to an iommu_domain must have > valid archdata containing the necessary iommu information, which > is SoC-specific. Add a check in the omap_iommu_attach_dev to make > s

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 >

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

2014-09-05 Thread Joerg Roedel
From: Joerg Roedel Cc: Hiroshi Doyu Signed-off-by: Joerg Roedel --- 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 b/drivers/iommu/tegra-gart.c index b10a8ec..6f44ebb 1006

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

2014-09-05 Thread Joerg Roedel
From: Joerg Roedel Cc: Alex Williamson Signed-off-by: Joerg Roedel --- drivers/vfio/vfio_iommu_type1.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/vfio/vfio_iommu_type1.c b/drivers/vfio/vfio_iommu_type1.c index 0734fbe..562f686 100644 --- a/drivers/vfio/vfio

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

2014-09-05 Thread Joerg Roedel
From: Joerg Roedel Cc: Will Deacon Signed-off-by: Joerg Roedel --- drivers/iommu/arm-smmu.c | 35 ++- 1 file changed, 26 insertions(+), 9 deletions(-) diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c index ca18d6d..47c2cb6 100644 --- a/drivers/i

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

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

[PATCH 06/12] iommu/vt-d: Convert to iommu_capable() API function

2014-09-05 Thread Joerg Roedel
From: Joerg Roedel Cc: Jiang Liu Cc: David Woodhouse Signed-off-by: Joerg Roedel --- drivers/iommu/intel-iommu.c | 13 + 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index 5619f26..bc1a203 100644 --- a/driv

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

2014-09-05 Thread Joerg Roedel
From: Joerg Roedel Cc: Upinder Malhi Signed-off-by: Joerg Roedel --- 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 b/drivers/infiniband/hw/usnic/usnic_uiom.c index 801a1d6..417de1f 100644 -

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

2014-09-05 Thread Joerg Roedel
From: Joerg Roedel Cc: Gleb Natapov Cc: Paolo Bonzini Signed-off-by: Joerg Roedel --- 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 714b949..45ee080 100644 --- a/virt/kvm/iommu.c +++ b/virt/kvm/iommu.c @@ -

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

2014-09-05 Thread Joerg Roedel
From: Joerg Roedel Signed-off-by: Joerg Roedel --- 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 --- a/drivers/iommu/msm_iommu.c +++ b/drivers/iommu/msm_io

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

2014-09-05 Thread Joerg Roedel
From: Joerg Roedel Allow compile-time type-checking. Signed-off-by: Joerg Roedel --- drivers/iommu/iommu.c | 2 +- include/linux/iommu.h | 11 +++ 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c index 1bc882e..319d40e 100644

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

2014-09-05 Thread Joerg Roedel
From: Joerg Roedel Signed-off-by: Joerg Roedel --- 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 --- a/drivers/iommu/iommu.c +++ b/drive

[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 not

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

2014-09-05 Thread Joerg Roedel
From: Joerg Roedel Signed-off-by: Joerg Roedel --- 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 --- a/drivers/iommu/amd_iommu.c +++ b/drivers/iommu/am

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

2014-09-05 Thread Joerg Roedel
From: Joerg Roedel Cc: Varun Sethi Signed-off-by: Joerg Roedel --- 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 index 61d1daf..f43a80d 100644 --- a/drivers/iommu/fsl_pa

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 --- arch/powerpc/kernel/msi.c | 14 -- 1 files changed, 12 inser

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

2014-09-05 Thread Sergei Shtylyov
Hello. On 9/5/2014 2:09 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 --- drivers/iommu/irq_remapping.c |8 +++- 1 files changed, 7 insertio

[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 CC: Thierry Reding CC: Thomas Petazzoni --- drivers/irqchip/irq-armada-370-xp.c | 12 +---

[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 CC: Thierry Reding CC: Thomas Petazzoni --- drivers/pci/probe.c |

[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 --- arch/tile/kernel/pci_gx.c | 14 -- 1 files changed, 12 insertions(+), 2 deletions(-) diff --git a/arch/tile/kernel

[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 --- drivers/iommu/irq_remapping.c |2 +- drivers/pci/msi.c | 99 - include/linux/msi.h |

[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 --- arch/sparc/kernel/pci.c | 14 -- 1 files changed, 12 insertions(+), 2 deletions(-) diff --git a/arch/sparc/kernel/

[PATCH v1 12/21] MIPS/Xlp: Remove the dead function destroy_irq() to fix build error

2014-09-05 Thread Yijing Wang
Commit 465665f78a7 ("mips: Kill pointless destroy_irq()") removed the destroy_irq(). So remove the leftover one in xlp_setup_msix() to fix build error. arch/mips/pci/msi-xlp.c: In function 'xlp_setup_msix': arch/mips/pci/msi-xlp.c:447:3: error: implicit declaration of function 'destroy_irq'.. cc1

[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 --- arch/s390/pci/pci.c | 18 ++ 1 files changed, 14 insertions(+), 4 deletions(-) diff --git a/arch/s390/pci/pci.

[PATCH v1 14/21] MIPS/Xlr/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 --- arch/mips/pci/pci-xlr.c | 15 +-- 1 files changed, 13 insertions(+), 2 deletions(-) diff --git a/arch/mips/pci/pci

[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 --- arch/mips/pci/msi-xlp.c | 14 -- 1 files changed, 12 insertions(+), 2 deletions(-) diff --git a/arch/mips/pci/msi-

[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 --- arch/powerpc/kernel/msi.c | 14 -- 1 files changed, 12 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/ker

[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 CC: Konrad Rzeszutek Wilk --- arch/x86/pci/xen.c | 46 ++ 1 files changed, 30 insertio

[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 --- arch/arm/mach-iop13xx/include/mach/pci.h |2 ++ arch/arm/mach-iop13xx/iq81340mc.c|1 + arch/arm/mach-iop13xx/iq81

[PATCH v1 18/21] IA64/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 --- arch/ia64/kernel/msi_ia64.c | 18 ++ 1 files changed, 14 insertions(+), 4 deletions(-) diff --git a/arch/ia64/

[PATCH v1 06/21] PCI/MSI: Refactor struct msi_chip to make it become more common

2014-09-05 Thread Yijing Wang
Now there are a lot of __weak arch functions in MSI code. These functions make MSI driver complex. Thierry Reding Introduced a new MSI chip framework to configure MSI/MSI-X irq in ARM. Use the new MSI chip framework to refactor all other platform MSI arch code to eliminate weak arch MSI functions.

[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 --- drivers/iommu/irq_remapping.c |8 +++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/drivers/iommu/irq_r

[PATCH v1 00/21] Use MSI chip to configure MSI/MSI-X in all platforms

2014-09-05 Thread Yijing Wang
This series is based Bjorn's pci-next branch + Alexander Gordeev's two patches "Remove arch_msi_check_device()" link: https://lkml.org/lkml/2014/7/12/41 Currently, there are a lot of weak arch functions in MSI code. Thierry Reding Introduced MSI chip framework to configure MSI/MSI-X in arm. This s

[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 --- 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 drivers/iommu/ir

[PATCH v1 11/21] MIPS/Octeon/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 --- arch/mips/pci/msi-octeon.c | 35 ++- 1 files changed, 22 insertions(+), 13 deletions(-) diff -

[PATCH v1 04/21] x86/xen/MSI: Eliminate arch_msix_mask_irq() and arch_msi_mask_irq()

2014-09-05 Thread Yijing Wang
Commit 0e4ccb150 added two __weak arch functions arch_msix_mask_irq() and arch_msi_mask_irq() to fix a bug found when running xen in x86. Introduced these two funcntions make MSI code complex. And mask/unmask is the irq actions related to interrupt controller, should not use weak arch functions to

[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 correctl

[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 --- drivers/pci/msi.c |2 --

[PATCH v1 07/21] x86/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 --- arch/x86/include/asm/pci.h |1 + arch/x86/kernel/apic/io_apic.c | 12 2 files changed, 13 insertions(+), 0