Re: [PATCH v13 1/4] iommu/arm-smmu: Add pm_runtime/sleep ops

2018-07-25 Thread Vivek Gautam
On Tue, Jul 24, 2018 at 8:51 PM, Robin Murphy wrote: > On 19/07/18 11:15, Vivek Gautam wrote: >> >> From: Sricharan R >> >> The smmu needs to be functional only when the respective >> master's using it are active. The device_link feature >> helps to

Re: [PATCH 1/1] iommu/arm-smmu: Add support to use Last level cache

2018-07-24 Thread Vivek Gautam
Hi Will, On Wed, Jun 27, 2018 at 10:07 PM, Will Deacon wrote: > Hi Vivek, > > On Tue, Jun 19, 2018 at 02:04:44PM +0530, Vivek Gautam wrote: >> On Fri, Jun 15, 2018 at 10:22 PM, Will Deacon wrote: >> > On Fri, Jun 15, 2018 at 04:23:29PM +0530, Vivek Gautam wrote:

Re: [PATCH 3/3] iommu/arm-smmu: Error out only if not enough context interrupts

2018-07-24 Thread Vivek Gautam
Hi Will, On 7/24/2018 2:06 PM, Will Deacon wrote: On Thu, Jul 19, 2018 at 11:23:56PM +0530, Vivek Gautam wrote: Currently we check if the number of context banks is not equal to num_context_interrupts. However, there are booloaders such as, one on sdm845 that reserves few context banks

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

2018-07-22 Thread Vivek Gautam
On Thu, Jul 19, 2018 at 3:45 PM, Vivek Gautam wrote: > This series provides the support for turning on the arm-smmu's > clocks/power domains using runtime pm. This is done using > device links between smmu and client devices. The device link > framework keeps the two devices in c

Re: [PATCH 1/3] dts: arm64/sdm845: Add node for arm,mmu-500

2018-07-20 Thread Vivek Gautam
Hi Rob, On Fri, Jul 20, 2018 at 4:38 AM, Rob Herring wrote: > On Thu, Jul 19, 2018 at 11:54 AM Vivek Gautam > wrote: >> >> Add device node for arm,mmu-500 available on sdm845. >> This MMU-500 with single TCU and multiple TBU architecture >> is shared among

[PATCH 3/3] iommu/arm-smmu: Error out only if not enough context interrupts

2018-07-19 Thread Vivek Gautam
would mention the correct number of context interrupts, this number can be greater than the number of context banks visible to smmu in kernel. We should therefore error out only when the number of context banks is greater than the available number of context interrupts. Signed-off-by: Vivek Gautam

[PATCH 2/3] dts: arm64/sdm845: Add node for qcom,smmu-v2

2018-07-19 Thread Vivek Gautam
Add device node for qcom,smmu-v2 available on sdm845. This smmu is available only to GPU device. Signed-off-by: Vivek Gautam --- One power domain required for this GPU smmu - GPU_CX_GDSC, commented out in the node is coming from gpu clock controller [1]. [1] https://lore.kernel.org/patchwork

[PATCH 1/3] dts: arm64/sdm845: Add node for arm,mmu-500

2018-07-19 Thread Vivek Gautam
Add device node for arm,mmu-500 available on sdm845. This MMU-500 with single TCU and multiple TBU architecture is shared among all the peripherals except gpu on sdm845. Signed-off-by: Vivek Gautam --- arch/arm64/boot/dts/qcom/sdm845-mtp.dts | 4 ++ arch/arm64/boot/dts/qcom/sdm845.dtsi| 73

[PATCH 0/3] Enable smmu support on sdm845

2018-07-19 Thread Vivek Gautam
the num_context_irqs is not equal to num_context_banks. [1] https://lore.kernel.org/patchwork/cover/962208/ Vivek Gautam (3): dts: arm64/sdm845: Add node for arm,mmu-500 dts: arm64/sdm845: Add node for qcom,smmu-v2 iommu/arm-smmu: Error out only if not enough context interrupts arch/arm64/boot

[PATCH v13 4/4] iommu/arm-smmu: Add support for qcom,smmu-v2 variant

2018-07-19 Thread Vivek Gautam
qcom,smmu-v2 is an arm,smmu-v2 implementation with specific clock and power requirements. This smmu core is used with multiple masters on msm8996, viz. mdss, video, etc. Add bindings for the same. Signed-off-by: Vivek Gautam Reviewed-by: Rob Herring Reviewed-by: Tomasz Figa --- Change since

[PATCH v13 3/4] iommu/arm-smmu: Add the device_link between masters and smmu

2018-07-19 Thread Vivek Gautam
-off-by: Vivek Gautam Reviewed-by: Tomasz Figa --- Changes since v12: - device_link_add() doesn't depend on pm_runtime_enabled() now. - Treat failure in device link addition as non-fatal. drivers/iommu/arm-smmu.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/iommu/arm-smmu.c b

[PATCH v13 2/4] iommu/arm-smmu: Invoke pm_runtime during probe, add/remove device

2018-07-19 Thread Vivek Gautam
runtime calls] Signed-off-by: Vivek Gautam Reviewed-by: Tomasz Figa --- Changes since v12: - Explicitly enabling and disabling clocks in probe and remove routines if runtime PM is disabled, drivers/iommu/arm-smmu.c | 101 +++ 1 file changed, 93

[PATCH v13 0/4] iommu/arm-smmu: Add runtime pm/sleep support

2018-07-19 Thread Vivek Gautam
iommu/arm-smmu: Invoke pm_runtime during probe, add/remove device iommu/arm-smmu: Add the device_link between masters and smmu Vivek Gautam (1): iommu/arm-smmu: Add support for qcom,smmu-v2 variant .../devicetree/bindings/iommu/arm,smmu.txt | 42 + drivers/

