[PATCHv5 3/3] iommu: arm-smmu-impl: Add sdm845 implementation hook

2019-09-15 Thread Sai Prakash Ranjan
bs=1048576 count=300 conv=sync 300+0 records in 300+0 records out 314572800 bytes (300.0MB) copied, 1.030541 seconds, 291.1MB/s real0m 1.03s user0m 0.00s sys 0m 0.54s Signed-off-by: Vivek Gautam Signed-off-by: Sai Prakash Ranjan --- drivers/iommu/Makefile| 2 +- drivers

[PATCHv5 2/3] firmware/qcom_scm: Add scm call to handle smmu errata

2019-09-15 Thread Sai Prakash Ranjan
-off-by: Sai Prakash Ranjan --- drivers/firmware/qcom_scm-32.c | 5 + drivers/firmware/qcom_scm-64.c | 13 + drivers/firmware/qcom_scm.c| 6 ++ drivers/firmware/qcom_scm.h| 5 + include/linux/qcom_scm.h | 2 ++ 5 files changed, 31 insertions(+) diff --git

[PATCHv5 1/3] firmware: qcom_scm-64: Add atomic version of qcom_scm_call

2019-09-15 Thread Sai Prakash Ranjan
-by: Vivek Gautam Reviewed-by: Bjorn Andersson Signed-off-by: Sai Prakash Ranjan --- drivers/firmware/qcom_scm-64.c | 139 ++--- 1 file changed, 95 insertions(+), 44 deletions(-) diff --git a/drivers/firmware/qcom_scm-64.c b/drivers/firmware/qcom_scm-64.c index 91

[PATCHv5 0/3] QCOM smmu-500 wait-for-safe handling for sdm845

2019-09-15 Thread Sai Prakash Ranjan
Previous version of the patches are at [1]: QCOM's implementation of smmu-500 on sdm845 adds a hardware logic called wait-for-safe. This logic helps in meeting the invalidation requirements from 'real-time clients', such as display and camera. This wait-for-safe logic ensures that the

[PATCHv6 2/3] firmware/qcom_scm: Add scm call to handle smmu errata

2019-09-17 Thread Sai Prakash Ranjan
-off-by: Sai Prakash Ranjan --- drivers/firmware/qcom_scm-32.c | 5 + drivers/firmware/qcom_scm-64.c | 13 + drivers/firmware/qcom_scm.c| 6 ++ drivers/firmware/qcom_scm.h| 5 + include/linux/qcom_scm.h | 2 ++ 5 files changed, 31 insertions(+) diff --git

[PATCHv6 3/3] iommu: arm-smmu-impl: Add sdm845 implementation hook

2019-09-17 Thread Sai Prakash Ranjan
bs=1048576 count=300 conv=sync 300+0 records in 300+0 records out 314572800 bytes (300.0MB) copied, 1.030541 seconds, 291.1MB/s real0m 1.03s user0m 0.00s sys 0m 0.54s Signed-off-by: Vivek Gautam Reviewed-by: Robin Murphy Signed-off-by: Sai Prakash Ranjan --- drivers/iommu/Makefile

[PATCHv6 0/3] QCOM smmu-500 wait-for-safe handling for sdm845

2019-09-17 Thread Sai Prakash Ranjan
Previous version of the patches are at [1]: QCOM's implementation of smmu-500 on sdm845 adds a hardware logic called wait-for-safe. This logic helps in meeting the invalidation requirements from 'real-time clients', such as display and camera. This wait-for-safe logic ensures that the

[PATCHv6 1/3] firmware: qcom_scm-64: Add atomic version of qcom_scm_call

2019-09-17 Thread Sai Prakash Ranjan
-by: Vivek Gautam Reviewed-by: Bjorn Andersson Signed-off-by: Sai Prakash Ranjan --- drivers/firmware/qcom_scm-64.c | 139 ++--- 1 file changed, 95 insertions(+), 44 deletions(-) diff --git a/drivers/firmware/qcom_scm-64.c b/drivers/firmware/qcom_scm-64.c index 91

Re: [PATCH v4 3/3] iommu: arm-smmu-impl: Add sdm845 implementation hook

2019-09-16 Thread Sai Prakash Ranjan
Hi Stephen, On 2019-09-06 20:37, Stephen Boyd wrote: Quoting Vivek Gautam (2019-08-22 23:32:48) diff --git a/drivers/iommu/arm-smmu-impl.c b/drivers/iommu/arm-smmu-impl.c index 3f88cd078dd5..0aef87c41f9c 100644 --- a/drivers/iommu/arm-smmu-impl.c +++ b/drivers/iommu/arm-smmu-impl.c @@ -102,7

Re: [PATCH v4 1/3] firmware: qcom_scm-64: Add atomic version of qcom_scm_call

2019-09-16 Thread Sai Prakash Ranjan
Hi Stephen, On 2019-09-06 20:42, Stephen Boyd wrote: Quoting Vivek Gautam (2019-08-22 23:32:46) There are scnenarios where drivers are required to make a scm call in atomic context, such as in one of the qcom's arm-smmu-500 errata [1]. [1]

Re: [PATCH v4 3/3] iommu: arm-smmu-impl: Add sdm845 implementation hook

2019-09-16 Thread Sai Prakash Ranjan
Hi Robin, On 2019-09-10 18:56, Robin Murphy wrote: On 23/08/2019 07:32, Vivek Gautam wrote: Add reset hook for sdm845 based platforms to turn off the wait-for-safe sequence. Understanding how wait-for-safe logic affects USB and UFS performance on MTP845 and DB845 boards: Qcom's

Re: [PATCHv6 3/3] iommu: arm-smmu-impl: Add sdm845 implementation hook

2019-09-18 Thread Sai Prakash Ranjan
On 2019-09-19 06:27, Stephen Boyd wrote: Quoting Sai Prakash Ranjan (2019-09-17 02:45:04) diff --git a/drivers/iommu/arm-smmu-impl.c b/drivers/iommu/arm-smmu-impl.c index 3f88cd078dd5..d62da270f430 100644 --- a/drivers/iommu/arm-smmu-impl.c +++ b/drivers/iommu/arm-smmu-impl.c @@ -9,7 +9,6

