Re: [PATCH v9 07/16] drivers: acpi: implement acpi_dma_configure

2016-12-02 Thread Lorenzo Pieralisi
Rafael, Mark, Suravee, On Mon, Nov 21, 2016 at 10:01:39AM +, Lorenzo Pieralisi wrote: > On DT based systems, the of_dma_configure() API implements DMA > configuration for a given device. On ACPI systems an API equivalent to > of_dma_configure() is missing which implies that it is

Re: [PATCH v9 07/16] drivers: acpi: implement acpi_dma_configure

2016-12-03 Thread Lorenzo Pieralisi
On Sat, Dec 03, 2016 at 03:11:09AM +0100, Rafael J. Wysocki wrote: > On Fri, Dec 2, 2016 at 4:38 PM, Lorenzo Pieralisi > wrote: > > Rafael, Mark, Suravee, > > > > On Mon, Nov 21, 2016 at 10:01:39AM +, Lorenzo Pieralisi wrote: > >> On DT based systems, the of_d

Re: [PATCH v9 07/16] drivers: acpi: implement acpi_dma_configure

2016-12-05 Thread Lorenzo Pieralisi
On Mon, Dec 05, 2016 at 03:22:02PM +0530, Sricharan wrote: > Hi Lorenzo, > > > > >On Sat, Dec 3, 2016 at 11:39 AM, Lorenzo Pieralisi > > wrote: > >> On Sat, Dec 03, 2016 at 03:11:09AM +0100, Rafael J. Wysocki wrote: > >>> On Fri, Dec 2, 20

[PATCH] ACPI/IORT: Make dma masks set-up IORT specific

2016-12-05 Thread Lorenzo Pieralisi
to a NOP on x86/ia64 systems, restoring the default expected behaviour on x86/ia64 systems and keeping DMA default masks set-up on IORT based (ie ARM) arch configurations. Signed-off-by: Lorenzo Pieralisi Cc: Will Deacon Cc: Hanjun Guo Cc: Bjorn Helgaas Cc: Robin Murphy Cc: Tomasz Nowicki Cc

Re: [PATCH] ACPI/IORT: Make dma masks set-up IORT specific

2016-12-06 Thread Lorenzo Pieralisi
Hi Joerg, On Mon, Dec 05, 2016 at 11:18:56PM +0100, Rafael J. Wysocki wrote: > On Mon, Dec 5, 2016 at 1:26 PM, Lorenzo Pieralisi > wrote: > > The introduction of acpi_dma_configure() allows to configure DMA > > and related IOMMU for any device that is DMA capable. To achiev

[PATCH v2] ACPI/IORT: Make dma masks set-up IORT specific

2016-12-06 Thread Lorenzo Pieralisi
to a NOP on x86/ia64 systems, restoring the default expected behaviour on x86/ia64 systems and keeping DMA default masks set-up on IORT based (ie ARM) arch configurations. Signed-off-by: Lorenzo Pieralisi Acked-by: Will Deacon Acked-by: Rafael J. Wysocki Reviewed-by: Hanjun Guo Tested-by

Re: [PATCH] ACPI/IORT: Make dma masks set-up IORT specific

2016-12-06 Thread Lorenzo Pieralisi
On Tue, Dec 06, 2016 at 02:24:48PM +0100, Joerg Roedel wrote: > Hi Lorenzo, > > On Tue, Dec 06, 2016 at 09:37:10AM +, Lorenzo Pieralisi wrote: > > I can apply Rafael and Hanjun's tags and resend a v2 to you if you > > prefer, it would be great if you could apply t

[PATCH] iommu: Drop the of_iommu_{set/get}_ops() interface

2017-01-03 Thread Lorenzo Pieralisi
mplete the interface rework. Signed-off-by: Lorenzo Pieralisi Cc: Matthias Brugger Cc: Will Deacon Cc: Robin Murphy Cc: Joerg Roedel Cc: Marek Szyprowski --- Exynos, msm and mtk code compile tested only owing to lack of test platforms, I would appreciate some help in testing this patch on those

Re: [PATCH 02/10] iommu/of: Prepare for deferred IOMMU configuration

2017-01-05 Thread Lorenzo Pieralisi
On Thu, Jan 05, 2017 at 02:04:37PM +0530, Sricharan wrote: > Hi Robin/Lorenzo, > > >Hi Robin,Lorenzo, > > > >>On Wed, Nov 30, 2016 at 04:42:27PM +, Robin Murphy wrote: > >>> On 30/11/16 16:17, Lorenzo Pieralisi wrote: > >>> > Sricharan,

Re: [PATCH 02/10] iommu/of: Prepare for deferred IOMMU configuration

2017-01-05 Thread Lorenzo Pieralisi
On Thu, Jan 05, 2017 at 01:52:29PM +, Robin Murphy wrote: [...] > > Question: I had a look into this and instead of fiddling about with the > > linker script entries in ACPI (ie IORT_ACPI_DECLARE - which I hope this > > patchset would help remove entirely), I think that the only check we > >

Re: [PATCH 02/10] iommu/of: Prepare for deferred IOMMU configuration

2017-01-06 Thread Lorenzo Pieralisi
On Thu, Jan 05, 2017 at 08:21:53PM +0530, Sricharan wrote: > Hi, > > [...] > > >>> > >>> With the thinking of taking this series through, would it be fine if i > >>> cleanup the pci configure hanging outside and push it in to > >>> of/acpi_iommu configure respectively ? This time with all neeeded

Re: [PATCH 02/10] iommu/of: Prepare for deferred IOMMU configuration

2017-01-19 Thread Lorenzo Pieralisi
Hi Sricharan, On Fri, Jan 06, 2017 at 04:24:00PM +, Lorenzo Pieralisi wrote: > On Thu, Jan 05, 2017 at 08:21:53PM +0530, Sricharan wrote: > > Hi, > > > > [...] > > > > >>> > > >>> With the thinking of taking this series through

Re: [PATCH V5 10/12] drivers: acpi: Configure acpi devices dma operation at probe time

2017-01-19 Thread Lorenzo Pieralisi
On Thu, Jan 19, 2017 at 08:35:54PM +0530, Sricharan R wrote: > With all the DT based devices getting their dma ops configured > during probe time to have the right iommu setup, let us do the > same for acpi based devices as well. > > Configuring DMA ops at probe time will allow deferring device pr