[PATCH v13 1/4] iommu/arm-smmu: Add pm_runtime/sleep ops

2018-07-19 Thread Vivek Gautam
to low power state by turning the clocks off in a system sleep. Also add corresponding clock enable path in resume callback. Signed-off-by: Sricharan R Signed-off-by: Archit Taneja [vivek: rework for clock and pm ops] Signed-off-by: Vivek Gautam Reviewed-by: Tomasz Figa --- Changes since v12

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

2018-07-18 Thread Vivek Gautam
On Wed, Jul 18, 2018 at 6:13 PM, Robin Murphy wrote: > On 18/07/18 10:30, Vivek Gautam wrote: >> >> On Wed, Jul 11, 2018 at 3:23 PM, Rafael J. Wysocki >> wrote: >>> >>> On Sunday, July 8, 2018 7:34:12 PM CEST Vivek Gautam wrote: >>>> >>&g

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

2018-07-18 Thread Vivek Gautam
On Wed, Jul 11, 2018 at 3:23 PM, Rafael J. Wysocki wrote: > On Sunday, July 8, 2018 7:34:12 PM CEST Vivek Gautam wrote: >> From: Sricharan R >> >> Finally add the device link between the master device and >> smmu, so that the smmu gets runtime enabled/disabled on

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

2018-07-17 Thread Vivek Gautam
On 7/17/2018 1:16 PM, Rafael J. Wysocki wrote: On Mon, Jul 16, 2018 at 1:46 PM, Vivek Gautam wrote: On 7/16/2018 2:25 PM, Rafael J. Wysocki wrote: On Thu, Jul 12, 2018 at 2:41 PM, Vivek Gautam wrote: Hi Rafael, On Wed, Jul 11, 2018 at 4:06 PM, Vivek Gautam wrote: Hi Rafael, On 7

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

2018-07-16 Thread Vivek Gautam
On 7/16/2018 2:25 PM, Rafael J. Wysocki wrote: On Thu, Jul 12, 2018 at 2:41 PM, Vivek Gautam wrote: Hi Rafael, On Wed, Jul 11, 2018 at 4:06 PM, Vivek Gautam wrote: Hi Rafael, On 7/11/2018 3:23 PM, Rafael J. Wysocki wrote: On Sunday, July 8, 2018 7:34:12 PM CEST Vivek Gautam wrote

Re: [PATCH v12 1/4] iommu/arm-smmu: Add pm_runtime/sleep ops

2018-07-16 Thread Vivek Gautam
HI Rafael, On 7/16/2018 2:21 PM, Rafael J. Wysocki wrote: On Thu, Jul 12, 2018 at 12:57 PM, Vivek Gautam wrote: Hi, On Wed, Jul 11, 2018 at 6:21 PM, Tomasz Figa wrote: On Wed, Jul 11, 2018 at 8:11 PM Rafael J. Wysocki wrote: On Wed, Jul 11, 2018 at 12:55 PM, Vivek Gautam wrote: Hi

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

2018-07-12 Thread Vivek Gautam
Hi Rafael, On Wed, Jul 11, 2018 at 4:06 PM, Vivek Gautam wrote: > Hi Rafael, > > > > On 7/11/2018 3:23 PM, Rafael J. Wysocki wrote: >> >> On Sunday, July 8, 2018 7:34:12 PM CEST Vivek Gautam wrote: >>> >>> From: Sricharan R >>> >

Re: [PATCH v12 1/4] iommu/arm-smmu: Add pm_runtime/sleep ops

2018-07-12 Thread Vivek Gautam
Hi, On Wed, Jul 11, 2018 at 6:21 PM, Tomasz Figa wrote: > On Wed, Jul 11, 2018 at 8:11 PM Rafael J. Wysocki wrote: >> >> On Wed, Jul 11, 2018 at 12:55 PM, Vivek Gautam >> wrote: >> > Hi Rafael, >> > >> > >> > On Wed, Jul 11, 2018 at

Re: [PATCH v12 2/4] iommu/arm-smmu: Invoke pm_runtime during probe, add/remove device

2018-07-11 Thread Vivek Gautam
On 7/11/2018 4:29 PM, Rafael J. Wysocki wrote: On Wed, Jul 11, 2018 at 12:05 PM, Tomasz Figa wrote: Hi Rafael, Thanks for review. On Wed, Jul 11, 2018 at 6:53 PM Rafael J. Wysocki wrote: On Sunday, July 8, 2018 7:34:11 PM CEST Vivek Gautam wrote: From: Sricharan R The smmu device

Re: [PATCH v12 1/4] iommu/arm-smmu: Add pm_runtime/sleep ops

2018-07-11 Thread Vivek Gautam
Hi Rafael, On Wed, Jul 11, 2018 at 3:20 PM, Rafael J. Wysocki wrote: > On Sunday, July 8, 2018 7:34:10 PM CEST Vivek Gautam wrote: >> From: Sricharan R >> >> The smmu needs to be functional only when the respective >> master's using it are active. The device_lin

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

2018-07-11 Thread Vivek Gautam
Hi Rafael, On 7/11/2018 3:23 PM, Rafael J. Wysocki wrote: On Sunday, July 8, 2018 7:34:12 PM CEST Vivek Gautam wrote: From: Sricharan R Finally add the device link between the master device and smmu, so that the smmu gets runtime enabled/disabled only when the master needs it. This is done

[PATCH v12 4/4] iommu/arm-smmu: Add support for qcom,smmu-v2 variant

