Re: [PATCH v6 4/6] iommu/arm-smmu: Add the device_link between masters and smmu

2018-02-02 Thread Sricharan R
Hi Robin, On 2/2/2018 5:01 PM, Robin Murphy wrote: > On 02/02/18 05:40, Sricharan R wrote: >> Hi Robin/Vivek, >> >> On 2/1/2018 2:23 PM, Vivek Gautam wrote: >>> Hi, >>> >>> >>> On 1/31/2018 6:39 PM, Robin Murphy wrote: >>>> O

Re: [PATCH v6 4/6] iommu/arm-smmu: Add the device_link between masters and smmu

2018-02-01 Thread Sricharan R
Hi Robin/Vivek, On 2/1/2018 2:23 PM, Vivek Gautam wrote: > Hi, > > > On 1/31/2018 6:39 PM, Robin Murphy wrote: >> On 19/01/18 11:43, Vivek Gautam wrote: >>> From: Sricharan R <sricha...@codeaurora.org> >>> >>> Finally add the device link betwe

Re: [PATCH v6 3/6] iommu/arm-smmu: Invoke pm_runtime during probe, add/remove device

2018-02-01 Thread Sricharan R
Hi Robin, On 1/31/2018 6:36 PM, Robin Murphy wrote: > On 19/01/18 11:43, Vivek Gautam wrote: >> From: Sricharan R <sricha...@codeaurora.org> >> >> The smmu device probe/remove and add/remove master device callbacks >> gets called when the smmu is not link

Re: [PATCH 2/2] iommu: Clean up of_iommu_init_fn

