Re: [PATCH] iommu/arm-smmu-v3: Cope with duplicated Stream IDs

2018-01-02 Thread Jayachandran C
and most self-contained way to deal with it. > > > > Fixes: 8f78515425da ("iommu/arm-smmu: Implement of_xlate() for SMMUv3") > > Reported-by: Tomasz Nowicki > > Tested-by: Tomasz Nowicki > > Tested-by: Jayachandran C. > > Signed-off-by: Robin Murphy

Re: [PATCH V1 0/1] Fix kernel panic caused by device ID duplication presented to the IOMMU

2017-12-27 Thread Jayachandran C
dged PCI devices may end up with duplicated IDs */ > + for (j = 0; j < i; j++) > + if (fwspec->ids[j] == sid) > + break; > + if (j < i) > + continue; > + > arm_smmu_write_strtab

Re: Fwd: [PATCH v7 2/3] iommu/arm-smmu-v3: Add workaround for Cavium ThunderX2 erratum #74

2017-06-12 Thread Jayachandran C
On Fri, Jun 09, 2017 at 04:43:07PM +0100, Robin Murphy wrote: > On 09/06/17 12:38, Jayachandran C wrote: > > On Fri, Jun 09, 2017 Robin Murphy wrote: > >> > >> On 30/05/17 13:03, Geetha sowjanya wrote: > >>> From: Linu Cherian > >>> > >>

Re: Fwd: [PATCH v7 2/3] iommu/arm-smmu-v3: Add workaround for Cavium ThunderX2 erratum #74

2017-06-09 Thread Jayachandran C
On Fri, Jun 09, 2017 Robin Murphy wrote: > > On 30/05/17 13:03, Geetha sowjanya wrote: > > From: Linu Cherian > > > > Cavium ThunderX2 SMMU implementation doesn't support page 1 register space > > and PAGE0_REGS_ONLY option is enabled as an errata workaround. > > This option when turned on, repla

Re: [PATCH 1/3] arm64: Add MIDR values for Cavium cn99xx SoCs

2017-04-27 Thread Jayachandran C.
On Thu, Apr 27, 2017 at 5:16 PM, Geetha sowjanya wrote: > From: Geetha > > Add MIDR values for Cavium cn99xx SoCs > > Signed-off-by: Geetha > --- > arch/arm64/include/asm/cputype.h | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/arch/arm64/include/asm/cputype.h > b/arch/arm64/inclu

Re: [PATCH v5 2/2] PCI: quirks: Fix ThunderX2 dma alias handling

2017-04-25 Thread Jayachandran C
On Fri, Apr 21, 2017 at 12:57:05PM -0500, Bjorn Helgaas wrote: > On Fri, Apr 21, 2017 at 05:05:41PM +0000, Jayachandran C wrote: > > On Fri, Apr 21, 2017 at 10:48:15AM -0500, Bjorn Helgaas wrote: > > > On Mon, Apr 17, 2017 at 12:47 PM, Jayachandran C > > > wrote: >

Re: [PATCH v5 2/2] PCI: quirks: Fix ThunderX2 dma alias handling

2017-04-21 Thread Jayachandran C
On Fri, Apr 21, 2017 at 10:48:15AM -0500, Bjorn Helgaas wrote: > On Mon, Apr 17, 2017 at 12:47 PM, Jayachandran C > wrote: > > On Fri, Apr 14, 2017 at 09:00:06PM -0500, Bjorn Helgaas wrote: > >> On Fri, Apr 14, 2017 at 4:06 PM, Jayachandran C > >> wrote: > >&g

Re: [PATCH v5 2/2] PCI: quirks: Fix ThunderX2 dma alias handling

2017-04-17 Thread Jayachandran C
On Fri, Apr 14, 2017 at 09:00:06PM -0500, Bjorn Helgaas wrote: > On Fri, Apr 14, 2017 at 4:06 PM, Jayachandran C > wrote: > > On Thu, Apr 13, 2017 at 07:19:11PM -0500, Bjorn Helgaas wrote: > >> I tentatively applied both patches to pci/host-thunder for v4.12. > >>