2018-07-08 Thread Vivek Gautam
qcom,smmu-v2 is an arm,smmu-v2 implementation with specific clock and power requirements. This smmu core is used with multiple masters on msm8996, viz. mdss, video, etc. Add bindings for the same. Signed-off-by: Vivek Gautam Reviewed-by: Rob Herring Reviewed-by: Tomasz Figa --- - No change

[PATCH v12 3/4] iommu/arm-smmu: Add the device_link between masters and smmu

2018-07-08 Thread Vivek Gautam
-off-by: Vivek Gautam Reviewed-by: Tomasz Figa Cc: Rafael J. Wysocki Cc: Lukas Wunner --- - Change since v11 * Replaced DL_FLAG_AUTOREMOVE flag with DL_FLAG_AUTOREMOVE_SUPPLIER. drivers/iommu/arm-smmu.c | 12 1 file changed, 12 insertions(+) diff --git a/drivers/iommu/arm

[PATCH v12 2/4] iommu/arm-smmu: Invoke pm_runtime during probe, add/remove device

2018-07-08 Thread Vivek Gautam
runtime calls] Signed-off-by: Vivek Gautam Reviewed-by: Tomasz Figa --- - Change since v11 * Replaced pm_runtime_disable() with pm_runtime_force_suspend() to avoid warning about " Unpreparing enabled clock". Full warning text mentioned in cover patch. drivers/iommu/arm-s

[PATCH v12 0/4] iommu/arm-smmu: Add runtime pm/sleep support

2018-07-08 Thread Vivek Gautam
tps://patchwork.kernel.org/patch/10281613/ [11] https://patchwork.kernel.org/patch/10491481/ Sricharan R (3): iommu/arm-smmu: Add pm_runtime/sleep ops iommu/arm-smmu: Invoke pm_runtime during probe, add/remove device iommu/arm-smmu: Add the device_link between masters and smmu Vivek Gautam (1

[PATCH v12 1/4] iommu/arm-smmu: Add pm_runtime/sleep ops

2018-07-08 Thread Vivek Gautam
of clocks] Signed-off-by: Vivek Gautam Reviewed-by: Tomasz Figa --- - No change since v11. drivers/iommu/arm-smmu.c | 60 ++-- 1 file changed, 58 insertions(+), 2 deletions(-) diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c index

Re: [PATCH 1/1] iommu/arm-smmu: Add support to use Last level cache

2018-06-19 Thread Vivek Gautam
Hi Will, On Fri, Jun 15, 2018 at 10:22 PM, Will Deacon wrote: > Hi Vivek, > > On Fri, Jun 15, 2018 at 04:23:29PM +0530, Vivek Gautam wrote: >> Qualcomm SoCs have an additional level of cache called as >> System cache or Last level cache[1]. This cache sits ri

[PATCH 1/1] iommu/arm-smmu: Add support to use Last level cache

2018-06-15 Thread Vivek Gautam
DOMAIN_ATTRIBUTE_USE_UPSTREAM_HINT iommu: io-pgtable-arm: Implement IOMMU_USE_UPSTREAM_HINT [1] https://patchwork.kernel.org/patch/10422531/ [2] https://patchwork.kernel.org/patch/10302791/ Signed-off-by: Vivek Gautam --- drivers/iommu/arm-smmu.c | 14 ++ drivers/iommu/io-pgtable-arm.c | 24

Re: [PATCH RESEND] iommu/msm: Don't call iommu_device_{, un}link from atomic context

2018-06-14 Thread Vivek Gautam
ork) from [] (worker_thread+0x2c4/0x5cc) > [] (worker_thread) from [] (kthread+0x180/0x188) > [] (kthread) from [] (ret_from_fork+0x14/0x20) > > Fixes: 42df43b36163 ("iommu/msm: Make use of iommu_device_register interface") > Signed-off-by: Niklas Cassel > --- Thanks for t

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

2018-05-30 Thread Vivek Gautam
Hi Robin, On Mon, May 21, 2018 at 7:12 PM, Robin Murphy wrote: > On 22/03/18 10:22, Vivek Gautam 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 devic

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

2018-05-18 Thread Vivek Gautam
Hi Robin, On 4/9/2018 9:52 AM, Tomasz Figa wrote: Hi Will, Robin, On Thu, Mar 22, 2018 at 7:22 PM Vivek Gautam <vivek.gau...@codeaurora.org> wrote: This series provides the support for turning on the arm-smmu's clocks/power domains using runtime pm. This is done using the re

Re: [PATCH RFC 1/1] iommu/of: Deconfigure iommu on driver detach

2018-04-11 Thread Vivek Gautam
Hi Robin, On 4/3/2018 4:27 PM, Robin Murphy wrote: On 28/03/18 11:25, Vivek Gautam wrote: As part of dma_deconfigure, lets deconfigure the iommu too on driver detach, so that we clear the iommu domain and related group. Signed-off-by: Vivek Gautam <vivek.gau...@codeaurora.org> --- As

Re: [PATCH v9 5/5] iommu/arm-smmu: Add support for qcom,smmu-v2 variant

2018-04-10 Thread Vivek Gautam
Hi Yisheng, On 4/11/2018 6:52 AM, Yisheng Xie wrote: Hi Tomasz, On 2018/4/10 21:14, Tomasz Figa wrote: Hi Yisheng, Sorry, I think we missed your question here. On Wed, Mar 28, 2018 at 3:12 PM Yisheng Xie <xieyishe...@huawei.com> wrote: Hi Vivek, On 2018/3/28 12:37, Vivek Gautam

