Skip to content

Commit b811a45

Browse files
rmurphy-armjoergroedel
authored andcommitted
iommu/rockchip: Drop IOVA cookie management
The core code bakes its own cookies now. Tested-by: Heiko Stuebner <[email protected]> Acked-by: Heiko Stuebner <[email protected]> Signed-off-by: Robin Murphy <[email protected]> Link: https://lore.kernel.org/r/aff51e2da1e431987ae5fdafa62a6a7c4bd042dc.1628682048.git.robin.murphy@arm.com Signed-off-by: Joerg Roedel <[email protected]>
1 parent a88a42b commit b811a45

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

drivers/iommu/rockchip-iommu.c

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
#include <linux/compiler.h>
1111
#include <linux/delay.h>
1212
#include <linux/device.h>
13-
#include <linux/dma-iommu.h>
1413
#include <linux/dma-mapping.h>
1514
#include <linux/errno.h>
1615
#include <linux/interrupt.h>
@@ -1074,18 +1073,14 @@ static struct iommu_domain *rk_iommu_domain_alloc(unsigned type)
10741073
if (!rk_domain)
10751074
return NULL;
10761075

1077-
if (type == IOMMU_DOMAIN_DMA &&
1078-
iommu_get_dma_cookie(&rk_domain->domain))
1079-
goto err_free_domain;
1080-
10811076
/*
10821077
* rk32xx iommus use a 2 level pagetable.
10831078
* Each level1 (dt) and level2 (pt) table has 1024 4-byte entries.
10841079
* Allocate one 4 KiB page for each table.
10851080
*/
10861081
rk_domain->dt = (u32 *)get_zeroed_page(GFP_KERNEL | GFP_DMA32);
10871082
if (!rk_domain->dt)
1088-
goto err_put_cookie;
1083+
goto err_free_domain;
10891084

10901085
rk_domain->dt_dma = dma_map_single(dma_dev, rk_domain->dt,
10911086
SPAGE_SIZE, DMA_TO_DEVICE);
@@ -1106,9 +1101,6 @@ static struct iommu_domain *rk_iommu_domain_alloc(unsigned type)
11061101

11071102
err_free_dt:
11081103
free_page((unsigned long)rk_domain->dt);
1109-
err_put_cookie:
1110-
if (type == IOMMU_DOMAIN_DMA)
1111-
iommu_put_dma_cookie(&rk_domain->domain);
11121104
err_free_domain:
11131105
kfree(rk_domain);
11141106

@@ -1137,8 +1129,6 @@ static void rk_iommu_domain_free(struct iommu_domain *domain)
11371129
SPAGE_SIZE, DMA_TO_DEVICE);
11381130
free_page((unsigned long)rk_domain->dt);
11391131

1140-
if (domain->type == IOMMU_DOMAIN_DMA)
1141-
iommu_put_dma_cookie(&rk_domain->domain);
11421132
kfree(rk_domain);
11431133
}
11441134

0 commit comments

Comments
 (0)