Re: [PATCHv6 3/3] iommu: arm-smmu-impl: Add sdm845 implementation hook

2019-09-18 Thread Sai Prakash Ranjan
On 2019-09-19 05:55, Bjorn Andersson wrote: In the transition to this new design we lost the ability to enable/disable the safe toggle per board, which according to Vivek would result in some issue with Cheza. Can you confirm that this is okay? (Or introduce the DT property for enabling the

Re: [PATCHv6 3/3] iommu: arm-smmu-impl: Add sdm845 implementation hook

2019-09-19 Thread Sai Prakash Ranjan
On 2019-09-19 08:48, Sai Prakash Ranjan wrote: On 2019-09-19 05:55, Bjorn Andersson wrote: In the transition to this new design we lost the ability to enable/disable the safe toggle per board, which according to Vivek would result in some issue with Cheza. Can you confirm that this is okay

Re: [PATCHv6 3/3] iommu: arm-smmu-impl: Add sdm845 implementation hook

2019-09-20 Thread Sai Prakash Ranjan
On 2019-09-20 01:30, Stephen Boyd wrote: Quoting Sai Prakash Ranjan (2019-09-19 11:54:27) On 2019-09-19 08:48, Sai Prakash Ranjan wrote: > On 2019-09-19 05:55, Bjorn Andersson wrote: >> In the transition to this new design we lost the ability to >> enable/disable the safe t

[PATCHv7 1/3] firmware: qcom_scm-64: Add atomic version of qcom_scm_call

2019-09-20 Thread Sai Prakash Ranjan
-by: Vivek Gautam Reviewed-by: Bjorn Andersson Reviewed-by: Stephen Boyd Signed-off-by: Sai Prakash Ranjan --- drivers/firmware/qcom_scm-64.c | 138 ++--- 1 file changed, 94 insertions(+), 44 deletions(-) diff --git a/drivers/firmware/qcom_scm-64.c b/drivers/firmwar

[PATCHv7 3/3] iommu: arm-smmu-impl: Add sdm845 implementation hook

2019-09-20 Thread Sai Prakash Ranjan
bs=1048576 count=300 conv=sync 300+0 records in 300+0 records out 314572800 bytes (300.0MB) copied, 1.030541 seconds, 291.1MB/s real0m 1.03s user0m 0.00s sys 0m 0.54s Signed-off-by: Vivek Gautam Reviewed-by: Robin Murphy Signed-off-by: Sai Prakash Ranjan --- drivers/iommu/Makefile

[PATCHv7 2/3] firmware/qcom_scm: Add scm call to handle smmu errata

2019-09-20 Thread Sai Prakash Ranjan
Reviewed-by: Stephen Boyd Signed-off-by: Sai Prakash Ranjan --- drivers/firmware/qcom_scm-32.c | 5 + drivers/firmware/qcom_scm-64.c | 13 + drivers/firmware/qcom_scm.c| 6 ++ drivers/firmware/qcom_scm.h| 5 + include/linux/qcom_scm.h | 2 ++ 5 files changed, 31

[PATCHv7 0/3] QCOM smmu-500 wait-for-safe handling for sdm845

2019-09-20 Thread Sai Prakash Ranjan
Previous version of the patches are at [1]: QCOM's implementation of smmu-500 on sdm845 adds a hardware logic called wait-for-safe. This logic helps in meeting the invalidation requirements from 'real-time clients', such as display and camera. This wait-for-safe logic ensures that the

Re: [PATCHv7 0/3] QCOM smmu-500 wait-for-safe handling for sdm845

2019-11-04 Thread Sai Prakash Ranjan
On 2019-11-04 21:53, Will Deacon wrote: On Mon, Nov 04, 2019 at 03:15:06PM +, Will Deacon wrote: On Sun, Nov 03, 2019 at 11:19:25PM -0600, Andy Gross wrote: > On Fri, Nov 01, 2019 at 11:01:59PM +0530, Sai Prakash Ranjan wrote: > > >>> What's the plan for getting this mer

Re: [PATCHv7 0/3] QCOM smmu-500 wait-for-safe handling for sdm845

2019-11-03 Thread Sai Prakash Ranjan
On 2019-11-04 10:49, Andy Gross wrote: On Fri, Nov 01, 2019 at 11:01:59PM +0530, Sai Prakash Ranjan wrote: >>> What's the plan for getting this merged? I'm not happy taking the >>> firmware >>> bits without Andy's ack, but I also think the SMMU changes should go via

Re: Users of IOMMU_QCOM_SYS_CACHE?

2019-10-24 Thread Sai Prakash Ranjan
On 2019-10-24 16:51, Will Deacon wrote: On Thu, Oct 24, 2019 at 04:41:04PM +0530, Sai Prakash Ranjan wrote: On 2019-10-24 16:21, Will Deacon wrote: > In commit 90ec7a76cc4b ("iommu/io-pgtable-arm: Add support to use system > cache") we added support for IOMMU_QCOM_SYS_CACHE

Re: Users of IOMMU_QCOM_SYS_CACHE?

2019-10-24 Thread Sai Prakash Ranjan
Hi Will, On 2019-10-24 16:21, Will Deacon wrote: Hi all, In commit 90ec7a76cc4b ("iommu/io-pgtable-arm: Add support to use system cache") we added support for IOMMU_QCOM_SYS_CACHE which was merged into 5.3. This allows non-coherent devices to request an outer cacheable memory type

Re: [PATCHv7 0/3] QCOM smmu-500 wait-for-safe handling for sdm845

2019-11-01 Thread Sai Prakash Ranjan
On 2019-11-01 22:01, Will Deacon wrote: On Fri, Sep 20, 2019 at 01:34:26PM +0530, Sai Prakash Ranjan wrote: Previous version of the patches are at [1]: QCOM's implementation of smmu-500 on sdm845 adds a hardware logic called wait-for-safe. This logic helps in meeting the invalidation

Re: [PATCHv7 0/3] QCOM smmu-500 wait-for-safe handling for sdm845

2019-11-01 Thread Sai Prakash Ranjan
On 2019-11-01 22:55, Will Deacon wrote: On Fri, Nov 01, 2019 at 10:49:00PM +0530, Sai Prakash Ranjan wrote: On 2019-11-01 22:01, Will Deacon wrote: > On Fri, Sep 20, 2019 at 01:34:26PM +0530, Sai Prakash Ranjan wrote: > > Previous version of the patches are at [1]: > > > >

Re: [PATCH 0/2] iommu/arm-smmu: Allow client devices to select direct mapping

2020-02-04 Thread Sai Prakash Ranjan
Hello Robin, Will On 2020-01-22 17:18, Sai Prakash Ranjan wrote: This series allows drm devices to set a default identity mapping using iommu_request_dm_for_dev(). First patch is a cleanup to support other SoCs to call into QCOM specific implementation and preparation for second patch. Second

[PATCH 1/2] iommu: arm-smmu-impl: Convert to a generic reset implementation

2020-01-22 Thread Sai Prakash Ranjan
implementation. Signed-off-by: Sai Prakash Ranjan --- drivers/iommu/arm-smmu-impl.c | 8 +--- drivers/iommu/arm-smmu-qcom.c | 16 +--- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/drivers/iommu/arm-smmu-impl.c b/drivers/iommu/arm-smmu-impl.c index 74d97a886e93

[PATCH 0/2] iommu/arm-smmu: Allow client devices to select direct mapping

2020-01-22 Thread Sai Prakash Ranjan
Crouse (1): iommu/arm-smmu: Allow client devices to select direct mapping Sai Prakash Ranjan (1): iommu: arm-smmu-impl: Convert to a generic reset implementation drivers/iommu/arm-smmu-impl.c | 8 +++-- drivers/iommu/arm-smmu-qcom.c | 55 +-- drivers/iommu/arm

[PATCH 2/2] iommu/arm-smmu: Allow client devices to select direct mapping

2020-01-22 Thread Sai Prakash Ranjan
From: Jordan Crouse Some client devices want to directly map the IOMMU themselves instead of using the DMA domain. Allow those devices to opt in to direct mapping by way of a list of compatible strings. Signed-off-by: Jordan Crouse Co-developed-by: Sai Prakash Ranjan Signed-off-by: Sai

Re: [PATCH 0/3] Request direct mapping for modem firmware subdevice

2020-03-12 Thread Sai Prakash Ranjan
Hi Robin, On 2020-03-10 22:14, Robin Murphy wrote: On 10/03/2020 4:23 pm, Joerg Roedel wrote: On Tue, Mar 10, 2020 at 07:30:50PM +0530, Sibi Sankar wrote: The accesses are initiated by the firmware and they access modem reserved regions. However as explained in ^^ any accesses outside the

Re: [PATCH 0/2] iommu/arm-smmu: Allow client devices to select direct mapping

2020-04-11 Thread Sai Prakash Ranjan
Hi Matthias, On 2020-04-10 05:01, Matthias Kaehlcke wrote: On Tue, Feb 04, 2020 at 11:12:17PM +0530, Sai Prakash Ranjan wrote: Hello Robin, Will On 2020-01-22 17:18, Sai Prakash Ranjan wrote: > This series allows drm devices to set a default identity > mapping using iommu_request_dm_f

Re: [PATCH 0/2] iommu/arm-smmu: Allow client devices to select direct mapping

2020-04-15 Thread Sai Prakash Ranjan
Hi Joerg, On 2020-04-13 20:42, Jordan Crouse wrote: On Thu, Apr 09, 2020 at 04:31:24PM -0700, Matthias Kaehlcke wrote: On Tue, Feb 04, 2020 at 11:12:17PM +0530, Sai Prakash Ranjan wrote: > Hello Robin, Will > > On 2020-01-22 17:18, Sai Prakash Ranjan wrote: > > This series all

Re: [PATCH 2/2] iommu/arm-smmu: Allow client devices to select direct mapping

2020-04-16 Thread Sai Prakash Ranjan
Hi Robin, On 2020-04-16 19:28, Robin Murphy wrote: On 2020-01-22 11:48 am, Sai Prakash Ranjan wrote: From: Jordan Crouse Some client devices want to directly map the IOMMU themselves instead of using the DMA domain. Allow those devices to opt in to direct mapping by way of a list

Re: [PATCH 2/2] iommu/arm-smmu: Allow client devices to select direct mapping

2020-04-16 Thread Sai Prakash Ranjan
Hi Robin, On 2020-04-16 22:47, Robin Murphy wrote: On 2020-04-16 5:23 pm, Sai Prakash Ranjan wrote: Hi Robin, On 2020-04-16 19:28, Robin Murphy wrote: On 2020-01-22 11:48 am, Sai Prakash Ranjan wrote: From: Jordan Crouse Some client devices want to directly map the IOMMU themselves

Re: [PATCHv2 2/6] iommu/arm-smmu: Allow client devices to select direct mapping

2020-04-20 Thread Sai Prakash Ranjan
On 2020-04-20 21:27, Robin Murphy wrote: On 2020-04-20 3:37 pm, Sai Prakash Ranjan wrote: From: Jordan Crouse Some client devices want to directly map the IOMMU themselves instead of using the DMA domain. Allow those devices to opt in to direct mapping by way of a list of compatible strings

Re: [PATCHv2 3/6] iommu/arm-smmu: Implement iommu_ops->def_domain_type call-back

2020-04-20 Thread Sai Prakash Ranjan
Hi Robin, On 2020-04-20 20:56, Robin Murphy wrote: On 2020-04-20 3:37 pm, Sai Prakash Ranjan wrote: Implement the new def_domain_type call-back for the ARM SMMU driver. We need this to support requesting the domain type by the client devices. Signed-off-by: Sai Prakash Ranjan --- drivers

Re: [PATCHv3 2/6] iommu/arm-smmu: Allow client devices to select direct mapping

2020-04-20 Thread Sai Prakash Ranjan
On 2020-04-20 22:27, Robin Murphy wrote: On 2020-04-20 5:42 pm, Sai Prakash Ranjan wrote: From: Jordan Crouse Some client devices want to directly map the IOMMU themselves instead of using the DMA domain. Allow those devices to opt in to direct mapping by way of a list of compatible strings

[PATCHv3 5/6] dt-bindings: remoteproc: qcom: Add iommus property

2020-04-20 Thread Sai Prakash Ranjan
From: Sibi Sankar Add iommus property to allow Q6 modem to boot on platforms which do not have trustZone. Signed-off-by: Sibi Sankar Signed-off-by: Sai Prakash Ranjan Acked-by: Rob Herring --- Documentation/devicetree/bindings/remoteproc/qcom,q6v5.txt | 3 +++ 1 file changed, 3 insertions

[PATCHv3 0/6] iommu/arm-smmu: Allow client devices to select identity mapping

2020-04-20 Thread Sai Prakash Ranjan
way as per Robin. * Use def_domain_type name for the callback in arm_smmu_imp as per Robin Jordan Crouse (1): iommu/arm-smmu: Allow client devices to select direct mapping Sai Prakash Ranjan (2): iommu: arm-smmu-impl: Convert to a generic reset implementation iommu/arm-smmu: Implement

[PATCHv3 6/6] arm64: dts: qcom: sdm845-cheza: Add iommus property

2020-04-20 Thread Sai Prakash Ranjan
From: Sibi Sankar Add iommus property to remoteproc modem node. Signed-off-by: Sibi Sankar Signed-off-by: Sai Prakash Ranjan --- arch/arm64/boot/dts/qcom/sdm845-cheza.dtsi | 5 + 1 file changed, 5 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sdm845-cheza.dtsi b/arch/arm64/boot

[PATCHv3 3/6] iommu/arm-smmu: Implement iommu_ops->def_domain_type call-back

2020-04-20 Thread Sai Prakash Ranjan
Implement the new def_domain_type call-back for the ARM SMMU driver. We need this to support requesting the domain type by the client devices. Signed-off-by: Sai Prakash Ranjan --- drivers/iommu/arm-smmu.c | 12 1 file changed, 12 insertions(+) diff --git a/drivers/iommu/arm

[PATCHv3 4/6] iommu/arm-smmu-qcom: Request direct mapping for modem device

2020-04-20 Thread Sai Prakash Ranjan
-by: Sibi Sankar Signed-off-by: Sai Prakash Ranjan --- drivers/iommu/arm-smmu-qcom.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/iommu/arm-smmu-qcom.c b/drivers/iommu/arm-smmu-qcom.c index 5bedf21587a5..cf01d0215a39 100644 --- a/drivers/iommu/arm-smmu-qcom.c +++ b/drivers/iommu

[PATCHv3 1/6] iommu: arm-smmu-impl: Convert to a generic reset implementation

2020-04-20 Thread Sai Prakash Ranjan
implementation. Signed-off-by: Sai Prakash Ranjan Reviewed-by: Bjorn Andersson Reviewed-by: Stephen Boyd Reviewed-by: Robin Murphy --- drivers/iommu/arm-smmu-impl.c | 8 +--- drivers/iommu/arm-smmu-qcom.c | 16 +--- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/drivers

[PATCHv3 2/6] iommu/arm-smmu: Allow client devices to select direct mapping

2020-04-20 Thread Sai Prakash Ranjan
From: Jordan Crouse Some client devices want to directly map the IOMMU themselves instead of using the DMA domain. Allow those devices to opt in to direct mapping by way of a list of compatible strings. Signed-off-by: Jordan Crouse Co-developed-by: Sai Prakash Ranjan Signed-off-by: Sai

[PATCHv4 0/6] iommu/arm-smmu: Allow client devices to select identity mapping

2020-04-20 Thread Sai Prakash Ranjan
mapping v3: * Use arm_smmu_master_cfg to get impl instead of long way as per Robin. * Use def_domain_type name for the callback in arm_smmu_imp as per Robin Jordan Crouse (1): iommu/arm-smmu: Allow client devices to select direct mapping Sai Prakash Ranjan (2): iommu: arm-smmu-impl: Convert

[PATCHv4 4/6] iommu/arm-smmu-qcom: Request direct mapping for modem device

2020-04-20 Thread Sai Prakash Ranjan
don't have TrustZone. Signed-off-by: Sibi Sankar Signed-off-by: Sai Prakash Ranjan --- drivers/iommu/arm-smmu-qcom.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/iommu/arm-smmu-qcom.c b/drivers/iommu/arm-smmu-qcom.c index 5bedf21587a5..cf01d0215a39 100644 --- a/drivers/iommu/arm

[PATCHv4 1/6] iommu: arm-smmu-impl: Convert to a generic reset implementation

2020-04-20 Thread Sai Prakash Ranjan
implementation. Signed-off-by: Sai Prakash Ranjan Reviewed-by: Bjorn Andersson Reviewed-by: Stephen Boyd Reviewed-by: Robin Murphy --- drivers/iommu/arm-smmu-impl.c | 8 +--- drivers/iommu/arm-smmu-qcom.c | 16 +--- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/drivers

Re: [PATCHv3 4/6] iommu/arm-smmu-qcom: Request direct mapping for modem device

2020-04-20 Thread Sai Prakash Ranjan
Hi Robin, On 2020-04-20 22:39, Robin Murphy wrote: On 2020-04-20 5:42 pm, Sai Prakash Ranjan wrote: From: Sibi Sankar Request direct mapping for modem on platforms which don't have TrustZone (which programs the modem SIDs) to prevent the following global faults seen on Cheza/Trogdor

[PATCHv4 5/6] dt-bindings: remoteproc: qcom: Add iommus property

2020-04-20 Thread Sai Prakash Ranjan
From: Sibi Sankar Add iommus property to allow Q6 modem to boot on platforms which do not have trustZone. Signed-off-by: Sibi Sankar Signed-off-by: Sai Prakash Ranjan Acked-by: Rob Herring --- Documentation/devicetree/bindings/remoteproc/qcom,q6v5.txt | 3 +++ 1 file changed, 3 insertions

[PATCHv4 2/6] iommu/arm-smmu: Implement iommu_ops->def_domain_type call-back

2020-04-20 Thread Sai Prakash Ranjan
Implement the new def_domain_type call-back for the ARM SMMU driver. We need this to support requesting the domain type by the client devices. Signed-off-by: Sai Prakash Ranjan Reviewed-by: Robin Murphy --- drivers/iommu/arm-smmu.c | 12 drivers/iommu/arm-smmu.h | 1 + 2 files

[PATCHv4 3/6] iommu/arm-smmu: Allow client devices to select direct mapping

2020-04-20 Thread Sai Prakash Ranjan
From: Jordan Crouse Some client devices want to directly map the IOMMU themselves instead of using the DMA domain. Allow those devices to opt in to direct mapping by way of a list of compatible strings. Signed-off-by: Jordan Crouse Co-developed-by: Sai Prakash Ranjan Signed-off-by: Sai

[PATCHv4 6/6] arm64: dts: qcom: sdm845-cheza: Add iommus property

2020-04-20 Thread Sai Prakash Ranjan
, GFSYNR2 0x arm-smmu 1500.iommu: Unexpected global fault, this could be serious arm-smmu 1500.iommu: GFSR 0x8002, GFSYNR0 0x, GFSYNR1 0x0461, GFSYNR2 0x Signed-off-by: Sibi Sankar Signed-off-by: Sai Prakash Ranjan --- arch/arm64

[PATCHv2 0/6] iommu/arm-smmu: Allow client devices to select identity mapping

2020-04-20 Thread Sai Prakash Ranjan
to select direct mapping Sai Prakash Ranjan (2): iommu: arm-smmu-impl: Convert to a generic reset implementation iommu/arm-smmu: Implement iommu_ops->def_domain_type call-back Sibi Sankar (3): iommu/arm-smmu-qcom: Request direct mapping for modem device dt-bindings: remoteproc: qcom:

[PATCHv2 6/6] arm64: dts: qcom: sdm845-cheza: Add iommus property

2020-04-20 Thread Sai Prakash Ranjan
From: Sibi Sankar Add iommus property to remoteproc modem node. Signed-off-by: Sibi Sankar Signed-off-by: Sai Prakash Ranjan --- arch/arm64/boot/dts/qcom/sdm845-cheza.dtsi | 5 + 1 file changed, 5 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sdm845-cheza.dtsi b/arch/arm64/boot

[PATCHv2 1/6] iommu: arm-smmu-impl: Convert to a generic reset implementation

2020-04-20 Thread Sai Prakash Ranjan
implementation. Signed-off-by: Sai Prakash Ranjan Reviewed-by: Bjorn Andersson Reviewed-by: Stephen Boyd Reviewed-by: Robin Murphy --- drivers/iommu/arm-smmu-impl.c | 8 +--- drivers/iommu/arm-smmu-qcom.c | 16 +--- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/drivers

[PATCHv2 2/6] iommu/arm-smmu: Allow client devices to select direct mapping

2020-04-20 Thread Sai Prakash Ranjan
From: Jordan Crouse Some client devices want to directly map the IOMMU themselves instead of using the DMA domain. Allow those devices to opt in to direct mapping by way of a list of compatible strings. Signed-off-by: Jordan Crouse Co-developed-by: Sai Prakash Ranjan Signed-off-by: Sai

[PATCHv2 3/6] iommu/arm-smmu: Implement iommu_ops->def_domain_type call-back

2020-04-20 Thread Sai Prakash Ranjan
Implement the new def_domain_type call-back for the ARM SMMU driver. We need this to support requesting the domain type by the client devices. Signed-off-by: Sai Prakash Ranjan --- drivers/iommu/arm-smmu.c | 20 1 file changed, 20 insertions(+) diff --git a/drivers/iommu

[PATCHv2 5/6] dt-bindings: remoteproc: qcom: Add iommus property

2020-04-20 Thread Sai Prakash Ranjan
From: Sibi Sankar Add iommus property to allow Q6 modem to boot on platforms which do not have trustZone. Signed-off-by: Sibi Sankar Signed-off-by: Sai Prakash Ranjan Acked-by: Rob Herring --- Documentation/devicetree/bindings/remoteproc/qcom,q6v5.txt | 3 +++ 1 file changed, 3 insertions

[PATCHv2 4/6] iommu/arm-smmu-qcom: Request direct mapping for modem device

2020-04-20 Thread Sai Prakash Ranjan
-by: Sibi Sankar Signed-off-by: Sai Prakash Ranjan --- drivers/iommu/arm-smmu-qcom.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/iommu/arm-smmu-qcom.c b/drivers/iommu/arm-smmu-qcom.c index 0b3f159065aa..d74892d3a776 100644 --- a/drivers/iommu/arm-smmu-qcom.c +++ b/drivers/iommu

Re: [PATCH] iommu/arm-smmu: Demote error messages to debug in shutdown callback

2020-03-27 Thread Sai Prakash Ranjan
Hi Robin, Thanks for taking a look at this. On 2020-03-27 19:42, Robin Murphy wrote: On 2020-03-27 1:28 pm, Sai Prakash Ranjan wrote: Currently on reboot/shutdown, the following messages are displayed on the console as error messages before the system reboots/shutdown. On SC7180: arm

[PATCH] iommu/arm-smmu: Demote error messages to debug in shutdown callback

2020-03-27 Thread Sai Prakash Ranjan
to debug since it does not offer much help in identifying/fixing any issue as the system is anyways going down and reduce spamming the kernel log. Reported-by: Douglas Anderson Signed-off-by: Sai Prakash Ranjan --- drivers/iommu/arm-smmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

Re: [PATCH] iommu/arm-smmu: Demote error messages to debug in shutdown callback

2020-03-27 Thread Sai Prakash Ranjan
Hi Rob, On 2020-03-27 21:47, Rob Clark wrote: On Fri, Mar 27, 2020 at 8:10 AM Sai Prakash Ranjan wrote: Hi Robin, Thanks for taking a look at this. On 2020-03-27 19:42, Robin Murphy wrote: > On 2020-03-27 1:28 pm, Sai Prakash Ranjan wrote: >> Currently on reboot/shutdown, the

Re: [PATCH] iommu/arm-smmu: Demote error messages to debug in shutdown callback

2020-03-28 Thread Sai Prakash Ranjan
Hi Robin, On 2020-03-28 00:32, Robin Murphy wrote: On 2020-03-27 3:09 pm, Sai Prakash Ranjan wrote: Imagine your network driver doesn't implement a .shutdown method (so the hardware is still active regardless of device links), happens to have an Rx buffer or descriptor ring DMA-mapped

Re: [PATCH] iommu/arm-smmu: Demote error messages to debug in shutdown callback

2020-03-31 Thread Sai Prakash Ranjan
Hi, On 2020-03-30 23:54, Doug Anderson wrote: Hi, On Sat, Mar 28, 2020 at 12:35 AM Sai Prakash Ranjan wrote: > Of course the fact that in practice we'll *always* see the warning > because there's no way to tear down the default DMA domains, and even > if all devices *have* be

Re: [PATCH] iommu/arm-smmu: Demote error messages to debug in shutdown callback

2020-03-31 Thread Sai Prakash Ranjan
Hi Will, On 2020-03-31 13:14, Will Deacon wrote: On Tue, Mar 31, 2020 at 01:06:11PM +0530, Sai Prakash Ranjan wrote: On 2020-03-30 23:54, Doug Anderson wrote: > On Sat, Mar 28, 2020 at 12:35 AM Sai Prakash Ranjan > wrote: > > > > > Of course the fact that in practi

[PATCH] iomm/arm-smmu: Add stall implementation hook

2020-04-21 Thread Sai Prakash Ranjan
from CP getting invalid data, causing a cascade of fail. Suggested-by: Rob Clark Signed-off-by: Sai Prakash Ranjan --- This has been attempted previously by Rob Clark in 2017, 2018. Hopefully we can get something concluded in 2020. * https://patchwork.kernel.org/patch/9953803/ * https

[PATCHv2] iommu/arm-smmu: Make remove callback message more informative

2020-04-23 Thread Sai Prakash Ranjan
domains! Make this error message more informative and less scary. Reported-by: Douglas Anderson Suggested-by: Robin Murphy Signed-off-by: Sai Prakash Ranjan --- drivers/iommu/arm-smmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm

Re: [PATCH] iommu/arm-smmu: Demote error messages to debug in shutdown callback

2020-04-23 Thread Sai Prakash Ranjan
On 2020-04-23 14:58, Robin Murphy wrote: On 2020-04-23 9:17 am, Sai Prakash Ranjan wrote: [...] Any update on the status here?  If I'm reading the conversation above, Robin said: "we'll *always* see the warning because there's no way to tear down the default DMA domains, and even i

Re: [PATCH] iommu/arm-smmu: Demote error messages to debug in shutdown callback

2020-04-23 Thread Sai Prakash Ranjan
Hi, On 2020-04-23 01:19, Doug Anderson wrote: Hi, On Tue, Mar 31, 2020 at 12:53 AM Sai Prakash Ranjan wrote: Hi Will, On 2020-03-31 13:14, Will Deacon wrote: > On Tue, Mar 31, 2020 at 01:06:11PM +0530, Sai Prakash Ranjan wrote: >> On 2020-03-30 23:54, Doug Anderson wrote: >>

Re: [PATCH 2/2] iommu/arm-smmu: Allow client devices to select direct mapping

2020-04-14 Thread Sai Prakash Ranjan
Hi Evan, On 2020-04-14 04:42, Evan Green wrote: On Wed, Jan 22, 2020 at 3:48 AM Sai Prakash Ranjan wrote: From: Jordan Crouse Some client devices want to directly map the IOMMU themselves instead of using the DMA domain. Allow those devices to opt in to direct mapping by way of a list

Re: [PATCH] iomm/arm-smmu: Add stall implementation hook

2020-05-07 Thread Sai Prakash Ranjan
Hi Will, Robin On 2020-04-22 01:50, Sai Prakash Ranjan wrote: Add stall implementation hook to enable stalling faults on QCOM platforms which supports it without causing any kind of hardware mishaps. Without this on QCOM platforms, GPU faults can cause unrelated GPU memory accesses to return

Re: [PATCHv4 0/6] iommu/arm-smmu: Allow client devices to select identity mapping

2020-05-07 Thread Sai Prakash Ranjan
Hi Will, Joerg On 2020-04-21 00:03, Sai Prakash Ranjan wrote: This series allows DRM, Modem devices to set a default identity mapping in qcom smmu implementation. Patch 1 is cleanup to support other SoCs to call into QCOM specific implementation. Patch 2 sets the default identity domain

Re: [PATCHv2] iommu/arm-smmu: Make remove callback message more informative

2020-05-07 Thread Sai Prakash Ranjan
Hi, On 2020-05-07 05:40, Doug Anderson wrote: Hi, On Thu, Apr 23, 2020 at 7:35 AM Doug Anderson wrote: Hi, On Thu, Apr 23, 2020 at 2:55 AM Sai Prakash Ranjan wrote: > > Currently on reboot/shutdown, the following messages are > displayed on the console as error messag

Re: [PATCHv4 0/6] iommu/arm-smmu: Allow client devices to select identity mapping

2020-05-07 Thread Sai Prakash Ranjan
Hi Will, On 2020-05-07 16:01, Will Deacon wrote: On Thu, May 07, 2020 at 03:58:06PM +0530, Sai Prakash Ranjan wrote: Hi Will, Joerg On 2020-04-21 00:03, Sai Prakash Ranjan wrote: > This series allows DRM, Modem devices to set a default > identity mapping in qcom smmu implementation. >

Re: [PATCHv2] iommu/arm-smmu: Make remove callback message more informative

2020-05-07 Thread Sai Prakash Ranjan
On 2020-05-07 16:03, Robin Murphy wrote: On 2020-05-07 11:04 am, Sai Prakash Ranjan wrote: Hi, On 2020-05-07 05:40, Doug Anderson wrote: Hi, On Thu, Apr 23, 2020 at 7:35 AM Doug Anderson wrote: Hi, On Thu, Apr 23, 2020 at 2:55 AM Sai Prakash Ranjan wrote: > > Currently on

Re: [PATCH] iomm/arm-smmu: Add stall implementation hook

2020-05-19 Thread Sai Prakash Ranjan
l Deacon wrote: > > > > > > On Thu, May 07, 2020 at 11:55:54AM +0100, Robin Murphy wrote: > > > > On 2020-05-07 11:14 am, Sai Prakash Ranjan wrote: > > > > > On 2020-04-22 01:50, Sai Prakash Ranjan wrote: > > > > > > Add stall implementation hook to

Re: [PATCH] iomm/arm-smmu: Add stall implementation hook

2020-05-07 Thread Sai Prakash Ranjan
Hi Robin, On 2020-05-07 16:25, Robin Murphy wrote: On 2020-05-07 11:14 am, Sai Prakash Ranjan wrote: Hi Will, Robin On 2020-04-22 01:50, Sai Prakash Ranjan wrote: Add stall implementation hook to enable stalling faults on QCOM platforms which supports it without causing any kind of hardware

Re: [PATCH 0/3] Request direct mapping for modem firmware subdevice

2020-03-23 Thread Sai Prakash Ranjan
Hi Robin, On 2020-03-12 17:35, Robin Murphy wrote: On 2020-03-12 6:28 am, Sai Prakash Ranjan wrote: Hi Robin, Are you talking about this one for SoC specific change - https://lore.kernel.org/patchwork/patch/1183530/ Exactly - this particular wheel needs no reinventing at all. [ I guess I

[PATCH] iommu: Fix group refcount in iommu_alloc_default_domain()

2020-05-22 Thread Sai Prakash Ranjan
Signed-off-by: Sai Prakash Ranjan --- drivers/iommu/iommu.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c index a4c2f122eb8b..05f7b77c432f 100644 --- a/drivers/iommu/iommu.c +++ b/drivers/iommu/iommu.c @@ -1491,6 +1491,7

Re: [PATCH v3 3/8] iommu/arm-smmu: Consult context bank allocator for identify domains

2020-09-11 Thread Sai Prakash Ranjan
the implementation specific context bank allocator has been consulted and if it decides to use a context bank for the identity map, don't enable translation (i.e. omit ARM_SMMU_SCTLR_M). Signed-off-by: Bjorn Andersson --- Minor nit in the subject: identify -> identity Reviewed-by: Sai Prakash Ran

Re: [PATCH v3 0/8] iommu/arm-smmu: Support maintaining bootloader mappings

2020-09-11 Thread Sai Prakash Ranjan
Hi Bjorn, On 2020-09-04 21:25, Bjorn Andersson wrote: Based on previous attempts and discussions this is the latest attempt at inheriting stream mappings set up by the bootloader, for e.g. boot splash or efifb. Per Will's request this builds on the work by Jordan and Rob for the Adreno SMMU

Re: [PATCH v3 8/8] iommu/arm-smmu-qcom: Setup identity domain for boot mappings

2020-09-11 Thread Sai Prakash Ranjan
-by: Bjorn Andersson --- Reviewed-by: Sai Prakash Ranjan Tested-by: Sai Prakash Ranjan -- QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation ___ iommu mailing list iommu

Re: [PATCH v3 7/8] iommu/arm-smmu: Provide helper for allocating identity domain

2020-09-11 Thread Sai Prakash Ranjan
Prakash Ranjan Tested-by: Sai Prakash Ranjan -- QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation ___ iommu mailing list iommu@lists.linux-foundation.org https

Re: [PATCH v3 3/8] iommu/arm-smmu: Consult context bank allocator for identify domains

2020-09-11 Thread Sai Prakash Ranjan
On 2020-09-04 21:25, Bjorn Andersson wrote: For implementations of the ARM SMMU where stream mappings of bypass type are prohibited identity domains can be implemented by using context banks with translation disabled. Postpone the decision to skip allocating a context bank until the

Re: [PATCH v3 4/8] iommu/arm-smmu-qcom: Emulate bypass by using context banks

2020-09-11 Thread Sai Prakash Ranjan
_s2cr); + if (FIELD_GET(ARM_SMMU_S2CR_TYPE, reg) != S2CR_TYPE_BYPASS) + qsmmu->bypass_broken = true; + Clever :) Reviewed-by: Sai Prakash Ranjan Tested-by: Sai Prakash Ranjan -- QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum

Re: [PATCH v3 6/8] iommu/arm-smmu: Add impl hook for inherit boot mappings

2020-09-11 Thread Sai Prakash Ranjan
On 2020-09-04 21:25, Bjorn Andersson wrote: Add a new operation to allow platform implementations to inherit any stream mappings from the boot loader. Signed-off-by: Bjorn Andersson --- Reviewed-by: Sai Prakash Ranjan Tested-by: Sai Prakash Ranjan -- QUALCOMM INDIA, on behalf of Qualcomm

Re: [PATCH v3 5/8] iommu/arm-smmu-qcom: Consistently initialize stream mappings

2020-09-11 Thread Sai Prakash Ranjan
to result in indeterministic results, as these mappings might linger and reference context banks that Linux is reconfiguring. Use the fact that BYPASS writes result in FAULT type to force all stream mappings to FAULT. Signed-off-by: Bjorn Andersson --- Reviewed-by: Sai Prakash Ranjan Tested-by: S

Re: [PATCH v3 2/8] iommu/arm-smmu: Delay modifying domain during init

2020-09-11 Thread Sai Prakash Ranjan
executed, in a later patch. Signed-off-by: Bjorn Andersson --- Reviewed-by: Sai Prakash Ranjan Tested-by: Sai Prakash Ranjan -- QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation

Re: [PATCH v3 1/8] iommu/arm-smmu: Refactor context bank allocation

2020-09-11 Thread Sai Prakash Ranjan
parameter, as this can be read from the newly passed object. This allows us to not assign smmu_domain->smmu before attempting to allocate the context bank and as such we don't need to roll back this assignment on failure. Signed-off-by: Bjorn Andersson --- Reviewed-by: Sai Prakash Ranjan Tes

[PATCHv4 3/6] drm/msm: rearrange the gpu_rmw() function

2020-09-11 Thread Sai Prakash Ranjan
Prakash Ranjan --- drivers/gpu/drm/msm/msm_drv.c | 8 drivers/gpu/drm/msm/msm_drv.h | 1 + drivers/gpu/drm/msm/msm_gpu.h | 5 + 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c index abf5799d9a22..03caafa7c7b2

[PATCHv4 5/6] iommu: arm-smmu-impl: Use table to list QCOM implementations

2020-09-11 Thread Sai Prakash Ranjan
Use table and of_match_node() to match qcom implementation instead of multiple of_device_compatible() calls for each QCOM SMMU implementation. Signed-off-by: Sai Prakash Ranjan --- drivers/iommu/arm/arm-smmu/arm-smmu-impl.c | 12 1 file changed, 8 insertions(+), 4 deletions