[PATCH RFC 1/1] iommu/of: Deconfigure iommu on driver detach

2018-03-28 Thread Vivek Gautam
As part of dma_deconfigure, lets deconfigure the iommu too on driver detach, so that we clear the iommu domain and related group. Signed-off-by: Vivek Gautam <vivek.gau...@codeaurora.org> --- As a part of dma_deconfigure, shouldn't we deconfigure the iommu as well? This should rever

[PATCH v11 0/4] iommu/arm-smmu: Add runtime pm/sleep support

2018-03-22 Thread Vivek Gautam
ernel.org/patch/10277975/ [10] https://patchwork.kernel.org/patch/10281613/ Sricharan R (3): iommu/arm-smmu: Add pm_runtime/sleep ops iommu/arm-smmu: Invoke pm_runtime during probe, add/remove device iommu/arm-smmu: Add the device_link between masters and smmu Vivek Gautam (1): iommu/arm-smmu:

[PATCH v11 1/4] iommu/arm-smmu: Add pm_runtime/sleep ops

2018-03-22 Thread Vivek Gautam
; Signed-off-by: Archit Taneja <arch...@codeaurora.org> [vivek: Clock rework to request bulk of clocks] Signed-off-by: Vivek Gautam <vivek.gau...@codeaurora.org> Reviewed-by: Tomasz Figa <tf...@chromium.org> --- drivers/iommu/arm-smmu.c | 60 ++

[PATCH v11 3/4] iommu/arm-smmu: Add the device_link between masters and smmu

2018-03-22 Thread Vivek Gautam
ed-off-by: Sricharan R <sricha...@codeaurora.org> Signed-off-by: Vivek Gautam <vivek.gau...@codeaurora.org> Reviewed-by: Tomasz Figa <tf...@chromium.org> --- drivers/iommu/arm-smmu.c | 12 1 file changed, 12 insertions(+) diff --git a/drivers/iommu/arm-smmu.c b/

[PATCH v11 4/4] iommu/arm-smmu: Add support for qcom,smmu-v2 variant

2018-03-22 Thread Vivek Gautam
qcom,smmu-v2 is an arm,smmu-v2 implementation with specific clock and power requirements. This smmu core is used with multiple masters on msm8996, viz. mdss, video, etc. Add bindings for the same. Signed-off-by: Vivek Gautam <vivek.gau...@codeaurora.org> Reviewed-by: Rob Herring <r...@k

[PATCH v11 2/4] iommu/arm-smmu: Invoke pm_runtime during probe, add/remove device

2018-03-22 Thread Vivek Gautam
aran R <sricha...@codeaurora.org> [vivek: Cleanup pm runtime calls] Signed-off-by: Vivek Gautam <vivek.gau...@codeaurora.org> Reviewed-by: Tomasz Figa <tf...@chromium.org> --- drivers/iommu/arm-smmu.c | 92 +++- 1 file changed, 84 in

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

2018-03-20 Thread Vivek Gautam
Hi Robin, On 3/14/2018 11:16 PM, Robin Murphy wrote: On 13/03/18 08:55, 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 linked to its master, that is without the c

Re: [PATCH v9 1/5] driver core: Find an existing link between two devices

2018-03-20 Thread Vivek Gautam
:34 PM, Vivek Gautam <vivek.gau...@codeaurora.org> wrote: On Tue, Mar 13, 2018 at 3:45 PM, Tomasz Figa <tf...@chromium.org> wrote: On Tue, Mar 13, 2018 at 5:55 PM, Vivek Gautam <vivek.gau...@codeaurora.org> wrote: The lists managing the device-links can be traversed to find the

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

2018-03-15 Thread Vivek Gautam
Hi Robin, On Wed, Mar 14, 2018 at 11:20 PM, Robin Murphy <robin.mur...@arm.com> wrote: > On 13/03/18 08:55, Vivek Gautam wrote: >> >> From: Sricharan R <sricha...@codeaurora.org> >> >> Finally add the device link between the master device and >>

[PATCH v10 1/5] driver core: Delete the link between two given devices

2018-03-14 Thread Vivek Gautam
Given the consumer and supplier devices, add an API to delete the link between them. Suggested-by: Tomasz Figa <tf...@chromium.org> Signed-off-by: Vivek Gautam <vivek.gau...@codeaurora.org> Cc: Rafael J. Wysocki <r...@rjwysocki.net> Cc: Greg Kroah-Hartman <gre..

[PATCH v10 2/5] iommu/arm-smmu: Add pm_runtime/sleep ops

2018-03-14 Thread Vivek Gautam
; Signed-off-by: Archit Taneja <arch...@codeaurora.org> [vivek: Clock rework to request bulk of clocks] Signed-off-by: Vivek Gautam <vivek.gau...@codeaurora.org> Reviewed-by: Tomasz Figa <tf...@chromium.org> --- - No change since v9.

[PATCH v10 5/5] iommu/arm-smmu: Add support for qcom,smmu-v2 variant

2018-03-14 Thread Vivek Gautam
qcom,smmu-v2 is an arm,smmu-v2 implementation with specific clock and power requirements. This smmu core is used with multiple masters on msm8996, viz. mdss, video, etc. Add bindings for the same. Signed-off-by: Vivek Gautam <vivek.gau...@codeaurora.org> Reviewed-by: Rob Herring <r...@k

[PATCH v10 4/5] iommu/arm-smmu: Add the device_link between masters and smmu

2018-03-14 Thread Vivek Gautam
ed-off-by: Sricharan R <sricha...@codeaurora.org> Signed-off-by: Vivek Gautam <vivek.gau...@codeaurora.org> Reviewed-by: Tomasz Figa <tf...@chromium.org> --- Changes since v9: - Using device_link_del_dev() to delete the device link, instead of doing it in two steps - device_l