Re: [PATCH v5 2/2] PCI: quirks: Fix ThunderX2 dma alias handling

2017-04-14 Thread Jayachandran C
On Thu, Apr 13, 2017 at 07:19:11PM -0500, Bjorn Helgaas wrote: > I tentatively applied both patches to pci/host-thunder for v4.12. > > However, I am concerned about the topology here: > > On Thu, Apr 13, 2017 at 08:30:45PM +0000, Jayachandran C wrote: > > On Cavium Thunder

[PATCH v5 1/2] PCI: Add device flag PCI_DEV_FLAGS_BRIDGE_XLATE_ROOT

2017-04-13 Thread Jayachandran C
as() works correctly. The function pci_for_each_dma_alias() is updated to stop when it see a bridge with this flag set. Signed-off-by: Jayachandran C Reviewed-by: Robin Murphy Acked-by: David Daney --- drivers/pci/search.c | 4 include/linux/pci.h | 2 ++ 2 files changed, 6 insertions(+)

[PATCH v5 2/2] PCI: quirks: Fix ThunderX2 dma alias handling

2017-04-13 Thread Jayachandran C
as for the endpoint is also used by the ARM GICv3 MSI-X code. Without this quirk, the GIC Interrupt Translation Tables are setup with the invalid Requester ID, and the MSI-X generated by the device fails to be translated and routed. Signed-off-by: Jayachandran C Reviewed-by: Robin Murphy Acked

[PATCH v5 0/2] Handle Cavium ThunderX2 PCI topology quirk

2017-04-13 Thread Jayachandran C
new address of author v2>v3: - changed device flag name from PCI_DEV_FLAGS_DMA_ALIAS_ROOT to PCI_DEV_FLAGS_BRIDGE_XLATE_ROOT - updated commit message to make the quirk clearer. Jayachandran C (2): PCI: Add device flag PCI_DEV_FLAGS_BRIDGE_XLATE_ROOT PCI: quirks: Fix ThunderX2 dma

Re: [PATCH v4 2/2] PCI: quirks: Fix ThunderX2 dma alias handling

2017-04-12 Thread Jayachandran C
On Wed, Apr 12, 2017 at 02:11:38PM -0500, Bjorn Helgaas wrote: > On Wed, Apr 12, 2017 at 06:10:34PM +0000, Jayachandran C wrote: > > On Wed, Apr 12, 2017 at 11:21:18AM -0500, Bjorn Helgaas wrote: > > > On Tue, Apr 11, 2017 at 03:27:02PM +0000, Jayachandran C wrote: > > >

Re: [PATCH v4 2/2] PCI: quirks: Fix ThunderX2 dma alias handling

2017-04-12 Thread Jayachandran C
On Wed, Apr 12, 2017 at 11:21:18AM -0500, Bjorn Helgaas wrote: > On Tue, Apr 11, 2017 at 03:27:02PM +0000, Jayachandran C wrote: > > On Tue, Apr 11, 2017 at 08:41:25AM -0500, Bjorn Helgaas wrote: > > > [+cc Joerg] > > > > > > On Tue, Apr 11, 2017 at 07

Re: [PATCH v4 2/2] PCI: quirks: Fix ThunderX2 dma alias handling

2017-04-11 Thread Jayachandran C
On Tue, Apr 11, 2017 at 08:41:25AM -0500, Bjorn Helgaas wrote: > [+cc Joerg] > > On Tue, Apr 11, 2017 at 07:10:48AM +, Jayachandran C wrote: > > On Mon, Apr 10, 2017 at 08:28:47PM -0500, Bjorn Helgaas wrote: > > > Hi Jayachandran, > > > > > >

Re: [PATCH v4 2/2] PCI: quirks: Fix ThunderX2 dma alias handling