Re: [PATCH V5 05/12] drivers: platform: Configure dma operations at probe time

2017-01-19 Thread Lorenzo Pieralisi
On Thu, Jan 19, 2017 at 08:35:49PM +0530, Sricharan R wrote: > Configuring DMA ops at probe time will allow deferring device probe when > the IOMMU isn't available yet. The dma_configure for the device is > now called from the generic device_attach callback just before the > bus/driver probe is cal

Re: [PATCH V5 08/12] iommu/arm-smmu: Clean up early-probing workarounds

2017-01-19 Thread Lorenzo Pieralisi
On Thu, Jan 19, 2017 at 08:35:52PM +0530, Sricharan R wrote: > From: Robin Murphy > > Now that the appropriate ordering is enforced via profe-deferral of > masters in core code, rip it all out and bask in the simplicity. > > Signed-off-by: Robin Murphy > [Sricharan: Rebased on top of ACPI IORT

Re: [PATCH V5 05/12] drivers: platform: Configure dma operations at probe time

2017-01-19 Thread Lorenzo Pieralisi
On Thu, Jan 19, 2017 at 05:49:58PM +, Robin Murphy wrote: > On 19/01/17 15:05, Sricharan R wrote: > > Configuring DMA ops at probe time will allow deferring device probe when > > the IOMMU isn't available yet. The dma_configure for the device is > > now called from the generic device_attach cal

Re: [PATCH V6 06/11] drivers: platform: Configure dma operations at probe time

2017-01-23 Thread Lorenzo Pieralisi
[+bjorn] On Sat, Jan 21, 2017 at 12:45:43AM +0530, Sricharan R wrote: > Configuring DMA ops at probe time will allow deferring device probe when > the IOMMU isn't available yet. The dma_configure for the device is > now called from the generic device_attach callback just before the > bus/driver pr

Re: [PATCH V7 08/11] drivers: acpi: Handle IOMMU lookup failure with deferred probing or error

2017-01-24 Thread Lorenzo Pieralisi
!dev->iommu_group) { > + int err = ops->add_device(dev); > + > + if (err) > + ops = ERR_PTR(err); > + } I think there is nothing ACPI specific in this add_device() replay path, so there is room for further DT/ACPI consolidation

Re: [PATCH V7 08/11] drivers: acpi: Handle IOMMU lookup failure with deferred probing or error

2017-01-30 Thread Lorenzo Pieralisi
e: > >>> > On 2017-01-30 08:59, Sinan Kaya wrote: > >>> >> On 1/30/2017 7:22 AM, Robin Murphy wrote: > >>> >>> On 29/01/17 17:53, Sinan Kaya wrote: > >>> >>>> On 1/24/2017 7:37 AM, Lorenzo Pieralisi wrote: > >>>

Re: [PATCH V7 08/11] drivers: acpi: Handle IOMMU lookup failure with deferred probing or error

2017-02-01 Thread Lorenzo Pieralisi
On Mon, Jan 30, 2017 at 03:03:06PM -0500, Sinan Kaya wrote: > On 1/30/2017 11:51 AM, Lorenzo Pieralisi wrote: > > On Mon, Jan 30, 2017 at 10:46:39AM -0500, Sinan Kaya wrote: > >> On 1/30/2017 9:54 AM, Nate Watterson wrote: > >>> On 2017-01-30 09:38, Will Deacon wrot

Re: [PATCH V9 00/11] IOMMU probe deferral support

