[PATCHv7 7/7] iommu: arm-smmu-impl: Add a space before open parenthesis

2020-10-30 Thread Sai Prakash Ranjan
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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu-impl.c b/drivers/iommu/arm/arm

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

2020-10-30 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 | 9 + drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 21

[PATCHv7 0/7] System Cache support for GPU and required SMMU support

2020-10-30 Thread Sai Prakash Ranjan
-instance pagetables support Changes in v2: * Addressed review comments and rebased on top of Jordan's split pagetables series Jordan Crouse (1): drm/msm/a6xx: Add support for using system cache on MMU500 based targets Sai Prakash Ranjan (4): iommu/io-pgtable-arm: Add support to use

[PATCHv7 2/7] iommu/arm-smmu: Add domain attribute for system cache

2020-10-30 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

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

2020-10-30 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

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

2020-10-30 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

[PATCHv7 5/7] drm/msm/a6xx: Add support for using system cache on MMU500 based targets

2020-10-30 Thread Sai Prakash Ranjan
and modify the programming sequence accordingly. [1] https://patchwork.freedesktop.org/series/83037/ Signed-off-by: Jordan Crouse Signed-off-by: Sai Prakash Ranjan --- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 46 +-- drivers/gpu/drm/msm/adreno/a6xx_gpu.h | 1 + 2 files

[PATCHv7 3/7] drm/msm: rearrange the gpu_rmw() function

2020-10-30 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 49685571dc0e..a1e22b974b77

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

2020-10-26 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

[PATCHv6 6/6] iommu: arm-smmu-impl: Add a space before open parenthesis

2020-10-26 Thread Sai Prakash Ranjan
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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu-impl.c b/drivers/iommu/arm/arm

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

2020-10-26 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 49685571dc0e..a1e22b974b77

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

2020-10-26 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 | 9 + drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 21

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

2020-10-26 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

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

2020-10-26 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

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

2020-10-26 Thread Sai Prakash Ranjan
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 iommu: arm-smmu-impl: Use table to list QCOM implementations iommu: arm-smmu-impl: Add a space

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

2020-09-28 Thread Sai Prakash Ranjan
On 2020-09-28 21:41, Jordan Crouse wrote: On Mon, Sep 28, 2020 at 05:56:55PM +0530, Sai Prakash Ranjan wrote: Hi Jordan, On 2020-09-23 20:33, Jordan Crouse wrote: >On Tue, Sep 22, 2020 at 11:48:17AM +0530, Sai Prakash Ranjan wrote: >>From: Sharat Masetty >> >>The last l

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

2020-09-28 Thread Sai Prakash Ranjan
On 2020-09-23 20:54, Robin Murphy wrote: On 2020-09-22 07:18, Sai Prakash Ranjan wrote: 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

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

2020-09-28 Thread Sai Prakash Ranjan
Hi Jordan, On 2020-09-23 20:33, Jordan Crouse wrote: On Tue, Sep 22, 2020 at 11:48:17AM +0530, Sai Prakash Ranjan wrote: From: Sharat Masetty The last level system cache can be partitioned to 32 different slices of which GPU has two slices preallocated. One slice is used for caching GPU

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

2020-09-22 Thread Sai Prakash Ranjan
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 iommu: arm-smmu-impl: Use table to list QCOM implementations iommu: arm-smmu-impl: Add a space before open parenthesis Sharat Masetty (2): drm/msm

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

2020-09-22 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

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

2020-09-22 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 49685571dc0e..a1e22b974b77

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

2020-09-22 Thread Sai Prakash Ranjan
Hi Will, On 2020-09-21 23:33, Will Deacon wrote: On Fri, Sep 11, 2020 at 07:57:18PM +0530, Sai Prakash Ranjan wrote: Add a quirk IO_PGTABLE_QUIRK_SYS_CACHE to override the attributes set in TCR for the page table walker when using system cache. I wonder if the panfrost folks can reuse

[PATCHv5 6/6] iommu: arm-smmu-impl: Add a space before open parenthesis

2020-09-22 Thread Sai Prakash Ranjan
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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu-impl.c b/drivers/iommu/arm/arm

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

2020-09-22 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

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

2020-09-22 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

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

2020-09-22 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

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

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-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 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 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 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 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 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

