Re: [PATCH] dt-bindings: Improve phandle-array schemas

2022-01-19 Thread Georgi Djakov
updating so that the bracketing of property values matches the schema. [..] .../bindings/interconnect/qcom,rpmh.yaml | 2 + Acked-by: Georgi Djakov ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman

[RFC 1/2] arm64: Add support for system cache memory type

2021-11-16 Thread Georgi Djakov
te for CPU mappings, so add it. Signed-off-by: Isaac J. Manjarres Signed-off-by: Georgi Djakov --- arch/arm64/include/asm/memory.h | 1 + arch/arm64/include/asm/pgtable.h | 9 + arch/arm64/include/asm/sysreg.h | 1 + arch/arm64/mm/proc.S | 3 ++- include/linux/dma-map-ops.

[RFC 2/2] drm/msm/gem: Make use of the system cache

2021-11-16 Thread Georgi Djakov
Instead of writing to WC cmdstream buffers that go all the way to the main memory, let's use the system cache to improve the performance. Signed-off-by: Georgi Djakov --- drivers/gpu/drm/msm/msm_gem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm

[PATCH] iommu/iova: Add support for IOVA max alignment tuning

2021-10-13 Thread Georgi Djakov
-off-by: Georgi Djakov --- Documentation/admin-guide/kernel-parameters.txt | 8 drivers/iommu/iova.c| 26 - 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation

Re: [PATCH 0/3] iommu/drm/msm: Allow non-coherent masters to use system cache

2021-07-28 Thread Georgi Djakov
On Mon, Jan 11, 2021 at 07:45:02PM +0530, Sai Prakash Ranjan wrote: > commit ecd7274fb4cd ("iommu: Remove unused IOMMU_SYS_CACHE_ONLY flag") > removed unused IOMMU_SYS_CACHE_ONLY prot flag and along with it went > the memory type setting required for the non-coherent masters to use > system cache.

Re: [PATCH v7 00/15] Optimizing iommu_[map/unmap] performance

2021-07-14 Thread Georgi Djakov
On 16.06.21 16:38, Georgi Djakov wrote: When unmapping a buffer from an IOMMU domain, the IOMMU framework unmaps the buffer at a granule of the largest page size that is supported by the IOMMU hardware and fits within the buffer. For every block that is unmapped, the IOMMU framework will call

[PATCH v7 02/15] iommu: Add an unmap_pages() op for IOMMU drivers

2021-06-16 Thread Georgi Djakov
nmap_pages() callback, the existing logic of unmapping memory one page block at a time will be used. Signed-off-by: Isaac J. Manjarres Suggested-by: Will Deacon Signed-off-by: Will Deacon Acked-by: Lu Baolu Signed-off-by: Georgi Djakov --- include/linux/iommu.h | 4 1 file changed, 4

[PATCH v7 09/15] iommu/io-pgtable-arm: Prepare PTE methods for handling multiple entries

2021-06-16 Thread Georgi Djakov
From: "Isaac J. Manjarres" The PTE methods currently operate on a single entry. In preparation for manipulating multiple PTEs in one map or unmap call, allow them to handle multiple PTEs. Signed-off-by: Isaac J. Manjarres Suggested-by: Robin Murphy Signed-off-by: Georgi Djakov --

[PATCH v7 06/15] iommu: Split 'addr_merge' argument to iommu_pgsize() into separate parts

2021-06-16 Thread Georgi Djakov
Signed-off-by: Georgi Djakov --- drivers/iommu/iommu.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c index 80e471ada358..80e14c139d40 100644 --- a/drivers/iommu/iommu.c +++ b/drivers/iommu/iommu.c @@ -2375,12 +2375,13

[PATCH v7 15/15] iommu/arm-smmu: Implement the map_pages() IOMMU driver callback

2021-06-16 Thread Georgi Djakov
Manjarres Suggested-by: Will Deacon Signed-off-by: Georgi Djakov --- drivers/iommu/arm/arm-smmu/arm-smmu.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu.c b/drivers/iommu/arm/arm-smmu/arm-smmu.c index 593a15cfa8d5..c1ca3b49a

[PATCH v7 00/15] Optimizing iommu_[map/unmap] performance

