IOVA allocation dependency between firmware buffer and remaining buffers

2020-04-20 Thread Ajay kumar
using DMA API limit_iova_alloc_range(dev, 0x1000_, 0xC000_); /* via helpers */ alloc( ) other buffers using DMA API Thanks, Ajay Kumar ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: IOVA allocation dependency between firmware buffer and remaining buffers

2020-04-24 Thread Ajay kumar
Can someone check this? On Mon, Apr 20, 2020 at 9:24 PM Ajay kumar wrote: > > Hi All, > > I have an IOMMU master which has limitations as mentioned below: > 1) The IOMMU master internally executes a firmware, and the firmware memory > is allocated by the same master driver. >

[RFC PATCH] drivers: iommu: reset cached node if dma_mask is changed

2020-05-04 Thread Ajay Kumar
: This patch is needed to address the issue discussed in below thread: https://www.spinics.net/lists/iommu/msg43586.html Signed-off-by: Ajay Kumar Signed-off-by: Sathyam Panda --- drivers/iommu/iova.c | 17 - include/linux/iova.h | 1 + 2 files changed, 17 insertions(+), 1

Re: [RFC PATCH] drivers: iommu: reset cached node if dma_mask is changed

2020-05-07 Thread Ajay kumar
Hi Robin, On 5/7/20, Robin Murphy wrote: > On 2020-05-04 7:37 pm, Ajay Kumar wrote: >> The current IOVA allocation code stores a cached copy of the >> first allocated IOVA address node, and all the subsequent allocations >> have no way to get past(higher than) the first

Re: [PATCH] iommu/iova: Retry from last rb tree node if iova search fails

2020-05-07 Thread Ajay kumar
On 5/7/20, Robin Murphy wrote: > On 2020-05-06 9:01 pm, vji...@codeaurora.org wrote: >> From: Vijayanand Jitta >> >> When ever a new iova alloc request comes iova is always searched >> from the cached node and the nodes which are previous to cached >> node. So, even if there is free iova space

Re: IOVA allocation dependency between firmware buffer and remaining buffers

2020-09-23 Thread Ajay Kumar
Hello all, We pretty much tried to solve the same issue here with a new API in DMA-IOMMU: https://lore.kernel.org/linux-iommu/20200811054912.ga...@infradead.org/T/ Christoph - the user part would be MFC devices on exynos platforms Thanks, Ajay On Wed, Sep 23, 2020 at 12:28 PM Christoph

Re: IOVA allocation dependency between firmware buffer and remaining buffers

2020-09-23 Thread Ajay kumar
Hello all, We pretty much tried to solve the same issue here with a new API in DMA-IOMMU: https://lore.kernel.org/linux-iommu/20200811054912.ga...@infradead.org/T/ Christopher- the user part would be MFC devices on exynos platforms Thanks, Ajay On 9/23/20, Christoph Hellwig wrote: > On Wed,

[RFC PATCH] dma-iommu: allow devices to set IOVA range dynamically

2020-08-03 Thread Ajay Kumar
current cached node, we do a reset of current cached nodes as well. Signed-off-by: Ajay Kumar --- drivers/iommu/dma-iommu.c | 73 +++ drivers/iommu/iommu.c | 16 + include/linux/iommu.h | 6 include/linux/iova.h | 6 4 files changed

[RFC V2 PATCH] dma-iommu: allow devices to set IOVA range dynamically

2020-08-10 Thread Ajay Kumar
); When they want to limit IOVA for allocated buffers in range 0x100 to 0xC000: iommu_set_iova_range(dev, 0x100, 0xC000 - 0x100); = Signed-off-by: Ajay Kumar --- drivers/iommu/dma-iommu.c | 73

[PATCH] iommu/arm-smmu-v3: Handle duplicated Stream IDs from other masters

2021-01-07 Thread Ajay Kumar
-id. Signed-off-by: Ajay Kumar --- drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 33 + 1 file changed, 33 insertions(+) diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c index e634bbe60573..a91c3c0e9ee8 100644

Re: [PATCH] iommu/arm-smmu-v3: Handle duplicated Stream IDs from other masters

2021-01-12 Thread Ajay Kumar
On Tue, Jan 12, 2021 at 12:57 AM Robin Murphy wrote: > > On 2021-01-07 13:03, Will Deacon wrote: > > On Thu, Jan 07, 2021 at 03:03:40PM +0530, Ajay Kumar wrote: > >> When PCI function drivers(ex:pci-endpoint-test) are probed for already > >> initialized PCIe