[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: [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 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 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 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 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 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

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] iommu: Add support to filter non-strict/lazy mode based on device names

2020-08-26 Thread Sai Prakash Ranjan
On 2020-08-26 19:21, Robin Murphy wrote: On 2020-08-26 13:17, Sai Prakash Ranjan wrote: On 2020-08-26 17:07, Robin Murphy wrote: On 2020-08-25 16:42, Sai Prakash Ranjan wrote: Currently the non-strict or lazy mode of TLB invalidation can only be set for all or no domains. This works well

Re: [PATCH] iommu: Add support to filter non-strict/lazy mode based on device names

2020-08-26 Thread Sai Prakash Ranjan
On 2020-08-26 17:07, Robin Murphy wrote: On 2020-08-25 16:42, Sai Prakash Ranjan wrote: Currently the non-strict or lazy mode of TLB invalidation can only be set for all or no domains. This works well for development platforms where setting to non-strict/lazy mode is fine for performance

Re: [PATCH] iommu: Add support to filter non-strict/lazy mode based on device names

2020-08-26 Thread Sai Prakash Ranjan
Hi, On 2020-08-26 03:45, Doug Anderson wrote: Hi, On Tue, Aug 25, 2020 at 12:01 PM Sai Prakash Ranjan wrote: Hi, On 2020-08-25 21:40, Doug Anderson wrote: > Hi, > > On Tue, Aug 25, 2020 at 8:43 AM Sai Prakash Ranjan > wrote: >> >> Currently the non-strict or lazy

Re: [PATCH] iommu: Add support to filter non-strict/lazy mode based on device names

2020-08-25 Thread Sai Prakash Ranjan
Hi, On 2020-08-25 21:40, Doug Anderson wrote: Hi, On Tue, Aug 25, 2020 at 8:43 AM Sai Prakash Ranjan wrote: Currently the non-strict or lazy mode of TLB invalidation can only be set for all or no domains. This works well for development platforms where setting to non-strict/lazy mode

[PATCH] iommu: Add support to filter non-strict/lazy mode based on device names

2020-08-25 Thread Sai Prakash Ranjan
Signed-off-by: Sai Prakash Ranjan --- drivers/iommu/iommu.c | 37 + 1 file changed, 33 insertions(+), 4 deletions(-) diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c index 609bd25bf154..fd10a073f557 100644 --- a/drivers/iommu/iommu.c +++ b/drivers/io

Re: [Freedreno] [PATCH] iommu/arm-smmu: Add a init_context_bank implementation hook

2020-07-13 Thread Sai Prakash Ranjan
On 2020-07-14 00:43, Jordan Crouse wrote: On Mon, Jul 13, 2020 at 08:03:32PM +0100, Will Deacon wrote: On Mon, Jul 13, 2020 at 11:00:32AM -0600, Jordan Crouse wrote: > On Mon, Jul 13, 2020 at 04:11:23PM +0100, Will Deacon wrote: > > On Thu, Jun 11, 2020 at 04:36:56PM -0600, Jordan Crouse wrote:

Re: [PATCHv3 7/7] drm/msm/a6xx: Add support for using system cache(LLC)

2020-07-03 Thread Sai Prakash Ranjan
On 2020-07-03 21:34, Rob Clark wrote: On Fri, Jul 3, 2020 at 7:53 AM Sai Prakash Ranjan wrote: Hi Will, On 2020-07-03 19:07, Will Deacon wrote: > On Mon, Jun 29, 2020 at 09:22:50PM +0530, Sai Prakash Ranjan wrote: >> diff --git a/drivers/gpu/drm/msm/msm_iommu.c >> b/driv

Re: [PATCH] iommu: Remove unused IOMMU_SYS_CACHE_ONLY flag

2020-07-03 Thread Sai Prakash Ranjan
On 2020-07-03 21:55, Will Deacon wrote: The IOMMU_SYS_CACHE_ONLY flag was never exposed via the DMA API and has no in-tree users. Remove it. Cc: Robin Murphy Cc: "Isaac J. Manjarres" Cc: Joerg Roedel Cc: Christoph Hellwig Cc: Sai Prakash Ranjan Cc: Rob Clark Signed-off-by: W

Re: [PATCHv3 7/7] drm/msm/a6xx: Add support for using system cache(LLC)

2020-07-03 Thread Sai Prakash Ranjan
Hi Will, On 2020-07-03 19:07, Will Deacon wrote: On Mon, Jun 29, 2020 at 09:22:50PM +0530, Sai Prakash Ranjan wrote: diff --git a/drivers/gpu/drm/msm/msm_iommu.c b/drivers/gpu/drm/msm/msm_iommu.c index f455c597f76d..bd1d58229cc2 100644 --- a/drivers/gpu/drm/msm/msm_iommu.c +++ b/drivers/gpu

Re: [PATCH v9 0/7] iommu/arm-smmu: Enable split pagetable support

2020-07-01 Thread Sai Prakash Ranjan
Hi Will, Robin, On 2020-06-27 01:30, Jordan Crouse wrote: Another iteration of the split-pagetable support for arm-smmu and the Adreno GPU SMMU. After email discussions [1] we opted to make a arm-smmu implementation for specifically for the Adreno GPU and use that to enable split pagetable

[PATCHv3 3/7] iommu/arm-smmu: Add domain attribute for system cache

2020-06-29 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-smmu.c | 17 + drivers/iommu/arm-smmu.h

[PATCHv3 7/7] drm/msm/a6xx: Add support for using system cache(LLC)

2020-06-29 Thread Sai Prakash Ranjan
it. Similarly DOMAIN_ATTR_SYS_CACHE is another domain level attribute used by the IOMMU driver to set the right attributes to cache the hardware pagetables into the system cache. Signed-off-by: Sharat Masetty (sai: fix to set attr before device attach to IOMMU and rebase) Signed-off-by: Sai Prakash

[PATCHv3 5/7] iommu: arm-smmu-impl: Convert to use of_match_node() for qcom impl

2020-06-29 Thread Sai Prakash Ranjan
Use of_match_node() to match qcom implementation instead of multiple of_device_compatible() calls for each qcom implementation. Signed-off-by: Sai Prakash Ranjan --- drivers/iommu/arm-smmu-impl.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/iommu/arm-smmu

[PATCHv3 4/7] iommu: arm-smmu-impl: Remove unwanted extra blank lines

2020-06-29 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-smmu-impl.c | 6 +- 1 file changed, 1 insertion(+), 5

[PATCHv3 6/7] drm/msm: rearrange the gpu_rmw() function

2020-06-29 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 0c219b954943..5aa070929220

[PATCHv3 2/7] iommu/io-pgtable-arm: Add support to use system cache

2020-06-29 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

[PATCHv3 1/7] iommu/arm-smmu: Add a init_context_bank implementation hook

2020-06-29 Thread Sai Prakash Ranjan
transactions. Doing so could hang the GPU if one of the terminated transactions is a CP read. This depends on the arm-smmu adreno SMMU implementation [1]. [1] https://lore.kernel.org/patchwork/patch/1264452/ Signed-off-by: Jordan Crouse Signed-off-by: Sai Prakash Ranjan --- drivers/iommu/arm-smmu

[PATCHv3 0/7] System Cache support for GPU and required SMMU support

2020-06-29 Thread Sai Prakash Ranjan
series [1] https://lore.kernel.org/patchwork/cover/1264446/ [2] https://lore.kernel.org/patchwork/cover/1264460/ Jordan Crouse (1): iommu/arm-smmu: Add a init_context_bank implementation hook Sai Prakash Ranjan (4): iommu/io-pgtable-arm: Add support to use system cache iommu/arm-smmu: Add

Re: [RFC PATCH] iommu/arm-smmu: Remove shutdown callback

2020-06-08 Thread Sai Prakash Ranjan
Hi Will, On 2020-06-08 17:08, Will Deacon wrote: On Mon, Jun 08, 2020 at 02:43:03PM +0530, Sai Prakash Ranjan wrote: On 2020-06-08 13:48, Will Deacon wrote: > On Sun, Jun 07, 2020 at 04:39:18PM +0530, Sai Prakash Ranjan wrote: > > Remove SMMU shutdown callback since it seems to c

Re: [RFC PATCH] iommu/arm-smmu: Remove shutdown callback

2020-06-08 Thread Sai Prakash Ranjan
Hi Robin, On 2020-06-08 16:56, Robin Murphy wrote: On 2020-06-08 10:13, Sai Prakash Ranjan wrote: Hi Will, On 2020-06-08 13:48, Will Deacon wrote: On Sun, Jun 07, 2020 at 04:39:18PM +0530, Sai Prakash Ranjan wrote: Remove SMMU shutdown callback since it seems to cause more problems than

Re: [RFC PATCH] iommu/arm-smmu: Remove shutdown callback

2020-06-08 Thread Sai Prakash Ranjan
Hi Will, On 2020-06-08 13:48, Will Deacon wrote: On Sun, Jun 07, 2020 at 04:39:18PM +0530, Sai Prakash Ranjan wrote: Remove SMMU shutdown callback since it seems to cause more problems than benefits. With this callback, we need to make sure that all clients/consumers of SMMU do not perform any

[RFC PATCH] iommu/arm-smmu: Remove shutdown callback

2020-06-07 Thread Sai Prakash Ranjan
, we need to identify the client of SMMU causing the memory corruption and add appropriate shutdown callback to the client rather than to the SMMU. Signed-off-by: Sai Prakash Ranjan --- drivers/iommu/arm-smmu-v3.c | 6 -- drivers/iommu/arm-smmu.c| 6 -- 2 files changed, 12 deletions

Re: [PATCH] iommu: Don't take group reference in iommu_alloc_default_domain()

2020-05-25 Thread Sai Prakash Ranjan
a group reference on its own, so to fix this leak, do not take another reference in iommu_alloc_default_domain() and pass the group as a function parameter instead. Reference: https://lore.kernel.org/lkml/20200522130145.30067-1-saiprakash.ran...@codeaurora.org/ Reported-by: Sai Prakash Ranjan Cc

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

2020-05-25 Thread Sai Prakash Ranjan
Hi Joerg, On 2020-05-25 18:32, Joerg Roedel wrote: Hi, On Fri, May 22, 2020 at 06:31:45PM +0530, Sai Prakash Ranjan wrote: 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

[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] iomm/arm-smmu: Add stall implementation hook

2020-05-20 Thread Sai Prakash Ranjan
On 2020-05-19 20:41, Rob Clark wrote: On Tue, May 19, 2020 at 2:26 AM Sai Prakash Ranjan wrote: Hi Will, On 2020-05-18 21:15, Will Deacon wrote: > On Mon, May 11, 2020 at 11:30:08AM -0600, Jordan Crouse wrote: >> On Fri, May 08, 2020 at 08:40:40AM -0700, Rob Clark wrote: >>

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: [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: [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: [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: [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

[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: >>

[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

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

[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

[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 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 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

[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 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 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 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 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 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

  1   2   >