2017-04-11 Thread Jayachandran C
On Mon, Apr 10, 2017 at 08:28:47PM -0500, Bjorn Helgaas wrote: > Hi Jayachandran, > > On Mon, Apr 03, 2017 at 01:15:04PM +, Jayachandran C wrote: > > The Cavium ThunderX2 arm64 SoCs (called Broadcom Vulcan earlier), the PCI > > topology is slightly unusual. For a multi-

Re: [PATCH v4 2/2] PCI: quirks: Fix ThunderX2 dma alias handling

2017-04-10 Thread Jayachandran C
[Moving Bjorn back to to: ] On Tue, Apr 04, 2017 at 03:28:26PM +0100, Robin Murphy wrote: > On 04/04/17 12:50, Jayachandran C wrote: > > On Mon, Apr 03, 2017 at 04:07:53PM +0100, Robin Murphy wrote: > >> On 03/04/17 14:15, Jayachandran C wrote: > >>> The Caviu

Re: [PATCH v4 2/2] PCI: quirks: Fix ThunderX2 dma alias handling

2017-04-04 Thread Jayachandran C
On Mon, Apr 03, 2017 at 04:07:53PM +0100, Robin Murphy wrote: > On 03/04/17 14:15, Jayachandran C wrote: > > The Cavium ThunderX2 arm64 SoCs (called Broadcom Vulcan earlier), the PCI > > topology is slightly unusual. For a multi-node system, it looks like: > > > > [n

[PATCH v4 2/2] PCI: quirks: Fix ThunderX2 dma alias handling

2017-04-03 Thread Jayachandran C
0XX). Signed-off-by: Jayachandran C --- drivers/pci/quirks.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index 6736836..564a84a 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -3958,6 +3958,20 @@ DECL

[PATCH v4 0/2] Handle Cavium ThunderX2 PCI topology quirk

2017-04-03 Thread Jayachandran C
>v3: - changed device flag name from PCI_DEV_FLAGS_DMA_ALIAS_ROOT to PCI_DEV_FLAGS_BRIDGE_XLATE_ROOT - updated commit message to make the quirk clearer. Let me know your comments and suggestions. Thanks, JC. Jayachandran C (2): PCI: Add device flag PCI_DEV_FLAGS_BRIDGE_XLATE_ROOT PCI: quirk

[PATCH v4 1/2] PCI: Add device flag PCI_DEV_FLAGS_BRIDGE_XLATE_ROOT

2017-04-03 Thread Jayachandran C
as() works correctly. The function pci_for_each_dma_alias() is updated to stop when it see a bridge with this flag set. Signed-off-by: Jayachandran C --- drivers/pci/search.c | 4 include/linux/pci.h | 2 ++ 2 files changed, 6 insertions(+) diff --git a/drivers/pci/search.c b/drivers/pc

Re: [PATCH v3 0/2] Handle Cavium ThunderX2 PCI topology quirk

2017-03-24 Thread Jayachandran C
On Wed, Mar 22, 2017 at 11:13:05AM -0400, Jon Masters wrote: > On 03/22/2017 04:51 AM, Jayachandran C wrote: > > Hi Bjorn, Alex, > > > > Here is v3 of the patchset to handle the PCIe topology quirk of > > Cavium ThunderX2 (previously called Broadcom Vulcan). > >

Re: [PATCH v3 1/2] PCI: Add device flag PCI_DEV_FLAGS_BRIDGE_XLATE_ROOT

2017-03-22 Thread Jayachandran C
On Wed, Mar 22, 2017 at 08:51:10AM +, Jayachandran C wrote: > From: Jayachandran C Looks like I did not fix up the author to my new mail ID. Please ignore this part. I can send out a clean revision if needed, until then please drop the broadcom.com mail id in any reply to avoid boun

[PATCH v3 2/2] PCI: quirks: Fix ThunderX2 dma alias handling