[PATCH v10 3/5] iommu/arm-smmu: Invoke pm_runtime during probe, add/remove device

2018-03-14 Thread Vivek Gautam
aran R <sricha...@codeaurora.org> [vivek: Cleanup pm runtime calls] Signed-off-by: Vivek Gautam <vivek.gau...@codeaurora.org> Reviewed-by: Tomasz Figa <tf...@chromium.org> --- - No change since v9. drivers/iommu/arm-smmu.c | 95

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

2018-03-14 Thread Vivek Gautam
evice_link between masters and smmu Vivek Gautam (2): driver core: Delete the link between two given devices iommu/arm-smmu: Add support for qcom,smmu-v2 variant .../devicetree/bindings/iommu/arm,smmu.txt | 42 + drivers/base/core.c| 31

Re: [PATCH v9 1/5] driver core: Find an existing link between two devices

2018-03-13 Thread Vivek Gautam
Hi Robin, On Tue, Mar 13, 2018 at 6:19 PM, Robin Murphy <robin.mur...@arm.com> wrote: > On 13/03/18 09:55, Vivek Gautam wrote: >> >> On Tue, Mar 13, 2018 at 3:10 PM, Rafael J. Wysocki <r...@rjwysocki.net> >> wrote: >>> >>> On Tuesda

Re: [PATCH v9 1/5] driver core: Find an existing link between two devices

2018-03-13 Thread Vivek Gautam
Hi Tomasz, On Tue, Mar 13, 2018 at 3:45 PM, Tomasz Figa <tf...@chromium.org> wrote: > Hi Vivek, > > Thanks for the patch. > > On Tue, Mar 13, 2018 at 5:55 PM, Vivek Gautam > <vivek.gau...@codeaurora.org> wrote: >> The lists managing the device-links can be t

Re: [PATCH v9 1/5] driver core: Find an existing link between two devices

2018-03-13 Thread Vivek Gautam
On Tue, Mar 13, 2018 at 2:25 PM, Vivek Gautam <vivek.gau...@codeaurora.org> wrote: > The lists managing the device-links can be traversed to > find the link between two devices. The device_link_add() APIs > does traverse these lists to check if there's already a link > set

Re: [PATCH v9 1/5] driver core: Find an existing link between two devices

2018-03-13 Thread Vivek Gautam
On Tue, Mar 13, 2018 at 3:10 PM, Rafael J. Wysocki <r...@rjwysocki.net> wrote: > On Tuesday, March 13, 2018 9:55:30 AM CET Vivek Gautam wrote: >> The lists managing the device-links can be traversed to >> find the link between two devices. The device_link_add() APIs >>

[PATCH v9 5/5] iommu/arm-smmu: Add support for qcom,smmu-v2 variant

2018-03-13 Thread Vivek Gautam
qcom,smmu-v2 is an arm,smmu-v2 implementation with specific clock and power requirements. This smmu core is used with multiple masters on msm8996, viz. mdss, video, etc. Add bindings for the same. Signed-off-by: Vivek Gautam <vivek.gau...@codeaurora.org> Reviewed-by: Rob Herring <r...@k

[PATCH v9 4/5] iommu/arm-smmu: Add the device_link between masters and smmu

2018-03-13 Thread Vivek Gautam
ed-off-by: Sricharan R <sricha...@codeaurora.org> Signed-off-by: Vivek Gautam <vivek.gau...@codeaurora.org> Reviewed-by: Tomasz Figa <tf...@chromium.org> --- drivers/iommu/arm-smmu.c | 29 + 1 file changed, 29 insertions(+) diff --git a/drivers/io

[PATCH v9 2/5] iommu/arm-smmu: Add pm_runtime/sleep ops

2018-03-13 Thread Vivek Gautam
; Signed-off-by: Archit Taneja <arch...@codeaurora.org> [vivek: Clock rework to request bulk of clocks] Signed-off-by: Vivek Gautam <vivek.gau...@codeaurora.org> Reviewed-by: Tomasz Figa <tf...@chromium.org> --- drivers/iommu/arm-smmu.c | 60 ++

[PATCH v9 3/5] iommu/arm-smmu: Invoke pm_runtime during probe, add/remove device

2018-03-13 Thread Vivek Gautam
aran R <sricha...@codeaurora.org> [vivek: Cleanup pm runtime calls] Signed-off-by: Vivek Gautam <vivek.gau...@codeaurora.org> Reviewed-by: Tomasz Figa <tf...@chromium.org> --- drivers/iommu/arm-smmu.c | 95 1 file changed, 87 in

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

2018-03-13 Thread Vivek Gautam
/patch/10204945/ [7] https://patchwork.kernel.org/patch/10204925/ [8] https://patchwork.kernel.org/patch/10254105/ Sricharan R (3): iommu/arm-smmu: Add pm_runtime/sleep ops iommu/arm-smmu: Invoke pm_runtime during probe, add/remove device iommu/arm-smmu: Add the device_link between masters

[PATCH v9 1/5] driver core: Find an existing link between two devices

2018-03-13 Thread Vivek Gautam
devices - suppliers and consumers. Signed-off-by: Vivek Gautam <vivek.gau...@codeaurora.org> Cc: Rafael J. Wysocki <r...@rjwysocki.net> Cc: Greg Kroah-Hartman <gre...@linuxfoundation.org> --- * New patch added to this series. drivers/base/core.c| 30 +++

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