[PATCHv4 6/6] iommu: arm-smmu-impl: Remove unwanted extra blank lines

2020-09-11 Thread Sai Prakash Ranjan
There are few places in arm-smmu-impl where there are extra blank lines, remove them and while at it fix the checkpatch warning for space required before the open parenthesis. Signed-off-by: Sai Prakash Ranjan --- drivers/iommu/arm/arm-smmu/arm-smmu-impl.c | 5 + 1 file changed, 1 insertion

[PATCHv4 4/6] drm/msm/a6xx: Add support for using system cache(LLC)

2020-09-11 Thread Sai Prakash Ranjan
. Signed-off-by: Sharat Masetty (saiprakash.ranjan: fix to set attr before device attach to iommu and rebase) Signed-off-by: Sai Prakash Ranjan --- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 83 + drivers/gpu/drm/msm/adreno/a6xx_gpu.h | 4 ++ drivers/gpu/drm/msm/adreno

[PATCHv4 1/6] iommu/io-pgtable-arm: Add support to use system cache

2020-09-11 Thread Sai Prakash Ranjan
Add a quirk IO_PGTABLE_QUIRK_SYS_CACHE to override the attributes set in TCR for the page table walker when using system cache. Signed-off-by: Sai Prakash Ranjan --- drivers/iommu/io-pgtable-arm.c | 7 ++- include/linux/io-pgtable.h | 4 2 files changed, 10 insertions(+), 1