2021-06-16 Thread Georgi Djakov
When unmapping a buffer from an IOMMU domain, the IOMMU framework unmaps the buffer at a granule of the largest page size that is supported by the IOMMU hardware and fits within the buffer. For every block that is unmapped, the IOMMU framework will call into the IOMMU driver, and then the

[PATCH v7 12/15] iommu/io-pgtable-arm-v7s: Implement arm_v7s_unmap_pages()

2021-06-16 Thread Georgi Djakov
From: "Isaac J. Manjarres" Implement the unmap_pages() callback for the ARM v7s io-pgtable format. Signed-off-by: Isaac J. Manjarres Signed-off-by: Georgi Djakov --- drivers/iommu/io-pgtable-arm-v7s.c | 24 +--- 1 file changed, 21 insertions(+), 3 deletions(-)

[PATCH v7 14/15] iommu/arm-smmu: Implement the unmap_pages() IOMMU driver callback

2021-06-16 Thread Georgi Djakov
Manjarres Suggested-by: Will Deacon Signed-off-by: Georgi Djakov --- drivers/iommu/arm/arm-smmu/arm-smmu.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu.c b/drivers/iommu/arm/arm-smmu/arm-smmu.c index 61233bcc4588..593a15cfa

[PATCH v7 08/15] iommu: Add support for the map_pages() callback

2021-06-16 Thread Georgi Djakov
Suggested-by: Will Deacon Signed-off-by: Georgi Djakov --- drivers/iommu/iommu.c | 43 +++ 1 file changed, 35 insertions(+), 8 deletions(-) diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c index 725622c7e603..70a729ce88b1 100644 --- a/drivers/iommu/iom

[PATCH v7 01/15] iommu/io-pgtable: Introduce unmap_pages() as a page table op

2021-06-16 Thread Georgi Djakov
same size, instead of a single block. Doing so allows multiple blocks to be unmapped in one call to the io-pgtable code, reducing the number of page table walks, and indirect calls. Signed-off-by: Isaac J. Manjarres Suggested-by: Will Deacon Signed-off-by: Will Deacon Signed-off-by: Georgi Djakov --

[PATCH v7 10/15] iommu/io-pgtable-arm: Implement arm_lpae_unmap_pages()

2021-06-16 Thread Georgi Djakov
From: "Isaac J. Manjarres" Implement the unmap_pages() callback for the ARM LPAE io-pgtable format. Signed-off-by: Isaac J. Manjarres Suggested-by: Will Deacon Signed-off-by: Georgi Djakov --- drivers/iommu/io-pgtable-arm.c | 120 + 1 file c

[PATCH v7 13/15] iommu/io-pgtable-arm-v7s: Implement arm_v7s_map_pages()

2021-06-16 Thread Georgi Djakov
From: "Isaac J. Manjarres" Implement the map_pages() callback for the ARM v7s io-pgtable format. Signed-off-by: Isaac J. Manjarres Signed-off-by: Georgi Djakov --- drivers/iommu/io-pgtable-arm-v7s.c | 26 ++ 1 file changed, 22 insertions(+), 4 deletions(-)

[PATCH v7 07/15] iommu: Hook up '->unmap_pages' driver callback

2021-06-16 Thread Georgi Djakov
From: Will Deacon Extend iommu_pgsize() to populate an optional 'count' parameter so that we can direct unmapping operation to the ->unmap_pages callback if it has been provided by the driver. Signed-off-by: Will Deacon Signed-off-by: Isaac J. Manjarres Signed-off-by: Georgi Dja

[PATCH v7 11/15] iommu/io-pgtable-arm: Implement arm_lpae_map_pages()

2021-06-16 Thread Georgi Djakov
From: "Isaac J. Manjarres" Implement the map_pages() callback for the ARM LPAE io-pgtable format. Signed-off-by: Isaac J. Manjarres Signed-off-by: Georgi Djakov --- drivers/iommu/io-pgtable-arm.c | 41 +++-- 1 file changed, 31 insertions(+), 10

[PATCH v7 05/15] iommu: Use bitmap to calculate page size in iommu_pgsize()

2021-06-16 Thread Georgi Djakov
From: Will Deacon Avoid the potential for shifting values by amounts greater than the width of their type by using a bitmap to compute page size in iommu_pgsize(). Signed-off-by: Will Deacon Signed-off-by: Isaac J. Manjarres Signed-off-by: Georgi Djakov --- drivers/iommu/iommu.c | 31