2018-03-12 Thread Vivek Gautam
On Fri, Mar 9, 2018 at 6:04 PM, Robin Murphy <robin.mur...@arm.com> wrote: > On 09/03/18 07:11, Vivek Gautam wrote: >> >> On Thu, Mar 8, 2018 at 10:29 AM, Vivek Gautam >> <vivek.gau...@codeaurora.org> wrote: >>> >>> On Wed, Mar 7, 2018 at 6:1

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

2018-03-09 Thread Vivek Gautam
On Wed, Mar 7, 2018 at 6:17 PM, Robin Murphy <robin.mur...@arm.com> wrote: > On 02/03/18 10:10, Vivek Gautam wrote: >> >> From: Sricharan R <sricha...@codeaurora.org> >> >> Finally add the device link between the master device and >> smmu, so that the

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

2018-03-08 Thread Vivek Gautam
On Thu, Mar 8, 2018 at 10:29 AM, Vivek Gautam <vivek.gau...@codeaurora.org> wrote: > On Wed, Mar 7, 2018 at 6:17 PM, Robin Murphy <robin.mur...@arm.com> wrote: >> On 02/03/18 10:10, Vivek Gautam wrote: >>> >>> From: Sricharan R <sricha...@codeaurora.org>

Re: [PATCH v8 1/5] iommu/arm-smmu: Destroy domain context in failure path

2018-03-07 Thread Vivek Gautam
On Wed, Mar 7, 2018 at 5:50 PM, Robin Murphy <robin.mur...@arm.com> wrote: > On 02/03/18 10:10, Vivek Gautam wrote: >> >> If we fail after initializing domain_context, we should destroy >> the context to free up resources. > > > Have another think about

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

2018-03-07 Thread Vivek Gautam
On Wed, Mar 7, 2018 at 6:17 PM, Robin Murphy <robin.mur...@arm.com> wrote: > On 02/03/18 10:10, Vivek Gautam wrote: >> >> From: Sricharan R <sricha...@codeaurora.org> >> >> Finally add the device link between the master device and >> smmu, so that the

[PATCH 1/1] iommu/arm-smmu: Add support for qcom,smmu-500 variant

2018-03-06 Thread Vivek Gautam
Qualcomm's arm-smmu 500 implementation supports runtime pm so enable the same. Signed-off-by: Vivek Gautam <vivek.gau...@codeaurora.org> --- Based on iommu/arm-smmu pm runtime support series [1]: [PATCH v8 0/5] iommu/arm-smmu: Add runtime pm/sleep support Tested on sdm845 with nec

Re: Using dma-ranges with iommu to limit range of iova

2018-03-05 Thread Vivek Gautam
Hi Robin, On 3/5/2018 5:46 PM, Robin Murphy wrote: Hi Vivek, On 05/03/18 09:06, Vivek Gautam wrote: Hi all, I have a question regarding usage of 'dma-ranges', can someone point me in the right direction? On qcom soc, few of the master devices with iommu attached to them, have limitations

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

2018-03-05 Thread Vivek Gautam
Hi Tomasz, On 3/5/2018 6:55 PM, Tomasz Figa wrote: Hi Vivek, On Fri, Mar 2, 2018 at 7:10 PM, Vivek Gautam <vivek.gau...@codeaurora.org> 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 intr

Using dma-ranges with iommu to limit range of iova

2018-03-05 Thread Vivek Gautam
Hi all, I have a question regarding usage of 'dma-ranges', can someone point me in the right direction? On qcom soc, few of the master devices with iommu attached to them, have limitations in using the iova address range. They can allow the iova to be only in a certain range, e.g. video codec

[PATCH v8 2/5] iommu/arm-smmu: Add pm_runtime/sleep ops

2018-03-02 Thread Vivek Gautam
; Signed-off-by: Archit Taneja <arch...@codeaurora.org> [vivek: Clock rework to request bulk of clocks] Signed-off-by: Vivek Gautam <vivek.gau...@codeaurora.org> --- drivers/iommu/arm-smmu.c | 60 ++-- 1 file changed, 58 insertions(+), 2

[PATCH v8 5/5] iommu/arm-smmu: Add support for qcom,smmu-v2 variant

2018-03-02 Thread Vivek Gautam
qcom,smmu-v2 is an arm,smmu-v2 implementation with specific clock and power requirements. This smmu core is used with multiple masters on msm8996, viz. mdss, video, etc. Add bindings for the same. Signed-off-by: Vivek Gautam <vivek.gau...@codeaurora.org> Reviewed-by: Rob Herring <r...@k

[PATCH v8 3/5] iommu/arm-smmu: Invoke pm_runtime during probe, add/remove device

2018-03-02 Thread Vivek Gautam
aran R <sricha...@codeaurora.org> [vivek: Cleanup pm runtime calls] Signed-off-by: Vivek Gautam <vivek.gau...@codeaurora.org> --- drivers/iommu/arm-smmu.c | 96 1 file changed, 88 insertions(+), 8 deletions(-) diff --git a/drivers/

[PATCH v8 4/5] iommu/arm-smmu: Add the device_link between masters and smmu

2018-03-02 Thread Vivek Gautam
ed-off-by: Sricharan R <sricha...@codeaurora.org> Signed-off-by: Vivek Gautam <vivek.gau...@codeaurora.org> --- drivers/iommu/arm-smmu.c | 21 + 1 file changed, 21 insertions(+) diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c index 3d6a1875431f..b

[PATCH v8 1/5] iommu/arm-smmu: Destroy domain context in failure path