2017-03-24 Thread Lorenzo Pieralisi
On Fri, Mar 24, 2017 at 09:27:51AM +, Shameerali Kolothum Thodi wrote: [...] > @@ -107,7 +107,7 @@ int of_dma_configure(struct device *dev, struct > device_node *np) > ret = of_dma_get_range(np, &dma_addr, &paddr, &size); > if (ret < 0) { > dma_addr = offset = 0; >

Re: [PATCH V9 00/11] IOMMU probe deferral support

2017-03-27 Thread Lorenzo Pieralisi
On Mon, Mar 27, 2017 at 05:18:15PM +0100, Robin Murphy wrote: [...] > >> [ 145.212351] iommu: Adding device :81:10.0 to group 5 > >> [ 145.212367] ixgbevf :81:10.0: 0x0 0x1, 0x0 0x, > >> 0x 0x > >> [ 145.213261] ixgbevf :81:10.0: enabling device

Re: [PATCH V10 00/12] IOMMU probe deferral support

2017-04-05 Thread Lorenzo Pieralisi
nt Pinchart [1] > > > > [1] http://lists.linuxfoundation.org/pipermail/iommu/2015-May/013016.html > > [2] > > http://www.linux-arm.org/git?p=linux-rm.git;a=shortlog;h=refs/heads/iommu/defer > > [3] https://lkml.org/lkml/2016/11/21/141 > > [4] > > https://www.mai

Re: [RFC PATCH 4/7] ACPICA: IORT: Add SMMuV3 model definitions.

2017-04-12 Thread Lorenzo Pieralisi
On Tue, Apr 11, 2017 at 10:27:55PM +0530, Sunil Kovvuri wrote: > On Tue, Apr 11, 2017 at 9:29 PM, Robin Murphy wrote: > > On 11/04/17 15:42, linucher...@gmail.com wrote: > >> From: Linu Cherian > >> > >> Add SMMuV3 model definitions. > >> > >> Signed-off-by: Linu Cherian > >> --- > >> include/a

[PATCH] ACPI/IORT: Fix CONFIG_IOMMU_API dependency

2017-04-28 Thread Lorenzo Pieralisi
: drivers/acpi/arm64/iort.c: In function 'iort_iommu_xlate': drivers/acpi/arm64/iort.c:647:22: error: 'struct iommu_fwspec' has no member named 'ops' by wrapping the code in static inline functions that provide a NOP implementation when CONFIG_IOMMU_API is not selected. Si

Re: [PATCH V4 3/4] ACPI/IORT: Ignore all errors except EPROBE_DEFER

2017-05-22 Thread Lorenzo Pieralisi
Hi Sricharan, On Thu, May 18, 2017 at 08:24:16PM +0530, Sricharan R wrote: > While deferring the probe of IOMMU masters, xlate and > add_device callbacks called from iort_iommu_configure > can pass back error values like -ENODEV, which means > the IOMMU cannot be connected with that master for rea

Re: [PATCH V4 3/4] ACPI/IORT: Ignore all errors except EPROBE_DEFER

2017-05-22 Thread Lorenzo Pieralisi
On Mon, May 22, 2017 at 04:35:43PM +0530, Sricharan R wrote: > Hi Lorenzo, > > On 5/22/2017 4:07 PM, Lorenzo Pieralisi wrote: > > Hi Sricharan, > > > > On Thu, May 18, 2017 at 08:24:16PM +0530, Sricharan R wrote: > >> While deferring the probe of IOMM

Re: [PATCH V11 08/11] drivers: acpi: Handle IOMMU lookup failure with deferred probing or error

2017-05-23 Thread Lorenzo Pieralisi
ter device probe depending > >on whether the IOMMU is optional or mandatory would be a good > >enhancement. > > > >Tested-by: Hanjun Guo > >Reviewed-by: Robin Murphy > >[Lorenzo: Added fixes for dma_coherent_mask overflow, acpi_dma_configure > &g

Re: [PATCH V11 08/11] drivers: acpi: Handle IOMMU lookup failure with deferred probing or error

2017-05-23 Thread Lorenzo Pieralisi
On Tue, May 23, 2017 at 02:31:17PM +0530, Sricharan R wrote: > Hi Lorenzo, > > On 5/23/2017 2:22 PM, Lorenzo Pieralisi wrote: > > On Tue, May 23, 2017 at 02:26:10AM -0400, Nate Watterson wrote: > >> Hi Sricharan, > >> > >> On 4/10/2017 7:21 AM, Srichar

Re: [PATCH v6 3/6] ACPI/IORT: Ignore all errors except EPROBE_DEFER

2017-05-30 Thread Lorenzo Pieralisi
On Mon, May 29, 2017 at 10:36:42AM +0530, Sricharan R wrote: > Hi Rafael, > > On 5/28/2017 12:48 AM, Rafael J. Wysocki wrote: > > On Saturday, May 27, 2017 07:17:42 PM Sricharan R wrote: > >> While deferring the probe of IOMMU masters, xlate and > >> add_device callbacks called from iort_iommu_con

Re: [PATCH] acpi/iort, numa: Add numa node mapping for smmuv3 devices

2017-06-01 Thread Lorenzo Pieralisi
On Thu, Jun 01, 2017 at 07:35:37PM +0530, Ganapatrao Kulkarni wrote: > ARM IORT specification has provision to define Proximity domain > in SMMUv3 IORT table. Adding required code to parse Proximity domain of > SMMUv3 IORT table. Parsed Proximity domain is used to set numa_node > of SMMUv3 platform

Re: [RFCv2 2/2] iommu/arm-smmu-v3:Enable ACPI based HiSilicon erratum 161010801

2017-06-06 Thread Lorenzo Pieralisi
On Wed, May 31, 2017 at 03:32:13PM +0100, shameer wrote: > The HiSilicon erratum 161010801 describes the limitation of HiSilicon > platforms Hip06/Hip07 to support the SMMU mappings for MSI transactions. > > On these platforms GICv3 ITS translator is presented with the deviceID > by extending the

Re: [RFCv2 1/2] acpi:iort: Add new helper function to retrieve ITS base addr from dev IORT node

2017-06-06 Thread Lorenzo Pieralisi
On Wed, May 31, 2017 at 03:32:12PM +0100, shameer wrote: > This provides a helper function to find and retrieve the ITS > base address from the ID mappings array reference of a device > IORT node(if any). > > This is used in the subsequent patch to retrieve the ITS base > address associated with

Re: [PATCH v2 2/2] acpi/iort: numa: Add numa node mapping for smmuv3 devices

2017-06-07 Thread Lorenzo Pieralisi
On Tue, Jun 06, 2017 at 04:17:45PM +0530, Ganapatrao Kulkarni wrote: > Add code to parse proximity domain in SMMUv3 IORT table to > set numa node mapping for smmuv3 devices. > > Signed-off-by: Ganapatrao Kulkarni > --- > drivers/acpi/arm64/iort.c | 20 > 1 file changed, 20 i

Re: [RFCv2 2/2] iommu/arm-smmu-v3:Enable ACPI based HiSilicon erratum 161010801

2017-06-07 Thread Lorenzo Pieralisi
On Tue, Jun 06, 2017 at 03:01:36PM +, Shameerali Kolothum Thodi wrote: > Hi Lorenzo, > > > -Original Message- > > From: Lorenzo Pieralisi [mailto:lorenzo.pieral...@arm.com] > > Sent: Tuesday, June 06, 2017 2:56 PM > > To: Shameerali Kolothum Thod

Re: [RFCv2 2/2] iommu/arm-smmu-v3:Enable ACPI based HiSilicon erratum 161010801

2017-06-08 Thread Lorenzo Pieralisi
On Tue, Jun 06, 2017 at 03:01:36PM +, Shameerali Kolothum Thodi wrote: [...] > > > + irq_dom = pci_msi_get_device_domain(to_pci_dev(dev)); > > > + if (irq_dom) { > > > + int ret; > > > + u32 rid; > > > + > > > + rid = pci_msi_domain_get_msi_rid(irq_dom, > > to_

Re: [PATCH v7 1/3] ACPI/IORT: Fixup SMMUv3 resource size for Cavium ThunderX2 SMMUv3 model

2017-06-08 Thread Lorenzo Pieralisi
On Tue, May 30, 2017 at 05:33:39PM +0530, Geetha sowjanya wrote: > From: Linu Cherian > > Cavium ThunderX2 implementation doesn't support second page in SMMU > register space. Hence, resource size is set as 64k for this model. > > Signed-off-by: Linu Cherian > Signed-off-by: Geetha Sowjanya >

Re: [RFCv2 2/2] iommu/arm-smmu-v3:Enable ACPI based HiSilicon erratum 161010801

2017-06-08 Thread Lorenzo Pieralisi
On Thu, Jun 08, 2017 at 09:09:28AM +, Shameerali Kolothum Thodi wrote: > > > > -Original Message- > > From: Lorenzo Pieralisi [mailto:lorenzo.pieral...@arm.com] > > Sent: Thursday, June 08, 2017 9:49 AM > > To: Shameerali Kolothum Thodi > >

Re: [PATCH v7 0/3] Cavium ThunderX2 SMMUv3 errata workarounds

2017-06-08 Thread Lorenzo Pieralisi
On Tue, May 30, 2017 at 05:33:38PM +0530, Geetha sowjanya wrote: > Cavium ThunderX2 SMMUv3 implementation has two Silicon Erratas. > 1. Errata ID #74 >SMMU register alias Page 1 is not implemented > 2. Errata ID #126 >SMMU doesnt support unique IRQ lines and also MSI for gerror, >eventq

Re: [PATCH v7 0/3] Cavium ThunderX2 SMMUv3 errata workarounds

2017-06-13 Thread Lorenzo Pieralisi
Hi Rafael, Lv, On Thu, Jun 08, 2017 at 07:13:24PM +0200, Rafael J. Wysocki wrote: > On Thu, Jun 8, 2017 at 6:32 PM, Lorenzo Pieralisi > wrote: > > On Tue, May 30, 2017 at 05:33:38PM +0530, Geetha sowjanya wrote: > >> Cavium ThunderX2 SMMUv3 implementation has two Silicon Er

Re: [PATCH 2/2] iommu/arm-smmu-v3:Enable ACPI based HiSilicon erratum 161010801

2017-06-13 Thread Lorenzo Pieralisi
On Tue, Jun 13, 2017 at 12:48:29PM +0100, shameer wrote: > The HiSilicon erratum 161010801 describes the limitation of HiSilicon > platforms Hip06/Hip07 to support the SMMU mappings for MSI transactions. > > On these platforms GICv3 ITS translator is presented with the deviceID > by extending the

Re: [PATCH v3 2/2] acpi/iort: numa: Add numa node mapping for smmuv3 devices

2017-06-15 Thread Lorenzo Pieralisi
Hi, On Thu, Jun 08, 2017 at 10:14:19AM +0530, Ganapatrao Kulkarni wrote: > Add code to parse proximity domain in SMMUv3 IORT table to > set numa node mapping for smmuv3 devices. > > Signed-off-by: Ganapatrao Kulkarni > --- > drivers/acpi/arm64/iort.c | 28 ++-- > 1 file

Re: [PATCH 2/2] iommu/arm-smmu-v3:Enable ACPI based HiSilicon erratum 161010801

2017-06-16 Thread Lorenzo Pieralisi
On Fri, Jun 16, 2017 at 09:43:52AM +, Shameerali Kolothum Thodi wrote: > Hi Lorenzo, > > > -Original Message- > > From: linuxarm-boun...@huawei.com [mailto:linuxarm- > > boun...@huawei.com] On Behalf Of Shameerali Kolothum Thodi > > Sent: Tuesday, June 13

Re: [PATCH v2 2/2] iommu/arm-smmu-v3:Enable ACPI based HiSilicon erratum 161010801

2017-06-20 Thread Lorenzo Pieralisi
Hi Shameer, On Mon, Jun 19, 2017 at 04:45:00PM +0100, shameer wrote: > The HiSilicon erratum 161010801 describes the limitation of HiSilicon > platforms Hip06/Hip07 to support the SMMU mappings for MSI transactions. > > On these platforms GICv3 ITS translator is presented with the deviceID > by e

Re: [PATCH v7 1/3] ACPI/IORT: Fixup SMMUv3 resource size for Cavium ThunderX2 SMMUv3 model

2017-06-20 Thread Lorenzo Pieralisi
On Tue, Jun 20, 2017 at 10:51:23AM +0200, Robert Richter wrote: > On 20.06.17 10:19:43, Robert Richter wrote: > > On 30.05.17 17:33:39, Geetha sowjanya wrote: > > > From: Linu Cherian > > > > + /* > > > + * Override the size, for Cavium ThunderX2 implementation > > > + * which doesn't support t

Re: [PATCH v2 2/2] iommu/arm-smmu-v3:Enable ACPI based HiSilicon erratum 161010801

2017-06-20 Thread Lorenzo Pieralisi
On Tue, Jun 20, 2017 at 04:16:18PM +0100, Robin Murphy wrote: > On 20/06/17 15:07, Shameerali Kolothum Thodi wrote: > > > > > >> -Original Message- > >> From: Lorenzo Pieralisi [mailto:lorenzo.pieral...@arm.com] > >> Sent: Tuesday, June 20,

Re: [PATCH v2 2/2] iommu/arm-smmu-v3:Enable ACPI based HiSilicon erratum 161010801

2017-06-20 Thread Lorenzo Pieralisi
On Tue, Jun 20, 2017 at 03:39:30PM +, Shameerali Kolothum Thodi wrote: > > > > -Original Message- > > From: Robin Murphy [mailto:robin.mur...@arm.com] > > Sent: Tuesday, June 20, 2017 4:16 PM > > To: Shameerali Kolothum Thodi; Lorenzo Pieralisi > >

Re: [PATCH v8 1/3] ACPI/IORT: Fixup SMMUv3 resource size for Cavium ThunderX2 SMMUv3 model

2017-06-20 Thread Lorenzo Pieralisi
ed-off-by: Geetha Sowjanya > --- > drivers/acpi/arm64/iort.c | 15 ++- > 1 files changed, 14 insertions(+), 1 deletions(-) Acked-by: Lorenzo Pieralisi > diff --git a/drivers/acpi/arm64/iort.c b/drivers/acpi/arm64/iort.c > index c5fecf9..c166f3e 100644 > --- a/dr

Re: [Devel] [PATCH v9 0/3] Cavium ThunderX2 SMMUv3 errata workarounds

2017-06-22 Thread Lorenzo Pieralisi
On Thu, Jun 22, 2017 at 09:35:35PM +0200, Robert Richter wrote: > On 22.06.17 19:58:22, Will Deacon wrote: > > On Thu, Jun 22, 2017 at 07:22:57PM +0100, Will Deacon wrote: > > > On Thu, Jun 22, 2017 at 05:35:35PM +0530, Geetha sowjanya wrote: > > > > Cavium ThunderX2 SMMUv3 implementation has two S

Re: [Devel] [PATCH v9 0/3] Cavium ThunderX2 SMMUv3 errata workarounds

2017-06-23 Thread Lorenzo Pieralisi
On Fri, Jun 23, 2017 at 06:55:41AM +0200, Robert Richter wrote: > On 22.06.17 22:04:37, Lorenzo Pieralisi wrote: > > On Thu, Jun 22, 2017 at 09:35:35PM +0200, Robert Richter wrote: > > > On 22.06.17 19:58:22, Will Deacon wrote: > > > > On Thu, Jun 22, 2017 at 07:22

Re: [PATCH] iommu/arm-smmu-v3, acpi: Add temporary Cavium SMMU-V3 IORT model number definitions

2017-06-23 Thread Lorenzo Pieralisi
On Fri, Jun 23, 2017 at 06:59:33AM +0200, Robert Richter wrote: > On 23.06.17 06:55:41, Robert Richter wrote: > > On 22.06.17 22:04:37, Lorenzo Pieralisi wrote: > > > On Thu, Jun 22, 2017 at 09:35:35PM +0200, Robert Richter wrote: > > > > On 22.06.17 19:58:22, Will

Re: [PATCH v9 3/3] iommu/arm-smmu-v3: Add workaround for Cavium ThunderX2 erratum #126

2017-06-23 Thread Lorenzo Pieralisi
On Fri, Jun 23, 2017 at 11:28:05AM +0530, Geetha sowjanya wrote: [...] > --- a/drivers/acpi/arm64/iort.c > +++ b/drivers/acpi/arm64/iort.c > @@ -828,6 +828,18 @@ static int __init arm_smmu_v3_count_resources(struct > acpi_iort_node *node) > return num_res; > } > > +static bool arm_smmu_

Re: [PATCH v3 1/2] acpi:iort: Add an IORT helper function to reserve HW ITS address regions for IOMMU drivers

2017-06-23 Thread Lorenzo Pieralisi
On Fri, Jun 23, 2017 at 03:58:00PM +0100, shameer wrote: > The helper function retrieves ITS address regions through IORT > device <-> ITS mappings and reserves it so that these regions > will not be translated by IOMMU and will be excluded from IOVA > allocations. IOMMU drivers can use this to imp

Re: [PATCH v3 2/2] acpi/iort: numa: Add numa node mapping for smmuv3 devices

2017-07-04 Thread Lorenzo Pieralisi
Hi Robert, On Wed, Jun 28, 2017 at 07:47:50PM +0200, Robert Richter wrote: > On 15.06.17 14:46:03, Lorenzo Pieralisi wrote: > > On Thu, Jun 08, 2017 at 10:14:19AM +0530, Ganapatrao Kulkarni wrote: > > > Add code to parse proximity domain in SMMUv3 IORT table to > > >

Re: [PATCH v3 1/2] acpi:iort: Add an IORT helper function to reserve HW ITS address regions for IOMMU drivers

2017-07-04 Thread Lorenzo Pieralisi
On Mon, Jul 03, 2017 at 08:18:45AM +, Shameerali Kolothum Thodi wrote: > > > > -Original Message- > > From: Lorenzo Pieralisi [mailto:lorenzo.pieral...@arm.com] > > Sent: Friday, June 23, 2017 5:54 PM > > To: Shameerali Kolothum Thodi > >

Re: [PATCH v4] acpi/iort: numa: Add numa node mapping for smmuv3 devices

2017-07-25 Thread Lorenzo Pieralisi
ncy on header file patch [1], which is > > already merged to linux-pm. > > > > [1] > > https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git/commit/?h=linux-next&id=c944230064eb65e4fa018d86779b4fd200b1d7e7 > > > > v4: > > - Fix compilation

Re: [PATCH v4 1/2] acpi:iort: Add an IORT helper function to reserve HW ITS address regions for IOMMU drivers

2017-07-25 Thread Lorenzo Pieralisi
On Tue, Jul 25, 2017 at 12:17:31PM +0100, Shameer Kolothum wrote: > The helper function retrieves ITS address regions through IORT > device <-> ITS mappings and reserves it so that these regions > will not be translated by IOMMU and will be excluded from IOVA > allocations. IOMMU drivers can use th

Re: [PATCH v4 1/2] acpi:iort: Add an IORT helper function to reserve HW ITS address regions for IOMMU drivers

2017-07-26 Thread Lorenzo Pieralisi
On Tue, Jul 25, 2017 at 06:32:40PM +0100, Robin Murphy wrote: > On 25/07/17 18:11, Lorenzo Pieralisi wrote: > > On Tue, Jul 25, 2017 at 12:17:31PM +0100, Shameer Kolothum wrote: > >> The helper function retrieves ITS address regions through IORT > >> device <-> ITS

Re: [PATCH v4 1/2] acpi:iort: Add an IORT helper function to reserve HW ITS address regions for IOMMU drivers

2017-07-27 Thread Lorenzo Pieralisi
On Thu, Jul 27, 2017 at 09:13:42AM +, Shameerali Kolothum Thodi wrote: [...] > > > >> +int iort_iommu_its_get_resv_regions(struct device *dev, struct > > list_head *head) > > > >> +{ > > > >> + int i; > > > >> + struct acpi_iort_its_group *its; > > > >> + struct acpi_iort_node

Re: [PATCH 1/4] PCI / ACPI: Identify external PCI devices

2018-11-13 Thread Lorenzo Pieralisi
On Mon, Nov 12, 2018 at 07:02:03PM +0100, Lukas Wunner wrote: > On Mon, Nov 12, 2018 at 07:06:25PM +0300, Mika Westerberg wrote: > > --- a/drivers/pci/probe.c > > +++ b/drivers/pci/probe.c > > @@ -1378,6 +1378,27 @@ static void set_pcie_thunderbolt(struct pci_dev *dev) > > } > > } > > > > +s

Re: [PATCH 1/4] PCI / ACPI: Identify external PCI devices

2018-11-13 Thread Lorenzo Pieralisi
On Tue, Nov 13, 2018 at 01:27:00PM +0200, Mika Westerberg wrote: [...] > > To be frank the concept (and Microsoft _DSD bindings) seems a bit vague > > and not thoroughly defined and I would question its detection at > > PCI/ACPI core level, I would hope this can be clarified at ACPI > > specifica

Re: [PATCH 1/4] PCI / ACPI: Identify external PCI devices

2018-11-15 Thread Lorenzo Pieralisi
On Thu, Nov 15, 2018 at 12:22:39PM +0200, Mika Westerberg wrote: > On Tue, Nov 13, 2018 at 11:45:36AM +0000, Lorenzo Pieralisi wrote: > > On Tue, Nov 13, 2018 at 01:27:00PM +0200, Mika Westerberg wrote: > > > > [...] > > > > > > To be frank the concept (a

Re: [PATCH 1/4] PCI / ACPI: Identify external PCI devices

2018-11-15 Thread Lorenzo Pieralisi
On Thu, Nov 15, 2018 at 02:16:27PM +0200, Mika Westerberg wrote: > On Thu, Nov 15, 2018 at 01:07:36PM +0100, Lukas Wunner wrote: > > On Thu, Nov 15, 2018 at 01:37:37PM +0200, Mika Westerberg wrote: > > > On Thu, Nov 15, 2018 at 11:13:56AM +, Lorenzo Pieralisi wrote: >

Re: [PATCH 1/4] PCI / ACPI: Identify external PCI devices

2018-11-16 Thread Lorenzo Pieralisi
On Thu, Nov 15, 2018 at 07:33:54PM +, mario.limoncie...@dell.com wrote: > > > > -Original Message- > > From: Mika Westerberg > > Sent: Thursday, November 15, 2018 1:01 PM > > To: Lorenzo Pieralisi > > Cc: Lukas Wunner; iommu@lists.linux

Re: [PATCH 1/4] PCI / ACPI: Identify external PCI devices

2018-11-21 Thread Lorenzo Pieralisi
On Tue, Nov 20, 2018 at 10:43:35PM +0100, Rafael J. Wysocki wrote: > On Friday, November 16, 2018 11:57:38 AM CET Lorenzo Pieralisi wrote: > > On Thu, Nov 15, 2018 at 07:33:54PM +, mario.limoncie...@dell.com wrote: > > > > > > > > > > -Original Mes

Re: [PATCH v2 1/2] PCI: iproc: Add CRS check in config read

2019-02-12 Thread Lorenzo Pieralisi
On Tue, Feb 05, 2019 at 10:27:00AM +0530, Srinath Mannam wrote: > In the current implementation, config read output data 0x0001 is > assumed as CRS completion. But sometimes 0x0001 can be a valid data. > > IPROC PCIe host controller has a register to show config read request > status flags

Re: [PATCH v2 2/2] PCI: iproc: Add PCIe 32bit outbound memory configuration

2019-02-12 Thread Lorenzo Pieralisi
On Tue, Feb 05, 2019 at 10:27:01AM +0530, Srinath Mannam wrote: > Add configuration to support IPROC PCIe host controller outbound memory > window mapping with SOC address range inside 4GB boundary, which is 32 bit > AXI address. I do not understand what this means, explain it to me and rewrite th

Re: [RFC PATCH 1/4] bus: fsl-mc: add custom .dma_configure implementation

2020-03-25 Thread Lorenzo Pieralisi
On Thu, Feb 27, 2020 at 12:05:39PM +0200, laurentiu.tu...@nxp.com wrote: > From: Laurentiu Tudor > > The devices on this bus are not discovered by way of device tree > but by queries to the firmware. It makes little sense to trick the > generic of layer into thinking that these devices are of rel

Re: [RFC PATCH 1/4] bus: fsl-mc: add custom .dma_configure implementation

2020-04-14 Thread Lorenzo Pieralisi
On Wed, Mar 25, 2020 at 06:48:55PM +0200, Laurentiu Tudor wrote: > Hi Lorenzo, > > On 3/25/2020 2:51 PM, Lorenzo Pieralisi wrote: > > On Thu, Feb 27, 2020 at 12:05:39PM +0200, laurentiu.tu...@nxp.com wrote: > >> From: Laurentiu Tudor > >> > >> The device

Re: [EXT] Re: [RFC PATCH 1/4] bus: fsl-mc: add custom .dma_configure implementation

2020-04-15 Thread Lorenzo Pieralisi
On Wed, Apr 15, 2020 at 05:42:03AM +, Makarand Pawagi wrote: > > > > -Original Message- > > From: Lorenzo Pieralisi > > Sent: Tuesday, April 14, 2020 8:02 PM > > To: Laurentiu Tudor > > Cc: linux-ker...@vger.kernel.org; iommu@lists.linux-fou

Re: [RFC PATCH 1/4] bus: fsl-mc: add custom .dma_configure implementation

2020-04-15 Thread Lorenzo Pieralisi
On Wed, Apr 15, 2020 at 06:44:37PM +0300, Laurentiu Tudor wrote: > > > On 4/14/2020 5:32 PM, Lorenzo Pieralisi wrote: > > On Wed, Mar 25, 2020 at 06:48:55PM +0200, Laurentiu Tudor wrote: > >> Hi Lorenzo, > >> > >> On 3/25/2020 2:51 PM, Lorenzo Pieralisi

Re: [EXT] Re: [RFC PATCH 1/4] bus: fsl-mc: add custom .dma_configure implementation

2020-04-23 Thread Lorenzo Pieralisi
On Thu, Apr 23, 2020 at 09:56:54AM +, Makarand Pawagi wrote: [...] > > > At a first glance, looks like this could very well fix the ACPI > > > scenario, but I have some unclarities on the approach: > > > * are we going to rely in DT and ACPI generic layers even if these > > > devices are no

[PATCH 07/12] of/device: Add input id to of_dma_configure()

2020-05-21 Thread Lorenzo Pieralisi
allow the bus layer to provide the device input id parameter - that is retrieved/assigned in bus specific code and firmware. Augment of_dma_configure() to add an optional input_id parameter, leaving current functionality unchanged. Signed-off-by: Lorenzo Pieralisi Cc: Rob Herring Cc: Robin

[PATCH 11/12] bus/fsl-mc: Refactor the MSI domain creation in the DPRC driver

2020-05-21 Thread Lorenzo Pieralisi
From: Diana Craciun The DPRC driver is not taking into account the msi-map property and assumes that the icid is the same as the stream ID. Although this assumption is correct, generalize the code to include a translation between icid and streamID. Furthermore do not just copy the MSI domain fro

[PATCH 09/12] dt-bindings: arm: fsl: Add msi-map device-tree binding for fsl-mc bus

2020-05-21 Thread Lorenzo Pieralisi
From: Laurentiu Tudor The existing bindings cannot be used to specify the relationship between fsl-mc devices and GIC ITSes. Add a generic binding for mapping fsl-mc devices to GIC ITSes, using msi-map property. Signed-off-by: Laurentiu Tudor Cc: Rob Herring --- .../devicetree/bindings/misc/

[PATCH 08/12] of/irq: make of_msi_map_get_device_domain() bus agnostic

2020-05-21 Thread Lorenzo Pieralisi
From: Diana Craciun of_msi_map_get_device_domain() is PCI specific but it need not be and can be easily changed to be bus agnostic in order to be used by other busses by adding an IRQ domain bus token as an input parameter. Signed-off-by: Diana Craciun Signed-off-by: Lorenzo Pieralisi Cc

[PATCH 02/12] ACPI/IORT: Make iort_get_device_domain IRQ domain agnostic

2020-05-21 Thread Lorenzo Pieralisi
iort_get_device_domain() is PCI specific but it need not be, since it can be used to retrieve IRQ domain nexus of any kind by adding an irq_domain_bus_token input to it. Make it PCI agnostic by also renaming the requestor ID input to a more generic ID name. Signed-off-by: Lorenzo Pieralisi Cc

[PATCH 01/12] ACPI/IORT: Make iort_match_node_callback walk the ACPI namespace for NC

2020-05-21 Thread Lorenzo Pieralisi
against the named component entry to check whether there is a match and therefore an IORT node describing the in/out ID translation for the device has been found. Signed-off-by: Lorenzo Pieralisi Cc: Will Deacon Cc: Hanjun Guo Cc: Sudeep Holla Cc: Catalin Marinas Cc: Robin Murphy Cc: "R

[PATCH 00/12] ACPI/OF: Upgrade MSI/IOMMU ID mapping APIs

2020-05-21 Thread Lorenzo Pieralisi
for fsl-mc bus Lorenzo Pieralisi (8): ACPI/IORT: Make iort_match_node_callback walk the ACPI namespace for NC ACPI/IORT: Make iort_get_device_domain IRQ domain agnostic ACPI/IORT: Make iort_msi_map_rid() PCI agnostic ACPI/IORT: Remove useless PCI bus walk ACPI/IORT: Add

[PATCH 10/12] of/irq: Make of_msi_map_rid() PCI bus agnostic

2020-05-21 Thread Lorenzo Pieralisi
of_msi_map_rid() in place to keep existing PCI code mapping requester ID syntactically unchanged. No functional change intended. Signed-off-by: Lorenzo Pieralisi Cc: Rob Herring Cc: Marc Zyngier --- drivers/of/irq.c | 28 ++-- include/linux/of_irq.h | 14

[PATCH 03/12] ACPI/IORT: Make iort_msi_map_rid() PCI agnostic

2020-05-21 Thread Lorenzo Pieralisi
There is nothing PCI specific in iort_msi_map_rid(). Make it a generic function, iort_msi_map_id() and provide a stub for iort_msi_map_rid() on top of it to keep current users unchanged. Signed-off-by: Lorenzo Pieralisi Cc: Will Deacon Cc: Hanjun Guo Cc: Sudeep Holla Cc: Catalin Marinas Cc

[PATCH 05/12] ACPI/IORT: Add an input ID to acpi_dma_configure()

2020-05-21 Thread Lorenzo Pieralisi
. By adding an ID parameter to acpi_dma_configure(), the IORT code can map the child device ID to an IOMMU stream id through the IORT named component representing the bus in/out ID mappings. Signed-off-by: Lorenzo Pieralisi Cc: Will Deacon Cc: Hanjun Guo Cc: Sudeep Holla Cc: Catalin Marinas Cc

[PATCH 12/12] bus: fsl-mc: Add ACPI support for fsl-mc

2020-05-21 Thread Lorenzo Pieralisi
From: Diana Craciun Add ACPI support in the fsl-mc driver. Driver parses MC DSDT table to extract memory and other resources. Interrupt (GIC ITS) information is extracted from the MADT table by drivers/irqchip/irq-gic-v3-its-fsl-mc-msi.c. IORT table is parsed to configure DMA. Signed-off-by: M

[PATCH 04/12] ACPI/IORT: Remove useless PCI bus walk

2020-05-21 Thread Lorenzo Pieralisi
device->bus PCI bus pointer will do. Remove this useless code. Signed-off-by: Lorenzo Pieralisi Cc: Will Deacon Cc: Hanjun Guo Cc: Sudeep Holla Cc: Catalin Marinas Cc: Robin Murphy Cc: "Rafael J. Wysocki" --- drivers/acpi/arm64/iort.c | 3 --- 1 file changed, 3 deletions(-)

[PATCH 06/12] of/iommu: Make of_map_rid() PCI agnostic

2020-05-21 Thread Lorenzo Pieralisi
unction so that we can leave the existing (and legitimate) callers unchanged. No functionality change intended. Signed-off-by: Lorenzo Pieralisi Cc: Rob Herring Cc: Joerg Roedel Cc: Robin Murphy Cc: Marc Zyngier --- drivers/iommu/of_iommu.c | 2 +- drivers/of/base.c

Re: [PATCH 12/12] bus: fsl-mc: Add ACPI support for fsl-mc

2020-05-22 Thread Lorenzo Pieralisi
On Fri, May 22, 2020 at 05:32:02AM +, Makarand Pawagi wrote: [...] > > Subject: Re: [PATCH 12/12] bus: fsl-mc: Add ACPI support for fsl-mc > > > > Hi Lorenzo, > > > > On 5/21/2020 4:00 PM, Lorenzo Pieralisi wrote: > > > From: Diana Craciun > >

Re: [PATCH 06/12] of/iommu: Make of_map_rid() PCI agnostic

2020-06-04 Thread Lorenzo Pieralisi
On Thu, May 21, 2020 at 04:47:19PM -0600, Rob Herring wrote: > On Thu, May 21, 2020 at 7:00 AM Lorenzo Pieralisi > wrote: > > > > There is nothing PCI specific (other than the RID - requester ID) > > in the of_map_rid() implementation, so the same function can be > &g

Re: [PATCH 07/12] of/device: Add input id to of_dma_configure()

2020-06-04 Thread Lorenzo Pieralisi
On Thu, May 21, 2020 at 05:02:20PM -0600, Rob Herring wrote: > On Thu, May 21, 2020 at 7:00 AM Lorenzo Pieralisi > wrote: > > > > Devices sitting on proprietary busses have a device ID space that > > is owned by the respective bus and related firmware bindings. In order &

Re: [PATCH 10/12] of/irq: Make of_msi_map_rid() PCI bus agnostic

2020-06-04 Thread Lorenzo Pieralisi
On Thu, May 21, 2020 at 05:17:27PM -0600, Rob Herring wrote: > On Thu, May 21, 2020 at 7:00 AM Lorenzo Pieralisi > wrote: > > > > There is nothing PCI bus specific in the of_msi_map_rid() > > implementation other than the requester ID tag for the input > > ID space.

Re: arm64 iommu groups issue

2020-06-12 Thread Lorenzo Pieralisi
On Mon, Feb 17, 2020 at 12:08:48PM +, John Garry wrote: > > > > > > Right, and even worse is that it relies on the port driver even > > > existing at all. > > > > > > All this iommu group assignment should be taken outside device > > > driver probe paths. > > > > > > However we could still c

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

2014-10-20 Thread Lorenzo Pieralisi
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 under the same pci hostbridge > share same msi

Re: [PATCH 0/7] iommu: Permit modular builds of ARM SMMU[v3] drivers

2019-11-01 Thread Lorenzo Pieralisi
On Fri, Nov 01, 2019 at 12:41:48PM +0100, Jean-Philippe Brucker wrote: [...] > > > I'm also wondering about ACPI support. > > > > I'd love to add ACPI support too, but I have zero knowledge of ACPI. > > I'd be happy to help anyone who wants to add ACPI support that allows > > ACPI to add device

Re: [PATCH 0/7] iommu: Permit modular builds of ARM SMMU[v3] drivers

2019-11-04 Thread Lorenzo Pieralisi
On Fri, Nov 01, 2019 at 02:26:05PM -0700, Saravana Kannan wrote: > On Fri, Nov 1, 2019 at 5:28 AM Lorenzo Pieralisi > wrote: > > > > On Fri, Nov 01, 2019 at 12:41:48PM +0100, Jean-Philippe Brucker wrote: > > > > [...] > > > > > > > I'm als

Re: [PATCH] iommu/arm-smmu: support SMMU module probing from the IORT

2019-11-25 Thread Lorenzo Pieralisi
> drivers/iommu/arm-smmu-v3.c | 1 + > drivers/iommu/arm-smmu.c| 1 + > 3 files changed, 4 insertions(+), 2 deletions(-) I think it is best if Will picks this up and add it to the series that modularize the SMMU drivers: Acked-by: Lorenzo Pieralisi > diff --git a/drivers/acp

Re: [PATCH v3 0/5] Clean up VMD DMA Map Ops

2020-01-13 Thread Lorenzo Pieralisi
On Fri, Jan 10, 2020 at 10:21:08AM -0700, Jon Derrick wrote: > v2 Set: > https://lore.kernel.org/linux-iommu/1578580256-3483-1-git-send-email-jonathan.derr...@intel.com/T/#t > v1 Set: > https://lore.kernel.org/linux-iommu/20200107134125.gd30...@8bytes.org/T/#t > > VMD currently works with VT-d e

Re: [PATCH v3 0/5] Clean up VMD DMA Map Ops

2020-01-13 Thread Lorenzo Pieralisi
On Mon, Jan 13, 2020 at 12:01:13PM -0600, Bjorn Helgaas wrote: > On Mon, Jan 13, 2020 at 05:13:38PM +, Derrick, Jonathan wrote: > > On Mon, 2020-01-13 at 12:08 +, Lorenzo Pieralisi wrote: > > > On Fri, Jan 10, 2020 at 10:21:08AM -0700, Jon Derrick wrote: > > &g

Re: [PATCH v4 6/7] PCI: vmd: Stop overriding dma_map_ops

2020-01-20 Thread Lorenzo Pieralisi
ick > --- > drivers/pci/controller/Kconfig | 1 - > drivers/pci/controller/vmd.c | 150 > ----- > 2 files changed, 151 deletions(-) Acked-by: Lorenzo Pieralisi > diff --git a/drivers/pci/controller/Kconfig b/drivers/pci/controller/Kc

Re: [PATCH v4 0/7] Clean up VMD DMA Map Ops

2020-01-20 Thread Lorenzo Pieralisi
On Sun, Jan 19, 2020 at 11:25:23PM +0100, Christoph Hellwig wrote: > This series looks good to me (modulo the one minor nitpick which isn't > all that important): > > Reviewed-by: Christoph Hellwig Hi Bjorn, are you picking this up ? I can merge it too but since it is mostly x86 changes I recko

Re: [PATCH v5 3/7] PCI: Introduce pci_real_dma_dev()

2020-01-23 Thread Lorenzo Pieralisi
On Wed, Jan 22, 2020 at 03:12:59PM -0600, Bjorn Helgaas wrote: > On Tue, Jan 21, 2020 at 06:37:47AM -0700, Jon Derrick wrote: > > The current DMA alias implementation requires the aliased device be on > > the same PCI bus as the requester ID. This introduces an arch-specific > > mechanism to point

[RFC PATCH 00/11] ACPI IORT ARM SMMU support

2016-04-14 Thread Lorenzo Pieralisi
o/?l=linux-arm-kernel&m=145675372917701&w=2 T.Nowicki "Introduce ACPI world to ITS irqchip" https://marc.info/?l=linux-acpi&m=145976009630179&w=2 Tested on Juno-r2 board with both DT and ACPI probing paths. Lorenzo Pieralisi (11): drivers: acpi: iort: fix struct pci_dev com

  1   2   3   4   >