[PATCH] iommu/arm-smmu-v2: Workaround for ThunderX errata#27704

2016-02-24 Thread Tirumalesh Chalamarla
Due to Errata#27704 CN88xx SMMUv2,supports only shared ASID and VMID namespaces; specifically within a given node SMMU0 and SMMU1 share, as does SMMU2 and SMMU3. This patch address these issuee by supplying asid and vmid while calculating ASID and VMID for Thunder SMMUv2. NOTE: resending with

[PATCH v4 6/6] PCI: Squash pci_dev_flags to remove holes

2016-02-24 Thread Bjorn Helgaas via iommu
From: Jacek Lawrynowicz After removing PCI_DEV_FLAGS_DMA_ALIAS_DEVFN, the (1 << 4) value was unused. Squash the other values so all the bits are adjacent. No functional change intended. (I'm not sure this is worth doing. We have 16 flag bits and we're not even

[PATCH v4 5/6] pci: Add DMA alias quirk for mic_x200_dma

2016-02-24 Thread Bjorn Helgaas via iommu
From: Jacek Lawrynowicz MIC x200 NTB forwards PCIe traffic using multiple alien RID. They have to be added as aliases to the DMA device in order to allow buffer access when IOMMU is enabled. Signed-off-by: Jacek Lawrynowicz Acked-by:

[PATCH v4 4/6] PCI: Rename dma_alias_is_enabled() to pci_devs_are_dma_aliases()

2016-02-24 Thread Bjorn Helgaas via iommu
This should be folded into the previous patch. I left it separate to show the interface difference more clearly. Also, pci_devs_are_dma_aliases() uses PCI internals (dma_alias_mask), so I think it should be in PCI code instead of in IOMMU code. That would mean both it and pci_add_dma_alias()

[PATCH v4 0/6] PCI: Support multiple DMA aliases

2016-02-24 Thread Bjorn Helgaas via iommu
This is a revision of Jacek's v3 posting: http://lkml.kernel.org/r/1454152012-46337-1-git-send-email-jacek.lawrynow...@intel.com The changes from v3 are: - Split into smaller patches for reviewability - Move printk when adding DMA alias - Change dma_alias_is_enabled() interface to take two

[PATCH v4 1/6] PCI: Add pci_add_dma_alias() to abstract implementation

2016-02-24 Thread Bjorn Helgaas via iommu
From: Jacek Lawrynowicz Add a pci_add_dma_alias() interface to encapsulate the details of adding an alias. No functional change intended. --- drivers/pci/pci.c| 14 ++ drivers/pci/pci.h|2 ++ drivers/pci/quirks.c | 19 +++

[PATCH v4 2/6] PCI: Move informational printk to pci_add_dma_alias()

2016-02-24 Thread Bjorn Helgaas via iommu
From: Jacek Lawrynowicz One of the quirks that adds DMA aliases logs an informational message in dmesg. Move that to pci_add_dma_alias() so all users log the message consistently. No functional change intended (except extra message). --- drivers/pci/pci.c|

[PATCH v4 3/6] PCI: Add support for multiple DMA aliases

2016-02-24 Thread Bjorn Helgaas via iommu
From: Jacek Lawrynowicz --- drivers/iommu/iommu.c | 17 ++--- drivers/pci/pci.c | 11 +-- drivers/pci/probe.c |1 + drivers/pci/search.c | 14 +- include/linux/pci.h |4 +--- 5 files changed, 30 insertions(+),

[PATCH V3] iommu/arm-smmu-v2: Workaround for ThunderX errata#27704

2016-02-24 Thread Tirumalesh Chalamarla
Due to Errata#27704 CN88xx SMMUv2,supports only shared ASID and VMID namespaces; specifically within a given node SMMU0 and SMMU1 share, as does SMMU2 and SMMU3. This patch tries to address these issuee by supplying asid and vmid base from devicetree. changes from V2: - removed *_base

Re: [PATCH V2] iommu/arm-smmu-v2: Workaround for ThunderX errata#27704

2016-02-24 Thread Tirumalesh Chalamarla
On 02/24/2016 11:10 AM, Mark Rutland wrote: On Wed, Feb 24, 2016 at 03:54:48PM +, Chalamarla, Tirumalesh wrote: On 2/24/16, 3:32 AM, "Mark Rutland" wrote: On Tue, Feb 23, 2016 at 03:50:21PM -0800, Tirumalesh Chalamarla wrote: in Summary, if i change asid-base

Re: [PATCH V2] iommu/arm-smmu-v2: Workaround for ThunderX errata#27704

2016-02-24 Thread Mark Rutland
On Wed, Feb 24, 2016 at 03:54:48PM +, Chalamarla, Tirumalesh wrote: > > On 2/24/16, 3:32 AM, "Mark Rutland" wrote: > > >On Tue, Feb 23, 2016 at 03:50:21PM -0800, Tirumalesh Chalamarla wrote: > >> in Summary, > >> > >> if i change asid-base to cavium,asid-base and

Re: [PATCH V2] iommu/arm-smmu-v2: Workaround for ThunderX errata#27704

2016-02-24 Thread Tirumalesh Chalamarla
On 02/24/2016 05:38 AM, Robin Murphy wrote: On 23/02/16 23:56, Tirumalesh Chalamarla wrote: On 02/23/2016 04:19 AM, Robin Murphy wrote: On 18/02/16 18:29, tchalama...@caviumnetworks.com wrote: From: Tirumalesh Chalamarla Due to Errata#27704 CN88xx

Re: [PATCH V2] iommu/arm-smmu-v2: Workaround for ThunderX errata#27704

2016-02-24 Thread Chalamarla, Tirumalesh
On 2/24/16, 3:32 AM, "Mark Rutland" wrote: >On Tue, Feb 23, 2016 at 03:50:21PM -0800, Tirumalesh Chalamarla wrote: >> in Summary, >> >> if i change asid-base to cavium,asid-base and still use DT for >> supplying base value, is this a solution that will be accepted, >

Re: [PATCH V2] iommu/arm-smmu-v2: Workaround for ThunderX errata#27704

2016-02-24 Thread Robin Murphy
On 23/02/16 23:56, Tirumalesh Chalamarla wrote: On 02/23/2016 04:19 AM, Robin Murphy wrote: On 18/02/16 18:29, tchalama...@caviumnetworks.com wrote: From: Tirumalesh Chalamarla Due to Errata#27704 CN88xx SMMUv2,supports only shared ASID and VMID namespaces;

Re: [PATCH V2] iommu/arm-smmu-v2: Workaround for ThunderX errata#27704

2016-02-24 Thread Mark Rutland
On Tue, Feb 23, 2016 at 03:50:21PM -0800, Tirumalesh Chalamarla wrote: > in Summary, > > if i change asid-base to cavium,asid-base and still use DT for > supplying base value, is this a solution that will be accepted, No. The property is _insufficient_, regardless of its name. This has been