Skip to content

Commit aa65464

Browse files
rmurphy-armjoergroedel
authored andcommitted
iommu/sun50i: Drop IOVA cookie management
The core code bakes its own cookies now. CC: Maxime Ripard <[email protected]> Signed-off-by: Robin Murphy <[email protected]> Link: https://lore.kernel.org/r/147edb0ba59be563df19cec3e63e621aa65b7b68.1628682048.git.robin.murphy@arm.com Signed-off-by: Joerg Roedel <[email protected]>
1 parent 5ad5f66 commit aa65464

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

drivers/iommu/sun50i-iommu.c

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
#include <linux/clk.h>
88
#include <linux/device.h>
99
#include <linux/dma-direction.h>
10-
#include <linux/dma-iommu.h>
1110
#include <linux/dma-mapping.h>
1211
#include <linux/err.h>
1312
#include <linux/errno.h>
@@ -610,14 +609,10 @@ static struct iommu_domain *sun50i_iommu_domain_alloc(unsigned type)
610609
if (!sun50i_domain)
611610
return NULL;
612611

613-
if (type == IOMMU_DOMAIN_DMA &&
614-
iommu_get_dma_cookie(&sun50i_domain->domain))
615-
goto err_free_domain;
616-
617612
sun50i_domain->dt = (u32 *)__get_free_pages(GFP_KERNEL | __GFP_ZERO,
618613
get_order(DT_SIZE));
619614
if (!sun50i_domain->dt)
620-
goto err_put_cookie;
615+
goto err_free_domain;
621616

622617
refcount_set(&sun50i_domain->refcnt, 1);
623618

@@ -627,10 +622,6 @@ static struct iommu_domain *sun50i_iommu_domain_alloc(unsigned type)
627622

628623
return &sun50i_domain->domain;
629624

630-
err_put_cookie:
631-
if (type == IOMMU_DOMAIN_DMA)
632-
iommu_put_dma_cookie(&sun50i_domain->domain);
633-
634625
err_free_domain:
635626
kfree(sun50i_domain);
636627

@@ -644,8 +635,6 @@ static void sun50i_iommu_domain_free(struct iommu_domain *domain)
644635
free_pages((unsigned long)sun50i_domain->dt, get_order(DT_SIZE));
645636
sun50i_domain->dt = NULL;
646637

647-
iommu_put_dma_cookie(domain);
648-
649638
kfree(sun50i_domain);
650639
}
651640

0 commit comments

Comments
 (0)