2018-01-08 Thread Sricharan R
_LICENSE("GPL v2"); > diff --git a/include/linux/of_iommu.h b/include/linux/of_iommu.h > index 13394ac83c66..0cac59db95bc 100644 > --- a/include/linux/of_iommu.h > +++ b/include/linux/of_iommu.h > @@ -33,9 +33,6 @@ static inline const struct iommu_ops > *of_iommu_configure(s

Re: [PATCH 1/2] iommu/msm: Claim bus ops on probe

2018-01-08 Thread Sricharan R
0; > -} > - > -static int __init msm_iommu_of_setup(struct device_node *np) > -{ > - msm_iommu_init(); > - return 0; > -} > - > -IOMMU_OF_DECLARE(msm_iommu_of, "qcom,apq8064-iommu", msm_iommu_of_setup); > +IOMMU_OF_DECLARE(msm_iommu_of, "qcom,apq8064

Re: [PATCH 1/4] iommu/msm: Add iommu_group support

2017-07-26 Thread Sricharan R
Hi Robin, On 7/24/2017 3:25 PM, Robin Murphy wrote: > On 24/07/17 08:34, Sricharan R wrote: >> Hi Robin, >> >>> As the last step to making groups mandatory, clean up the remaining >>> drivers by adding basic support. Whilst it may not perfectly refle

Re: [PATCH 1/4] iommu/msm: Add iommu_group support

2017-07-24 Thread Sricharan R
Hi Robin, > As the last step to making groups mandatory, clean up the remaining > drivers by adding basic support. Whilst it may not perfectly reflect the > isolation capabilities of the hardware, using generic_device_group() > should at least maintain existing behaviour with respect to the API.

Re: [PATCH 1/2] iommu/arm-smmu: Track context bank state

2017-07-18 Thread Sricharan R
Hi Robin, On 7/18/2017 6:14 PM, Robin Murphy wrote: > Echoing what we do for Stream Map Entries, maintain a software shadow > state for context bank configuration. With this in place, we are mere > moments away from blissfully easy suspend/resume support. > > Signed-off-by: Robin Murphy

Re: [PATCH V4 3/6] iommu/arm-smmu: Invoke pm_runtime during probe, add/remove device

2017-07-17 Thread Sricharan R
Hi, On 7/17/2017 5:16 PM, Sricharan R wrote: > Hi, > > On 7/15/2017 1:09 AM, Rob Clark wrote: >> On Fri, Jul 14, 2017 at 3:36 PM, Will Deacon <will.dea...@arm.com> wrote: >>> On Fri, Jul 14, 2017 at 03:34:42PM -0400, Rob Clark wrote: >>>> On Fri, Jul

Re: [PATCH V4 3/6] iommu/arm-smmu: Invoke pm_runtime during probe, add/remove device

2017-07-17 Thread Sricharan R
2017 at 1:07 PM, Will Deacon <will.dea...@arm.com> >>>>>>> wrote: >>>>>>>> On Thu, Jul 13, 2017 at 10:55:10AM -0400, Rob Clark wrote: >>>>>>>>> On Thu, Jul 13, 2017 at 9:53 AM, Sricharan R >>>>&

Re: [PATCH V4 3/6] iommu/arm-smmu: Invoke pm_runtime during probe, add/remove device

2017-07-13 Thread Sricharan R
Hi, On 7/13/2017 5:20 PM, Rob Clark wrote: > On Thu, Jul 13, 2017 at 1:35 AM, Sricharan R <sricha...@codeaurora.org> wrote: >> Hi Vivek, >> >> On 7/13/2017 10:43 AM, Vivek Gautam wrote: >>> Hi Stephen, >>> >>> >>> On 07/13/2017

Re: [PATCH V4 3/6] iommu/arm-smmu: Invoke pm_runtime during probe, add/remove device

2017-07-12 Thread Sricharan R
Hi Vivek, On 7/13/2017 10:43 AM, Vivek Gautam wrote: > Hi Stephen, > > > On 07/13/2017 04:24 AM, Stephen Boyd wrote: >> On 07/06, Vivek Gautam wrote: >>> @@ -1231,12 +1237,18 @@ static int arm_smmu_map(struct iommu_domain >>> *domain, unsigned long iova, >>> static size_t

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

2017-05-28 Thread Sricharan R
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_configure >> can pass back error values like

[PATCH v6 6/6] arm: dma-mapping: Reset the device's dma_ops

2017-05-27 Thread Sricharan R
. This takes care of resetting the dma_ops in the teardown path. Fixes: 09515ef5ddad ("of/acpi: Configure dma operations at probe time for platform/amba/pci bus devices") Reviewed-by: Laurent Pinchart <laurent.pinch...@ideasonboard.com> Signed-off-by: Sricharan R <sricha...@codeau

[PATCH v6 4/6] ARM: dma-mapping: Don't tear down third-party mappings

2017-05-27 Thread Sricharan R
From: Laurent Pinchart arch_setup_dma_ops() is used in device probe code paths to create an IOMMU mapping and attach it to the device. The function assumes that the device is attached to a device-specific IOMMU instance (or at least a device-specific

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

2017-05-27 Thread Sricharan R
-EPROBE_DEFER from iort_iommu_configure. Fixes: 5a1bb638d567 ("drivers: acpi: Handle IOMMU lookup failure with deferred probing or error") Signed-off-by: Sricharan R <sricha...@codeaurora.org> --- drivers/acpi/arm64/iort.c | 6 ++ drivers/acpi/scan.c | 4 ++-- 2 files changed, 8

[PATCH v6 5/6] ACPI/IORT: Move the check to get iommu_ops from translated fwspec

2017-05-27 Thread Sricharan R
From: Lorenzo Pieralisi With IOMMU probe deferral, iort_iommu_configure can be called multiple times for the same device. Hence we have a check to see if the device's fwspec is already translated and return the iommu_ops from that directly. But the check is wrongly

[PATCH v6 1/6] iommu: of: Fix check for returning EPROBE_DEFER

2017-05-27 Thread Sricharan R
inux-m68k.org> Reviewed-by: Laurent Pinchart <laurent.pinch...@ideasonboard.com> Tested-by: Will Deacon <will.dea...@arm.com> Tested-by: Magnus Damn <magnus.d...@gmail.com> Acked-by: Will Deacon <will.dea...@arm.com> Signed-off-by: Sricharan R <sricha...@codeaurora.org&g

[PATCH v6 2/6] iommu: of: Ignore all errors except EPROBE_DEFER

2017-05-27 Thread Sricharan R
from of_iommu_configure. Fixes: 7b07cbefb68d ("iommu: of: Handle IOMMU lookup failure with deferred probing or error") Reported-by: Geert Uytterhoeven <ge...@linux-m68k.org> Tested-by: Magnus Damn <magnus.d...@gmail.com> Signed-off-by: Sricharan R <sricha...@codeauror

Re: [PATCH v2] arm: dma-mapping: Reset the device's dma_ops

2017-05-26 Thread Sricharan R
Hi Laurent, On 5/26/2017 7:44 PM, Laurent Pinchart wrote: > Hi Sricharan, > > Thank you for the patch. > > On Friday 26 May 2017 16:13:37 Sricharan R wrote: >> arch_teardown_dma_ops() being the inverse of arch_setup_dma_ops() >> ,dma_ops should be cleared in the tea

[PATCH v2] arm: dma-mapping: Reset the device's dma_ops

2017-05-26 Thread Sricharan R
. This takes care of resetting the dma_ops in the teardown path. Signed-off-by: Sricharan R <sricha...@codeaurora.org> Fixes: 09515ef5ddad ("of/acpi: Configure dma operations at probe time for platform/amba/pci bus devices") --- arch/arm/mm/dma-mapping.c | 25 ++---

Re: [PATCH V3 6/8] arm: dma-mapping: Reset the device's dma_ops

2017-05-25 Thread Sricharan R
Hi Russell, On 5/25/2017 8:35 PM, Russell King - ARM Linux wrote: > On Wed, May 24, 2017 at 02:26:13PM +0300, Laurent Pinchart wrote: >> Again, the patch I propose is the simplest v4.12-rc fix I can think of, >> short >> of reverting your complete IOMMU probe deferral patch series. Let's focus

Re: [PATCH V3 6/8] arm: dma-mapping: Reset the device's dma_ops

2017-05-24 Thread Sricharan R
Hi Laurent, On 5/24/2017 4:56 PM, Laurent Pinchart wrote: > Hello, > > On Wednesday 24 May 2017 16:01:45 Sricharan R wrote: >> On 5/24/2017 4:12 AM, Russell King - ARM Linux wrote: >>> On Wed, May 24, 2017 at 12:46:51AM +0300, Laurent Pinchart wrote: >>>> On

Re: [PATCH V3 6/8] arm: dma-mapping: Reset the device's dma_ops

2017-05-24 Thread Sricharan R
Hi Russell/Laurent/Robin, On 5/24/2017 4:12 AM, Russell King - ARM Linux wrote: > On Wed, May 24, 2017 at 12:46:51AM +0300, Laurent Pinchart wrote: >> Hi Russell, >> >> On Tuesday 23 May 2017 18:53:19 Russell King - ARM Linux wrote: >>> On Tue, May 23, 2017 at 05:55:57PM +0100, Robin Murphy

[PATCH v5 5/5] ACPI/IORT: Move the check to get iommu_ops from translated fwspec

2017-05-23 Thread Sricharan R
From: Lorenzo Pieralisi With IOMMU probe deferral, iort_iommu_configure can be called multiple times for the same device. Hence we have a check to see if the device's fwspec is already translated and return the iommu_ops from that directly. But the check is wrongly

[PATCH v5 4/5] ARM: dma-mapping: Don't tear third-party mappings

2017-05-23 Thread Sricharan R
From: Laurent Pinchart arch_setup_dma_ops() is used in device probe code paths to create an IOMMU mapping and attach it to the device. The function assumes that the device is attached to a device-specific IOMMU instance (or at least a device-specific

[PATCH v5 2/5] iommu: of: Ignore all errors except EPROBE_DEFER

2017-05-23 Thread Sricharan R
from of_iommu_configure. Fixes: 7b07cbefb68d ("iommu: of: Handle IOMMU lookup failure with deferred probing or error") Reported-by: Geert Uytterhoeven <ge...@linux-m68k.org> Tested-by: Magnus Damn <magnus.d...@gmail.com> Signed-off-by: Sricharan R <sricha...@codeaurora.org&

[PATCH v5 1/5] iommu: of: Fix check for returning EPROBE_DEFER

2017-05-23 Thread Sricharan R
to is marked in DT as 'status=disabled', then the IOMMU is never is going to get probed. So simply return NULL and let the master work without an IOMMU. Fixes: 7b07cbefb68d ("iommu: of: Handle IOMMU lookup failure with deferred probing or error") Signed-off-by: Sricharan R <sricha...@c

[PATCH v5 3/5] ACPI/IORT: Ignore all errors except EPROBE_DEFER

2017-05-23 Thread Sricharan R
-EPROBE_DEFER from iort_iommu_configure. Fixes: 5a1bb638d567 ("drivers: acpi: Handle IOMMU lookup failure with deferred probing or error") Signed-off-by: Sricharan R <sricha...@codeaurora.org> --- [v5] Added the check in acpi_dma_configure drivers/acpi/arm64/iort.c | 6 ++ drivers/acpi/

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

2017-05-23 Thread Sricharan R
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, Sricharan R wrote: >>> This is an equivalent to the DT's handling of the iommu master's probe

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

2017-05-23 Thread Sricharan R
Hi, On 5/23/2017 11:56 AM, Nate Watterson wrote: > Hi Sricharan, > > On 4/10/2017 7:21 AM, Sricharan R wrote: >> This is an equivalent to the DT's handling of the iommu master's probe >> with deferred probing when the corrsponding iommu is not probed yet. >> The lac

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

2017-05-22 Thread Sricharan R
Hi Lorenzo, On 5/22/2017 5:01 PM, Lorenzo Pieralisi wrote: > 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:16P

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

2017-05-22 Thread Sricharan R
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 IOMMU masters, xlate and >> add_device callbacks called from iort_iommu_configure >> can pass bac

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

2017-05-18 Thread Sricharan R
ilure with deferred probing or error") Signed-off-by: Sricharan R <sricha...@codeaurora.org> --- [V4] Added this patch newly. drivers/acpi/arm64/iort.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/acpi/arm64/iort.c b/drivers/acpi/arm64/iort.c index c5fecf9

[PATCH V4 4/4] ARM: dma-mapping: Don't tear third-party mappings

2017-05-18 Thread Sricharan R
From: Laurent Pinchart arch_setup_dma_ops() is used in device probe code paths to create an IOMMU mapping and attach it to the device. The function assumes that the device is attached to a device-specific IOMMU instance (or at least a device-specific

[PATCH V4 1/4] iommu: of: Fix check for returning EPROBE_DEFER

2017-05-18 Thread Sricharan R
to is marked in DT as 'status=disabled', then the IOMMU is never is going to get probed. So simply return NULL and let the master work without an IOMMU. Fixes: 7b07cbefb68d ("iommu: of: Handle IOMMU lookup failure with deferred probing or error") Signed-off-by: Sricharan R <sricha...@c

[PATCH V4 2/4] iommu: of: Ignore all errors except EPROBE_DEFER

2017-05-18 Thread Sricharan R
ilure with deferred probing or error") Reported-by: Geert Uytterhoeven <ge...@linux-m68k.org> Tested-by: Magnus Damn <magnus.d...@gmail.com> Signed-off-by: Sricharan R <sricha...@codeaurora.org> --- [V4] Reworded commit log and changed dev_info to dev_dbg drivers/iommu/of_iommu.c |

Re: [PATCH V2 2/3] iommu: of: Ignore all errors except EPROBE_DEFER

2017-05-18 Thread Sricharan R
Hi Laurent, On 5/18/2017 7:13 PM, Laurent Pinchart wrote: > Hi Sricharan > > On Thursday 18 May 2017 19:08:12 Sricharan R wrote: >> On 5/18/2017 6:00 PM, Laurent Pinchart wrote: >>> On Thursday 18 May 2017 17:26:14 Sricharan R wrote: >>>> On 5/18/

Re: [PATCH V2 2/3] iommu: of: Ignore all errors except EPROBE_DEFER

2017-05-18 Thread Sricharan R
Hi Laurent, On 5/18/2017 6:00 PM, Laurent Pinchart wrote: > Hi Sricharan, > > On Thursday 18 May 2017 17:26:14 Sricharan R wrote: >> On 5/18/2017 4:09 PM, Laurent Pinchart wrote: >>> On Thursday 18 May 2017 15:37:09 Sricharan R wrote: >>>> While deferring th

Re: [PATCH V2 2/3] iommu: of: Ignore all errors except EPROBE_DEFER

2017-05-18 Thread Sricharan R
Hi Laurent, On 5/18/2017 4:09 PM, Laurent Pinchart wrote: > Hi Sricharan, > > Thank you for the patch. > > On Thursday 18 May 2017 15:37:09 Sricharan R wrote: >> While deferring the probe of IOMMU masters, >> xlate and add_device callback can pass back error values &

[PATCH V2 2/3] iommu: of: Ignore all errors except EPROBE_DEFER

2017-05-18 Thread Sricharan R
without an IOMMU. Fixes: 7b07cbefb68d ("iommu: of: Handle IOMMU lookup failure with deferred probing or error") Reported-by: Geert Uytterhoeven <ge...@linux-m68k.org> Tested-by: Magnus Damn <magnus.d...@gmail.com> Signed-off-by: Sricharan R <sricha...@codeaurora.org> ---

[PATCH V2 1/3] iommu: of: Fix check for returning EPROBE_DEFER

2017-05-18 Thread Sricharan R
to is marked in DT as 'status=disabled', then the IOMMU is never is going to get probed. So simply return NULL and let the master work without an IOMMU. Fixes: 7b07cbefb68d ("iommu: of: Handle IOMMU lookup failure with deferred probing or error") Signed-off-by: Sricharan R <sricha...@c

[PATCH V2 3/3] ARM: dma-mapping: Don't tear third-party mappings

2017-05-18 Thread Sricharan R
From: Laurent Pinchart arch_setup_dma_ops() is used in device probe code paths to create an IOMMU mapping and attach it to the device. The function assumes that the device is attached to a device-specific IOMMU instance (or at least a device-specific

Re: [PATCH 1/3] iommu: of: Fix check for returning EPROBE_DEFER

2017-05-18 Thread Sricharan R
Hi Bjorn, On 5/17/2017 10:34 PM, Bjorn Helgaas wrote: > On Wed, May 17, 2017 at 05:00:07PM +0530, Sricharan R wrote: >> Now with iommu probe deferral, we return -EPROBE_DEFER >> for master's that are connected to an iommu which is not > > s/master's/masters/ > > s/i

[PATCH 3/3] ARM: dma-mapping: Don't tear third-party mappings

2017-05-17 Thread Sricharan R
From: Laurent Pinchart arch_setup_dma_ops() is used in device probe code paths to create an IOMMU mapping and attach it to the device. The function assumes that the device is attached to a device-specific IOMMU instance (or at least a device-specific

[PATCH 2/3] iommu: of: Ignore all errors except EPROBE_DEFER

2017-05-17 Thread Sricharan R
without an iommu. Fixes: 7b07cbefb68d ("iommu: of: Handle IOMMU lookup failure with deferred probing or error") Reported-by: Geert Uytterhoeven <ge...@linux-m68k.org> Tested-by: Magnus Damn <magnus.d...@gmail.com> Signed-off-by: Sricharan R <sricha...@codeaurora.org> ---

[PATCH 1/3] iommu: of: Fix check for returning EPROBE_DEFER

2017-05-17 Thread Sricharan R
to is marked in DT as 'status=disabled', then the iommu is never is going to get probed. So simply return NULL and let the master work without an iommu. Fixes: 7b07cbefb68d ("iommu: of: Handle IOMMU lookup failure with deferred probing or error") Signed-off-by: Sricharan R <sricha...@c

Re: [PATCH V8 07/11] iommu: of: Handle IOMMU lookup failure with deferred probing or error

2017-05-17 Thread Sricharan R
Hi Magnus, >> Magnus, do you have a suggestion? > > Thanks for your efforts guys! > > I've recently been working on up-porting the IPMMU patches and > addressing review comments. Now with my local driver stack on top of > v4.12-rc (a95cfad) I did not notice these issues initially since I >

Re: [PATCH] iommu: of: Fix check for returning EPROBE_DEFER

2017-05-16 Thread Sricharan R
Hi, On 5/16/2017 7:39 PM, Jonathan Neuschäfer wrote: > Hi, I have a few suggestions on how to make this commit message more > readable: > > On Tue, May 16, 2017 at 10:54:13AM +0530, Sricharan R wrote: >> While returning EPROBE_DEFER for iommu masters > > Add a comma

Re: [PATCH] ARM: dma-mapping: Don't tear third-party mappings

2017-05-16 Thread Sricharan R
persede 8674/1 currently in >> Russell's incoming box? > > Yes I think it should. Could you please take care of that ? > > You can also add my > was > Tested-by: Laurent Pinchart <laurent.pinch...@ideasonboard.com> > > as I've tested that this paptch restores proper

[PATCH] iommu: of: Fix check for returning EPROBE_DEFER

2017-05-15 Thread Sricharan R
While returning EPROBE_DEFER for iommu masters take in to account of iommu nodes that could be marked in DT as 'status=disabled', in which case simply return NULL and let the master's probe continue rather than deferring. Signed-off-by: Sricharan R <sricha...@codeaurora.org>

Re: [PATCH 3/4] iommu: add qcom_iommu

2017-05-11 Thread Sricharan R
Hi, On 5/11/2017 10:20 PM, Rob Clark wrote: > On Thu, May 11, 2017 at 11:08 AM, Sricharan R <sricha...@codeaurora.org> > wrote: >> Hi Rob, >> >> >> >>> +static irqreturn_t qcom_iommu_fault(int irq, void *dev) >>> +{ >>> +

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

2017-05-08 Thread Sricharan R
Hi, On 5/8/2017 4:53 PM, Marek Szyprowski wrote: > Hi Sricharan, > > On 2017-04-10 13:20, Sricharan R wrote: >> This series calls the dma ops configuration for the devices >> at a generic place so that it works for all busses. >> The dma_configure_ops for a

Re: [PATCH 3/4] iommu: add qcom_iommu

2017-05-05 Thread Sricharan R
< snip ..> >> + >> +static struct platform_driver qcom_iommu_driver = { >> + .driver = { >> + .name = "qcom-iommu", >> + .of_match_table = of_match_ptr(qcom_iommu_of_match), >> + .pm = _iommu_pm_ops, >> + }, >> +

Re: [PATCH V8 07/11] iommu: of: Handle IOMMU lookup failure with deferred probing or error

2017-05-03 Thread Sricharan R
Hi Robin, On 5/3/2017 3:24 PM, Robin Murphy wrote: > Hi Geert, > > On 02/05/17 19:35, Geert Uytterhoeven wrote: >> Hi Sricharan, >> >> On Fri, Feb 3, 2017 at 4:48 PM, Sricharan R <sricha...@codeaurora.org> wrote: >>> From: Laurent Pinchart

[PATCH V11 06/11] of/acpi: Configure dma operations at probe time for platform/amba/pci bus devices

2017-04-10 Thread Sricharan R
@arm.com> Acked-by: Rob Herring <r...@kernel.org> Acked-by: Bjorn Helgaas <bhelg...@google.com> (drivers/pci part) Acked-by: Rafael J. Wysocki <rafael.j.wyso...@intel.com> Signed-off-by: Sricharan R <sricha...@codeaurora.org> --- drivers/acpi/glue.c |

[PATCH V11 04/11] ACPI/IORT: Add function to check SMMUs drivers presence

2017-04-10 Thread Sricharan R
d-by: Robin Murphy <robin.mur...@arm.com> Cc: Sricharan R <sricha...@codeaurora.org> --- drivers/acpi/arm64/iort.c | 13 + 1 file changed, 13 insertions(+) diff --git a/drivers/acpi/arm64/iort.c b/drivers/acpi/arm64/iort.c index 4a5bb96..3dd9ec3 100644 --- a/drivers/acpi/arm64/i

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

2017-04-10 Thread Sricharan R
led multiple times for same device] Signed-off-by: Lorenzo Pieralisi <lorenzo.pieral...@arm.com> Signed-off-by: Sricharan R <sricha...@codeaurora.org> --- drivers/acpi/arm64/iort.c | 33 - drivers/acpi/scan.c| 11 --- drivers/base/dma-ma

[PATCH V11 10/11] iommu/arm-smmu: Clean up early-probing workarounds

2017-04-10 Thread Sricharan R
f-by: Robin Murphy <robin.mur...@arm.com> [Sricharan: Rebased on top of ACPI IORT SMMU series] Signed-off-by: Sricharan R <sricha...@codeaurora.org> --- drivers/iommu/arm-smmu-v3.c | 46 +- drivers/iommu/arm-smmu.c| 110 +++-

[PATCH V11 11/11] ACPI/IORT: Remove linker section for IORT entries probing

2017-04-10 Thread Sricharan R
in.mur...@arm.com> Signed-off-by: Lorenzo Pieralisi <lorenzo.pieral...@arm.com> Cc: Sricharan R <sricha...@codeaurora.org> --- drivers/acpi/arm64/iort.c | 2 -- include/asm-generic/vmlinux.lds.h | 1 - include/linux/acpi_iort.h | 3 --- 3 files changed, 6 deletions(-)

[PATCH V11 05/11] of: device: Fix overflow of coherent_dma_mask

2017-04-10 Thread Sricharan R
y: Rob Herring <r...@kernel.org> Signed-off-by: Sricharan R <sricha...@codeaurora.org> --- drivers/of/device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/of/device.c b/drivers/of/device.c index 0d378c0..e1ae9e7 100644 --- a/drivers/of/device.c +++ b/d

[PATCH V11 07/11] iommu: of: Handle IOMMU lookup failure with deferred probing or error

2017-04-10 Thread Sricharan R
@arm.com> Acked-by: Rob Herring <r...@kernel.org> Signed-off-by: Laurent Pichart <laurent.pinchart+rene...@ideasonboard.com> Signed-off-by: Sricharan R <sricha...@codeaurora.org> --- [V11] Small change to return non-void value in one of returns in of_dma_configure, a

[PATCH V11 09/11] arm64: dma-mapping: Remove the notifier trick to handle early setting of dma_ops

2017-04-10 Thread Sricharan R
row...@samsung.com> Tested-by: Hanjun Guo <hanjun@linaro.org> Acked-by: Will Deacon <will.dea...@arm.com> Signed-off-by: Sricharan R <sricha...@codeaurora.org> [rm: clean up even more] Signed-off-by: Robin Murphy <robin.mur...@arm.com> --- arc

[PATCH V11 00/11] IOMMU probe deferral support

2017-04-10 Thread Sricharan R
s presence ACPI/IORT: Remove linker section for IORT entries probing Robin Murphy (3): iommu/of: Refactor of_iommu_configure() for error handling iommu/of: Prepare for deferred IOMMU configuration iommu/arm-smmu: Clean up early-probing workarounds Sricharan R (4): of: device: Fi

[PATCH V11 02/11] iommu/of: Prepare for deferred IOMMU configuration

2017-04-10 Thread Sricharan R
From: Robin Murphy IOMMU configuration represents unchanging properties of the hardware, and as such should only need happen once in a device's lifetime, but the necessary interaction with the IOMMU device and driver complicates exactly when that point should be. Since the

[PATCH V11 03/11] of: dma: Make of_dma_deconfigure() public

2017-04-10 Thread Sricharan R
From: Laurent Pinchart As part of moving DMA initializing to probe time the of_dma_deconfigure() function will need to be called from different source files. Make it public and move it to drivers/of/device.c where the of_dma_configure() function is.

Re: [PATCH V3 0/5] iommu/arm-smmu: Add runtime pm/sleep support

2017-04-09 Thread Sricharan R
u, Mar 09, 2017 at 09:05:43PM +0530, Sricharan R wrote: This series provides the support for turning on the arm-smmu's clocks/power domains using runtime pm. This is done using the recently introduced device links patches, which lets the symmu's runtime to follow the master's runtime pm, so th

Re: [PATCH V10 06/12] of: device: Fix overflow of coherent_dma_mask

2017-04-06 Thread Sricharan R
Hi Frank, On 4/7/2017 1:04 AM, Frank Rowand wrote: On 04/06/17 04:01, Sricharan R wrote: Hi Frank, On 4/6/2017 12:31 PM, Frank Rowand wrote: On 04/04/17 03:18, Sricharan R wrote: Size of the dma-range is calculated as coherent_dma_mask + 1 and passed to arch_setup_dma_ops further

Re: [PATCH V10 06/12] of: device: Fix overflow of coherent_dma_mask

2017-04-06 Thread Sricharan R
Hi Frank, On 4/6/2017 12:31 PM, Frank Rowand wrote: On 04/04/17 03:18, Sricharan R wrote: Size of the dma-range is calculated as coherent_dma_mask + 1 and passed to arch_setup_dma_ops further. It overflows when the coherent_dma_mask is set for full 64 bits 0x, resulting in size

Re: [PATCH V10 03/12] of: dma: Move range size workaround to of_dma_get_range()

2017-04-06 Thread Sricharan R
Hi Frank, On 4/6/2017 11:54 AM, Frank Rowand wrote: On 04/04/17 03:18, Sricharan R wrote: From: Laurent Pinchart <laurent.pinchart+rene...@ideasonboard.com> Invalid dma-ranges values should be worked around when retrieving the DMA range in of_dma_get_range(), not by all c

Re: [PATCH V10 07/12] of/acpi: Configure dma operations at probe time for platform/amba/pci bus devices

2017-04-04 Thread Sricharan R
Hi Robin, On 4/4/2017 5:47 PM, Robin Murphy wrote: On 04/04/17 11:18, 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

[PATCH V10 10/12] arm64: dma-mapping: Remove the notifier trick to handle early setting of dma_ops

2017-04-04 Thread Sricharan R
row...@samsung.com> Tested-by: Hanjun Guo <hanjun@linaro.org> Acked-by: Will Deacon <will.dea...@arm.com> Signed-off-by: Sricharan R <sricha...@codeaurora.org> [rm: clean up even more] Signed-off-by: Robin Murphy <robin.mur...@arm.com> --- arc

[PATCH V10 11/12] iommu/arm-smmu: Clean up early-probing workarounds

2017-04-04 Thread Sricharan R
f-by: Robin Murphy <robin.mur...@arm.com> [Sricharan: Rebased on top of ACPI IORT SMMU series] Signed-off-by: Sricharan R <sricha...@codeaurora.org> --- drivers/iommu/arm-smmu-v3.c | 46 +- drivers/iommu/arm-smmu.c| 110 +++-

[PATCH V10 12/12] ACPI/IORT: Remove linker section for IORT entries probing

2017-04-04 Thread Sricharan R
ralisi <lorenzo.pieral...@arm.com> Cc: Robin Murphy <robin.mur...@arm.com> Cc: Sricharan R <sricha...@codeaurora.org> --- drivers/acpi/arm64/iort.c | 2 -- include/asm-generic/vmlinux.lds.h | 1 - include/linux/acpi_iort.h | 3 --- 3 files changed, 6 deletions(-) diff --g

[PATCH V10 09/12] drivers: acpi: Handle IOMMU lookup failure with deferred probing or error

2017-04-04 Thread Sricharan R
orenzo Pieralisi <lorenzo.pieral...@arm.com> Signed-off-by: Sricharan R <sricha...@codeaurora.org> --- [V10] Added Lorenzo's ACPI fix for coherent_dma_mask overflow and the fix for dma_configure getting called more than once for the same device. drivers/acpi/

[PATCH V10 08/12] iommu: of: Handle IOMMU lookup failure with deferred probing or error

2017-04-04 Thread Sricharan R
t.pinchart+rene...@ideasonboard.com> Signed-off-by: Sricharan R <sricha...@codeaurora.org> --- drivers/base/dma-mapping.c | 5 +++-- drivers/iommu/of_iommu.c | 4 ++-- drivers/of/device.c| 7 ++- include/linux/of_device.h | 9 ++--- 4 files changed, 17 insertions(+), 8

[PATCH V10 02/12] iommu/of: Prepare for deferred IOMMU configuration

2017-04-04 Thread Sricharan R
From: Robin Murphy IOMMU configuration represents unchanging properties of the hardware, and as such should only need happen once in a device's lifetime, but the necessary interaction with the IOMMU device and driver complicates exactly when that point should be. Since the

[PATCH V10 06/12] of: device: Fix overflow of coherent_dma_mask

2017-04-04 Thread Sricharan R
that in this case when the mask is set to full 64bits, we will be passing the mask itself to arch_setup_dma_ops instead of the size. The real fix for this should be to make arch_setup_dma_ops receive the mask and handle it, to be done in the future. Signed-off-by: Sricharan R <sricha...@codeaurora.

[PATCH V10 03/12] of: dma: Move range size workaround to of_dma_get_range()

2017-04-04 Thread Sricharan R
From: Laurent Pinchart Invalid dma-ranges values should be worked around when retrieving the DMA range in of_dma_get_range(), not by all callers of the function. This isn't much of a problem now that we have a single caller, but that situation will

[PATCH V10 07/12] of/acpi: Configure dma operations at probe time for platform/amba/pci bus devices

2017-04-04 Thread Sricharan R
e.com> (drivers/pci part) Acked-by: Rafael J. Wysocki <rafael.j.wyso...@intel.com> Signed-off-by: Sricharan R <sricha...@codeaurora.org> --- [V10] Added dummy dma_(de)configure functions in case of !CONFIG_HAS_DMA to avoid build breaks. drivers/acpi/glue.c

[PATCH V10 04/12] of: dma: Make of_dma_deconfigure() public

2017-04-04 Thread Sricharan R
From: Laurent Pinchart As part of moving DMA initializing to probe time the of_dma_deconfigure() function will need to be called from different source files. Make it public and move it to drivers/of/device.c where the of_dma_configure() function is.

[PATCH V10 01/12] iommu/of: Refactor of_iommu_configure() for error handling

2017-04-04 Thread Sricharan R
From: Robin Murphy In preparation for some upcoming cleverness, rework the control flow in of_iommu_configure() to minimise duplication and improve the propogation of errors. It's also as good a time as any to switch over from the now-just-a-compatibility-wrapper

[PATCH V10 00/12] IOMMU probe deferral support

2017-04-04 Thread Sricharan R
linker section for IORT entries probing Robin Murphy (3): iommu/of: Refactor of_iommu_configure() for error handling iommu/of: Prepare for deferred IOMMU configuration iommu/arm-smmu: Clean up early-probing workarounds Sricharan R (4): of: device: Fix overflow of coherent_dma_mask of/acpi

Re: [PATCH V3 0/5] iommu/arm-smmu: Add runtime pm/sleep support

2017-04-03 Thread Sricharan R
Hi Will, On 4/3/2017 10:53 PM, Will Deacon wrote: On Fri, Mar 31, 2017 at 10:58:16PM -0400, Rob Clark wrote: On Fri, Mar 31, 2017 at 1:54 PM, Will Deacon <will.dea...@arm.com> wrote: On Thu, Mar 09, 2017 at 09:05:43PM +0530, Sricharan R wrote: This series provides the support for t

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

2017-03-28 Thread Sricharan R
Hi, On 3/28/2017 7:45 PM, Shameerali Kolothum Thodi wrote: -Original Message- From: Sricharan R [mailto:sricha...@codeaurora.org] Sent: Tuesday, March 28, 2017 5:54 AM To: Robin Murphy; Shameerali Kolothum Thodi; Wangzhou (B); will.dea...@arm.com; j...@8bytes.org; lorenzo.pieral

Re: [V9, 07/11] iommu: of: Handle IOMMU lookup failure with deferred probing or error

2017-03-28 Thread Sricharan R
Hi, On 3/28/2017 8:30 PM, Rob Herring wrote: On Fri, Mar 10, 2017 at 12:30:57AM +0530, Sricharan R wrote: From: Laurent Pinchart <laurent.pinchart+rene...@ideasonboard.com> Failures to look up an IOMMU when parsing the DT iommus property need to be handled separately from the .of

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

2017-03-27 Thread Sricharan R
Hi, On 24/03/17 09:27, Shameerali Kolothum Thodi wrote: Hi Sricharan, -Original Message- From: Sricharan R [mailto:sricha...@codeaurora.org] [...] Looks like this triggers the start of the bug. So the below check in iommu_dma_init_domain fails, if (domain

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

2017-03-24 Thread Sricharan R
Hi Zhou, On 3/24/2017 9:23 AM, Zhou Wang wrote: On 2017/3/10 3:00, Sricharan R wrote: This series calls the dma ops configuration for the devices at a generic place so that it works for all busses. The dma_configure_ops for a device is now called during the device_attach callback just before

Re: [PATCH v2 5/5] iommu: Allow default domain type to be set on the kernel command line

2017-03-23 Thread Sricharan R
Hi, Replying again, as there was some issue with mailer last time. On 3/21/2017 11:47 PM, Will Deacon wrote: On Tue, Mar 21, 2017 at 05:46:29PM +, Robin Murphy wrote: On 21/03/17 17:21, Will Deacon wrote: On Tue, Mar 21, 2017 at 04:45:27PM +0100, Joerg Roedel wrote: On Fri, Mar 10, 2017

Re: [PATCH V3 2/5] iommu/arm-smmu: Add support for MMU40x/500 clocks

2017-03-20 Thread Sricharan R
Hi Rob, On 3/17/2017 2:33 AM, Rob Herring wrote: On Thu, Mar 09, 2017 at 09:05:45PM +0530, Sricharan R wrote: The MMU400x/500 is the implementation of the SMMUv2 arch specification. It is split in to two blocks TBU, TCU. TBU caches the page table, instantiated for each master locally, clocked

Re: [PATCH V3 3/5] drivers: arm-smmu: Add clock support for QCOM_SMMUV2

2017-03-20 Thread Sricharan R
Hi Rob, On 3/17/2017 2:40 AM, Rob Herring wrote: On Thu, Mar 09, 2017 at 09:05:46PM +0530, Sricharan R wrote: The QCOM_SMMUV2 is an implementation of the arm,smmu-v2 architecture. The qcom,smmu is instantiated for each of the multimedia cores (for eg) Venus (video encoder/decoder), mdp

Re: [PATCH 5/9] iommu: add qcom_iommu

2017-03-20 Thread Sricharan R
Hi Rob, sorry for the delayed response. Was not there mostly last week. On 3/13/2017 11:49 PM, Rob Clark wrote: On Mon, Mar 13, 2017 at 9:38 AM, wrote: Hi Rob, [..] +static int qcom_iommu_init_domain(struct iommu_domain *domain, +

Re: [PATCH V3 2/5] iommu/arm-smmu: Add support for MMU40x/500 clocks

2017-03-16 Thread Sricharan R
Hi, On 3/17/2017 4:22 AM, Rob Clark wrote: On Thu, Mar 9, 2017 at 10:35 AM, Sricharan R <sricha...@codeaurora.org> wrote: The MMU400x/500 is the implementation of the SMMUv2 arch specification. It is split in to two blocks TBU, TCU. TBU caches the page table, instantiated for each

[PATCH V9 11/11] ACPI/IORT: Remove linker section for IORT entries probing

2017-03-09 Thread Sricharan R
ralisi <lorenzo.pieral...@arm.com> Cc: Robin Murphy <robin.mur...@arm.com> Cc: Sricharan R <sricha...@codeaurora.org> --- drivers/acpi/arm64/iort.c | 2 -- include/asm-generic/vmlinux.lds.h | 1 - include/linux/acpi_iort.h | 3 --- 3 files changed, 6 deletions(-) diff --g

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

2017-03-09 Thread Sricharan R
master device probe depending on whether the IOMMU is optional or mandatory would be a good enhancement. Tested-by: Hanjun Guo <hanjun@linaro.org> Acked-by: Lorenzo Pieralisi <lorenzo.pieral...@arm.com> Signed-off-by: Sricharan R <sricha...@codeaurora.org> --- drivers/acpi/

[PATCH V9 09/11] arm64: dma-mapping: Remove the notifier trick to handle early setting of dma_ops

2017-03-09 Thread Sricharan R
row...@samsung.com> Tested-by: Hanjun Guo <hanjun@linaro.org> Acked-by: Will Deacon <will.dea...@arm.com> Signed-off-by: Sricharan R <sricha...@codeaurora.org> [rm: clean up even more] Signed-off-by: Robin Murphy <robin.mur...@arm.com> --- arc

[PATCH V9 06/11] of/acpi: Configure dma operations at probe time for platform/amba/pci bus devices

2017-03-09 Thread Sricharan R
e.com> (drivers/pci part) Acked-by: Rafael J. Wysocki <rafael.j.wyso...@intel.com> Signed-off-by: Sricharan R <sricha...@codeaurora.org> --- drivers/acpi/glue.c | 5 - drivers/base/dd.c | 9 + drivers/base/dma-mapping.c | 40 +++

[PATCH V9 10/11] iommu/arm-smmu: Clean up early-probing workarounds

2017-03-09 Thread Sricharan R
f-by: Robin Murphy <robin.mur...@arm.com> [Sricharan: Rebased on top of ACPI IORT SMMU series] Signed-off-by: Sricharan R <sricha...@codeaurora.org> --- drivers/iommu/arm-smmu-v3.c | 46 +- drivers/iommu/arm-smmu.c| 110 +++-

[PATCH V9 05/11] ACPI/IORT: Add function to check SMMUs drivers presence

2017-03-09 Thread Sricharan R
Murphy <robin.mur...@arm.com> Cc: Sricharan R <sricha...@codeaurora.org> --- drivers/acpi/arm64/iort.c | 13 + 1 file changed, 13 insertions(+) diff --git a/drivers/acpi/arm64/iort.c b/drivers/acpi/arm64/iort.c index 4a5bb96..3dd9ec3 100644 --- a/drivers/acpi/arm64/iort.c +

[PATCH V9 04/11] of: dma: Make of_dma_deconfigure() public

2017-03-09 Thread Sricharan R
From: Laurent Pinchart As part of moving DMA initializing to probe time the of_dma_deconfigure() function will need to be called from different source files. Make it public and move it to drivers/of/device.c where the of_dma_configure() function is.

  1   2   3   >