[PATCH v7 04/15] iommu: Add a map_pages() op for IOMMU drivers

2021-06-16 Thread Georgi Djakov
map_pages() callback, the existing logic of mapping memory one page block at a time will be used. Signed-off-by: Isaac J. Manjarres Suggested-by: Will Deacon Acked-by: Lu Baolu Signed-off-by: Georgi Djakov --- include/linux/iommu.h | 5 + 1 file changed, 5 insertions(+) diff --git a/include/linux

[PATCH v7 03/15] iommu/io-pgtable: Introduce map_pages() as a page table op

2021-06-16 Thread Georgi Djakov
as, so add a map_pages() callback to the io-pgtable ops structure, so that a range of pages of the same size can be mapped within the same call. Signed-off-by: Isaac J. Manjarres Suggested-by: Will Deacon Signed-off-by: Georgi Djakov --- include/linux/io-pgtable.h | 4 1 file changed, 4 insertion

[PATCH v6 06/15] iommu: Split 'addr_merge' argument to iommu_pgsize() into separate parts

2021-06-15 Thread Georgi Djakov
Signed-off-by: Georgi Djakov --- drivers/iommu/iommu.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c index 80e471ada358..80e14c139d40 100644 --- a/drivers/iommu/iommu.c +++ b/drivers/iommu/iommu.c @@ -2375,12 +2375,13

[PATCH v6 04/15] iommu: Add a map_pages() op for IOMMU drivers

2021-06-15 Thread Georgi Djakov
map_pages() callback, the existing logic of mapping memory one page block at a time will be used. Signed-off-by: Isaac J. Manjarres Suggested-by: Will Deacon Acked-by: Lu Baolu Signed-off-by: Georgi Djakov --- include/linux/iommu.h | 5 + 1 file changed, 5 insertions(+) diff --git a/include/linux

[PATCH v6 12/15] iommu/io-pgtable-arm-v7s: Implement arm_v7s_unmap_pages()

2021-06-15 Thread Georgi Djakov
From: "Isaac J. Manjarres" Implement the unmap_pages() callback for the ARM v7s io-pgtable format. Signed-off-by: Isaac J. Manjarres Signed-off-by: Georgi Djakov --- drivers/iommu/io-pgtable-arm-v7s.c | 24 +--- 1 file changed, 21 insertions(+), 3 deletions(-)

[PATCH v6 00/15] Optimizing iommu_[map/unmap] performance

2021-06-15 Thread Georgi Djakov
When unmapping a buffer from an IOMMU domain, the IOMMU framework unmaps the buffer at a granule of the largest page size that is supported by the IOMMU hardware and fits within the buffer. For every block that is unmapped, the IOMMU framework will call into the IOMMU driver, and then the

[PATCH v6 07/15] iommu: Hook up '->unmap_pages' driver callback

2021-06-15 Thread Georgi Djakov
From: Will Deacon Extend iommu_pgsize() to populate an optional 'count' parameter so that we can direct unmapping operation to the ->unmap_pages callback if it has been provided by the driver. Signed-off-by: Will Deacon Signed-off-by: Isaac J. Manjarres Signed-off-by: Georgi Dja

[PATCH v6 08/15] iommu: Add support for the map_pages() callback

2021-06-15 Thread Georgi Djakov
Suggested-by: Will Deacon Signed-off-by: Georgi Djakov --- drivers/iommu/iommu.c | 43 +++ 1 file changed, 35 insertions(+), 8 deletions(-) diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c index 725622c7e603..89f8ab6a72a9 100644 --- a/drivers/iommu/iom

[PATCH v6 14/15] iommu/arm-smmu: Implement the unmap_pages() IOMMU driver callback

2021-06-15 Thread Georgi Djakov
Manjarres Suggested-by: Will Deacon Signed-off-by: Georgi Djakov --- drivers/iommu/arm/arm-smmu/arm-smmu.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu.c b/drivers/iommu/arm/arm-smmu/arm-smmu.c index 61233bcc4588..593a15cfa

[PATCH v6 13/15] iommu/io-pgtable-arm-v7s: Implement arm_v7s_map_pages()

2021-06-15 Thread Georgi Djakov
From: "Isaac J. Manjarres" Implement the map_pages() callback for the ARM v7s io-pgtable format. Signed-off-by: Isaac J. Manjarres Signed-off-by: Georgi Djakov --- drivers/iommu/io-pgtable-arm-v7s.c | 26 ++ 1 file changed, 22 insertions(+), 4 deletions(-)