[PATCHv4 2/6] iommu/arm-smmu: Add domain attribute for system cache

2020-09-11 Thread Sai Prakash Ranjan
Add iommu domain attribute for using system cache aka last level cache by client drivers like GPU to set right attributes for caching the hardware pagetables into the system cache. Signed-off-by: Sai Prakash Ranjan --- drivers/iommu/arm/arm-smmu/arm-smmu.c | 17 + drivers/iommu

Re: [PATCHv4 6/6] iommu: arm-smmu-impl: Remove unwanted extra blank lines

2020-09-11 Thread Sai Prakash Ranjan
On 2020-09-11 21:33, Robin Murphy wrote: On 2020-09-11 15:28, Sai Prakash Ranjan wrote: There are few places in arm-smmu-impl where there are extra blank lines, remove them FWIW those were deliberate - sometimes I like a bit of subtle space to visually delineate distinct groups of definitions

[PATCHv4 0/6] System Cache support for GPU and required SMMU support

2020-09-11 Thread Sai Prakash Ranjan
latest split pagetables and per-instance pagetables support Changes in v2: * Addressed review comments and rebased on top of Jordan's split pagetables series Sai Prakash Ranjan (4): iommu/io-pgtable-arm: Add support to use system cache iommu/arm-smmu: Add domain attribute for system cache