2017-03-22 Thread Jayachandran C
From: Jayachandran C The Cavium ThunderX2 arm64 SoCs (called Broadcom Vulcan earlier), the PCI topology is slightly unusual. For a multi-node system, it looks like: [node level PCI bridges - one per node] [SoC PCI devices with MSI-X but no IOMMU] [PCI-PCIe "glue" bridges - up

[PATCH v3 1/2] PCI: Add device flag PCI_DEV_FLAGS_BRIDGE_XLATE_ROOT

2017-03-22 Thread Jayachandran C
From: Jayachandran C Add a new quirk flag PCI_DEV_FLAGS_BRIDGE_XLATE_ROOT to limit the DMA alias search to go no further than the bridge where the IOMMU unit is attached. The flag will be used to indicate a bridge device which forwards the address translation requests to the IOMMU, i.e where

[PATCH v3 0/2] Handle Cavium ThunderX2 PCI topology quirk

2017-03-22 Thread Jayachandran C
rom PCI_DEV_FLAGS_DMA_ALIAS_ROOT to PCI_DEV_FLAGS_BRIDGE_XLATE_ROOT - updated commit message to make the quirk clearer. Let me know your comments and suggestions. Thanks, JC. Jayachandran C (2): PCI: Add device flag PCI_DEV_FLAGS_BRIDGE_XLATE_ROOT PCI: quirks: Fix ThunderX2 dma alias handling drivers/

Re: [PATCH v2 2/2] PCI: Handle Broadcom Vulcan DMA alias calculation quirk

2016-06-14 Thread Jayachandran C via iommu
[Adding ARM GIC and SMMU maintainers] On Sat, Jun 11, 2016 at 10:54 PM, Bjorn Helgaas wrote: > On Sun, May 08, 2016 at 03:03:21PM +0530, Jayachandran C wrote: >> The Broadcom Vulcan PCI topology is slightly unusual, for a multi-node >> system, it looks like

Re: [PATCH v2 1/2] PCI: Add PCI device flag PCI_DEV_FLAGS_DMA_ALIAS_ROOT

2016-05-17 Thread Jayachandran C via iommu
On Wed, May 11, 2016 at 7:56 PM, Robin Murphy wrote: > On 11/05/16 07:28, Jayachandran C wrote: >> >> On Mon, May 9, 2016 at 3:40 PM, Robin Murphy wrote: >>> >>> On 08/05/16 10:33, Jayachandran C via iommu wrote: >>>> >>>> >>>&g

Re: [PATCH v2 1/2] PCI: Add PCI device flag PCI_DEV_FLAGS_DMA_ALIAS_ROOT

2016-05-10 Thread Jayachandran C via iommu
On Mon, May 9, 2016 at 3:40 PM, Robin Murphy wrote: > On 08/05/16 10:33, Jayachandran C via iommu wrote: >> >> Add a new flag PCI_DEV_FLAGS_DMA_ALIAS_ROOT to limit the DMA alias >> search to go no further than the bridge where the IOMMU is attached. >> >> This has

[PATCH v2 1/2] PCI: Add PCI device flag PCI_DEV_FLAGS_DMA_ALIAS_ROOT

2016-05-08 Thread Jayachandran C via iommu
buses above would hit internal glue bridges which will change the RID. Update the function pci_for_each_dma_alias() to stop when it see a bridge with this flag set. Signed-off-by: Jayachandran C --- Here is v2 of the patch, the previous discussion is at http://lists.linuxfoundation.org/pipe

[PATCH v2 2/2] PCI: Handle Broadcom Vulcan DMA alias calculation quirk

2016-05-08 Thread Jayachandran C via iommu
with flag PCI_DEV_FLAGS_DMA_ALIAS_ROOT so that the alias and RID calculations are correct. Signed-off-by: Jayachandran C --- drivers/pci/quirks.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index 8e67802..62664b5 100644 --- a