2018-03-02 Thread Vivek Gautam
If we fail after initializing domain_context, we should destroy the context to free up resources. Signed-off-by: Vivek Gautam <vivek.gau...@codeaurora.org> --- * New patch added in this series. drivers/iommu/arm-smmu.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff

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

2018-03-02 Thread Vivek Gautam
mmu/arm-smmu: Invoke pm_runtime during probe, add/remove device iommu/arm-smmu: Add the device_link between masters and smmu Vivek Gautam (2): iommu/arm-smmu: Destroy domain context in failure path iommu/arm-smmu: Add support for qcom,smmu-v2 variant .../devicetree/bindings/iommu/arm,sm

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

2018-02-23 Thread Vivek Gautam
On Fri, Feb 23, 2018 at 9:10 PM, Jordan Crouse <jcro...@codeaurora.org> wrote: > On Fri, Feb 23, 2018 at 04:06:39PM +0530, Vivek Gautam wrote: >> On Fri, Feb 23, 2018 at 5:22 AM, Jordan Crouse <jcro...@codeaurora.org> >> wrote: >> > On Wed, Feb 07, 2018 at

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

2018-02-23 Thread Vivek Gautam
On Fri, Feb 23, 2018 at 5:22 AM, Jordan Crouse <jcro...@codeaurora.org> wrote: > On Wed, Feb 07, 2018 at 04:01:19PM +0530, Vivek Gautam wrote: >> From: Sricharan R <sricha...@codeaurora.org> >> >> The smmu device probe/remove and add/remove master device callb

Re: [PATCH v7 6/6] drm/msm: iommu: Replace runtime calls with runtime suppliers

2018-02-22 Thread Vivek Gautam
Hi, On Thu, Feb 22, 2018 at 7:42 PM, Tomasz Figa wrote: > On Thu, Feb 22, 2018 at 10:45 PM, Robin Murphy wrote: >> [sorry, I had intended to reply sooner but clearly forgot] >> >> >> On 16/02/18 00:13, Tomasz Figa wrote: >>> >>> On Fri, Feb 16, 2018 at

Re: [PATCH v7 6/6] drm/msm: iommu: Replace runtime calls with runtime suppliers

2018-02-14 Thread Vivek Gautam
On Wed, Feb 14, 2018 at 2:46 PM, Tomasz Figa <tf...@chromium.org> wrote: Adding Jordan to this thread as well. > On Wed, Feb 14, 2018 at 6:13 PM, Vivek Gautam > <vivek.gau...@codeaurora.org> wrote: >> Hi Tomasz, >> >> On Wed, Feb 14, 2018 at 11:08 AM, To

Re: [PATCH v5 08/13] iommu/rockchip: Control clocks needed to access the IOMMU

2018-02-14 Thread Vivek Gautam
On 1/24/2018 7:19 PM, Robin Murphy wrote: On 24/01/18 10:35, Jeffy Chen wrote: From: Tomasz Figa Current code relies on master driver enabling necessary clocks before IOMMU is accessed, however there are cases when the IOMMU should be accessed while the master is not

Re: [PATCH v7 6/6] drm/msm: iommu: Replace runtime calls with runtime suppliers

2018-02-14 Thread Vivek Gautam
Hi Tomasz, On Wed, Feb 14, 2018 at 11:08 AM, Tomasz Figa <tf...@chromium.org> wrote: > On Wed, Feb 14, 2018 at 1:17 PM, Vivek Gautam > <vivek.gau...@codeaurora.org> wrote: >> Hi Tomasz, >> >> On Wed, Feb 14, 2018 at 8:31 AM, Tomasz Figa <tf...@chromium.org

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

2018-02-14 Thread Vivek Gautam
Hi Tomasz, On Tue, Feb 13, 2018 at 1:54 PM, Tomasz Figa <tf...@chromium.org> wrote: > Hi Vivek, > > Thanks for the patch. Please see my comments inline. > > On Wed, Feb 7, 2018 at 7:31 PM, Vivek Gautam > <vivek.gau...@codeaurora.org> wrote: >> From: S

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

2018-02-14 Thread Vivek Gautam
lease see my comments inline. >>> >>> On Wed, Feb 7, 2018 at 7:31 PM, Vivek Gautam >>> <vivek.gau...@codeaurora.org> wrote: >>>> >>>> From: Sricharan R <sricha...@codeaurora.org> >>>> >>>> The smmu device

Re: [PATCH v7 6/6] drm/msm: iommu: Replace runtime calls with runtime suppliers

2018-02-13 Thread Vivek Gautam
, 2018 at 3:03 AM, Rob Clark <robdcl...@gmail.com> wrote: >>>> On Tue, Feb 13, 2018 at 4:10 AM, Tomasz Figa <tf...@chromium.org> wrote: >>>>> Hi Vivek, >>>>> >>>>> Thanks for the patch. Please see my comments inline. >>>>

Re: [PATCH v7 2/6] iommu/arm-smmu: Add pm_runtime/sleep ops

2018-02-13 Thread Vivek Gautam
Hi Tomasz, Please find my response inline below. On Tue, Feb 13, 2018 at 1:33 PM, Tomasz Figa <tf...@chromium.org> wrote: > Hi Vivek, > > Thanks for the patch. Please see some comments inline. > > On Wed, Feb 7, 2018 at 7:31 PM, Vivek Gautam > <vivek.gau...@cod

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

2018-02-13 Thread Vivek Gautam
Hi Tomasz, On Tue, Feb 13, 2018 at 2:01 PM, Tomasz Figa <tf...@chromium.org> wrote: > Hi Vivek, > > Thanks for the patch. Please see my comments inline. Thanks for reviewing the patch series. > > On Wed, Feb 7, 2018 at 7:31 PM, Vivek Gautam > <vivek.gau...@cod