Re: [PATCHv4 6/6] iommu: arm-smmu-impl: Remove unwanted extra blank lines

2020-09-11 Thread Sai Prakash Ranjan
On 2020-09-11 21:37, Will Deacon wrote: On Fri, Sep 11, 2020 at 05:03:06PM +0100, Robin Murphy wrote: BTW am I supposed to have received 3 copies of everything? Because I did... Yeah, this seems to be happening for all of Sai's emails :/ Sorry, I am not sure what went wrong as I only sent

Re: [PATCHv4 6/6] iommu: arm-smmu-impl: Remove unwanted extra blank lines

2020-09-11 Thread Sai Prakash Ranjan
On 2020-09-11 22:04, Robin Murphy wrote: On 2020-09-11 17:21, Sai Prakash Ranjan wrote: On 2020-09-11 21:37, Will Deacon wrote: On Fri, Sep 11, 2020 at 05:03:06PM +0100, Robin Murphy wrote: BTW am I supposed to have received 3 copies of everything? Because I did... Yeah, this seems

Re: [PATCHv4 6/6] iommu: arm-smmu-impl: Remove unwanted extra blank lines

2020-09-15 Thread Sai Prakash Ranjan
On 2020-09-11 22:20, Sai Prakash Ranjan wrote: On 2020-09-11 22:04, Robin Murphy wrote: On 2020-09-11 17:21, Sai Prakash Ranjan wrote: On 2020-09-11 21:37, Will Deacon wrote: On Fri, Sep 11, 2020 at 05:03:06PM +0100, Robin Murphy wrote: BTW am I supposed to have received 3 copies

  1   2   >