[PATCH v6 01/15] iommu/io-pgtable: Introduce unmap_pages() as a page table op

2021-06-15 Thread Georgi Djakov
same size, instead of a single block. Doing so allows multiple blocks to be unmapped in one call to the io-pgtable code, reducing the number of page table walks, and indirect calls. Signed-off-by: Isaac J. Manjarres Suggested-by: Will Deacon Signed-off-by: Will Deacon Signed-off-by: Georgi Djakov --

[PATCH v6 10/15] iommu/io-pgtable-arm: Implement arm_lpae_unmap_pages()

2021-06-15 Thread Georgi Djakov
From: "Isaac J. Manjarres" Implement the unmap_pages() callback for the ARM LPAE io-pgtable format. Signed-off-by: Isaac J. Manjarres Suggested-by: Will Deacon Signed-off-by: Georgi Djakov --- drivers/iommu/io-pgtable-arm.c | 75 +++--- 1 file c

[PATCH v6 11/15] iommu/io-pgtable-arm: Implement arm_lpae_map_pages()

2021-06-15 Thread Georgi Djakov
From: "Isaac J. Manjarres" Implement the map_pages() callback for the ARM LPAE io-pgtable format. Signed-off-by: Isaac J. Manjarres Signed-off-by: Georgi Djakov --- drivers/iommu/io-pgtable-arm.c | 41 +++-- 1 file changed, 31 insertions(+), 10

[PATCH v6 02/15] iommu: Add an unmap_pages() op for IOMMU drivers

2021-06-15 Thread Georgi Djakov
nmap_pages() callback, the existing logic of unmapping memory one page block at a time will be used. Signed-off-by: Isaac J. Manjarres Suggested-by: Will Deacon Signed-off-by: Will Deacon Acked-by: Lu Baolu Signed-off-by: Georgi Djakov --- include/linux/iommu.h | 4 1 file changed, 4

[PATCH v6 15/15] iommu/arm-smmu: Implement the map_pages() IOMMU driver callback

2021-06-15 Thread Georgi Djakov
Manjarres Suggested-by: Will Deacon Signed-off-by: Georgi Djakov --- drivers/iommu/arm/arm-smmu/arm-smmu.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu.c b/drivers/iommu/arm/arm-smmu/arm-smmu.c index 593a15cfa8d5..c1ca3b49a

[PATCH v6 05/15] iommu: Use bitmap to calculate page size in iommu_pgsize()

2021-06-15 Thread Georgi Djakov
From: Will Deacon Avoid the potential for shifting values by amounts greater than the width of their type by using a bitmap to compute page size in iommu_pgsize(). Signed-off-by: Will Deacon Signed-off-by: Isaac J. Manjarres Signed-off-by: Georgi Djakov --- drivers/iommu/iommu.c | 31

[PATCH v6 09/15] iommu/io-pgtable-arm: Prepare PTE methods for handling multiple entries

2021-06-15 Thread Georgi Djakov
From: "Isaac J. Manjarres" The PTE methods currently operate on a single entry. In preparation for manipulating multiple PTEs in one map or unmap call, allow them to handle multiple PTEs. Signed-off-by: Isaac J. Manjarres Suggested-by: Robin Murphy Signed-off-by: Georgi Djakov --

[PATCH v6 03/15] iommu/io-pgtable: Introduce map_pages() as a page table op

2021-06-15 Thread Georgi Djakov
as, so add a map_pages() callback to the io-pgtable ops structure, so that a range of pages of the same size can be mapped within the same call. Signed-off-by: Isaac J. Manjarres Suggested-by: Will Deacon Signed-off-by: Georgi Djakov --- include/linux/io-pgtable.h | 4 1 file changed, 4 insertion

Re: [PATCH v2 1/7] iommu/io-pgtable: Introduce dynamic io-pgtable fmt registration

2020-12-23 Thread Georgi Djakov
Hi Isaac, On 22.12.20 2:44, Isaac J. Manjarres wrote: The io-pgtable code constructs an array of init functions for each page table format at compile time. This is not ideal, as this increases the footprint of the io-pgtable code, as well as prevents io-pgtable formats from being built as