[PATCH v8 5/6] iommu/arm-smmu: Add support for qcom,smmu-v2 variant

2018-02-09 Thread Vivek Gautam
qcom,smmu-v2 is an arm,smmu-v2 implementation with specific clock and power requirements. This smmu core is used with multiple masters on msm8996, viz. mdss, video, etc. Add bindings for the same. Signed-off-by: Vivek Gautam <vivek.gau...@codeaurora.org> Reviewed-by: Rob Herring <r...@k

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

2018-02-07 Thread Vivek Gautam
ed-off-by: Sricharan R <sricha...@codeaurora.org> Signed-off-by: Vivek Gautam <vivek.gau...@codeaurora.org> --- drivers/iommu/arm-smmu.c | 16 1 file changed, 16 insertions(+) diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c index c024f69c1682..c

[PATCH v7 6/6] drm/msm: iommu: Replace runtime calls with runtime suppliers

2018-02-07 Thread Vivek Gautam
() calls, to power-up the connected iommu through the device link interface. In case the device link is not setup these get/put_suppliers() calls will be a no-op, and the iommu driver should take care of powering on its devices accordingly. Signed-off-by: Vivek Gautam <vivek.gau...@codeaurora.

[PATCH v7 1/6] base: power: runtime: Export pm_runtime_get/put_suppliers

2018-02-07 Thread Vivek Gautam
://patchwork.kernel.org/patch/9827825/ Signed-off-by: Vivek Gautam <vivek.gau...@codeaurora.org> Acked-by: Rafael J. Wysocki <rafael.j.wyso...@intel.com> --- drivers/base/power/runtime.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/base/power/runtime.c b/drivers/base/power/run

[PATCH v7 5/6] iommu/arm-smmu: Add support for qcom,smmu-v2 variant

2018-02-07 Thread Vivek Gautam
qcom,smmu-v2 is an arm,smmu-v2 implementation with specific clock and power requirements. This smmu core is used with multiple masters on msm8996, viz. mdss, video, etc. Add bindings for the same. Signed-off-by: Vivek Gautam <vivek.gau...@codeaurora.org> Reviewed-by: Rob Herring <r...@k

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

2018-02-07 Thread Vivek Gautam
aran R <sricha...@codeaurora.org> [vivek: Cleanup pm runtime calls] Signed-off-by: Vivek Gautam <vivek.gau...@codeaurora.org> --- drivers/iommu/arm-smmu.c | 42 ++ 1 file changed, 38 insertions(+), 4 deletions(-) diff --git a/drivers/iommu/ar

[PATCH v7 2/6] iommu/arm-smmu: Add pm_runtime/sleep ops

2018-02-07 Thread Vivek Gautam
; Signed-off-by: Archit Taneja <arch...@codeaurora.org> [vivek: Clock rework to request bulk of clocks] Signed-off-by: Vivek Gautam <vivek.gau...@codeaurora.org> --- drivers/iommu/arm-smmu.c | 56 ++-- 1 file changed, 54 insertions(+), 2

[PATCH v7 0/6] iommu/arm-smmu: Add runtime pm/sleep support

2018-02-07 Thread Vivek Gautam
smmu: Add pm_runtime/sleep ops iommu/arm-smmu: Invoke pm_runtime during probe, add/remove device iommu/arm-smmu: Add the device_link between masters and smmu Vivek Gautam (3): base: power: runtime: Export pm_runtime_get/put_suppliers iommu/arm-smmu: Add support for qcom,smmu-v2 variant drm

Re: [PATCH RFC 1/1] iommu/arm-smmu: Fix context fault message considering non-NTS

2018-02-06 Thread Vivek Gautam
Hi Robin, On Tue, Feb 6, 2018 at 5:22 PM, Robin Murphy <robin.mur...@arm.com> wrote: > Hi Vivek, > > On 06/02/18 10:16, Vivek Gautam wrote: >> >> SMMU_CBn_FSYNR0 definition from SMMU v2 architecture document >> says that, the S1CBNDX[23:16] field is only valid i

[PATCH RFC 1/1] iommu/arm-smmu: Fix context fault message considering non-NTS

2018-02-06 Thread Vivek Gautam
1500.apps-smmu: Unhandled context fault: fsr=0x402, iova=0x9e0aa000, fsynr=0x20, cb=0 Signed-off-by: Vivek Gautam <vivek.gau...@codeaurora.org> Cc: Robin Murphy <robin.mur...@arm.com> --- Hi Robin, Does it make sense to mask fsynr like this? Would it still

Re: [PATCH 1/1] iommu/io-pgtable: use size_t return type for all foo_unmap

2018-02-05 Thread Vivek Gautam
Hi Robin, On 2/5/2018 11:38 PM, Robin Murphy wrote: On 05/02/18 17:59, Vivek Gautam wrote: Unmap returns a size_t all throughout the IOMMU framework. Make io-pgtable match this convention. Moreover, there isn't a need to have a signed int return type as we return 0 in case of failures

[PATCH 1/1] iommu/io-pgtable: use size_t return type for all foo_unmap

2018-02-05 Thread Vivek Gautam
Unmap returns a size_t all throughout the IOMMU framework. Make io-pgtable match this convention. Moreover, there isn't a need to have a signed int return type as we return 0 in case of failures. Signed-off-by: Vivek Gautam <vivek.gau...@codeaurora.org> --- drivers/iommu/io-pgtable-arm

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

2018-02-01 Thread Vivek Gautam
On 2/1/2018 5:03 PM, Sricharan R wrote: 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 linked

<    1   2   3   4   >