File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 26
26
#include <linux/spinlock.h>
27
27
#include <linux/types.h>
28
28
29
+ #include "iommu-pages.h"
30
+
29
31
#define IOMMU_RESET_REG 0x010
30
32
#define IOMMU_RESET_RELEASE_ALL 0xffffffff
31
33
#define IOMMU_ENABLE_REG 0x020
@@ -679,8 +681,7 @@ sun50i_iommu_domain_alloc_paging(struct device *dev)
679
681
if (!sun50i_domain )
680
682
return NULL ;
681
683
682
- sun50i_domain -> dt = (u32 * )__get_free_pages (GFP_KERNEL | __GFP_ZERO ,
683
- get_order (DT_SIZE ));
684
+ sun50i_domain -> dt = iommu_alloc_pages (GFP_KERNEL , get_order (DT_SIZE ));
684
685
if (!sun50i_domain -> dt )
685
686
goto err_free_domain ;
686
687
@@ -702,7 +703,7 @@ static void sun50i_iommu_domain_free(struct iommu_domain *domain)
702
703
{
703
704
struct sun50i_iommu_domain * sun50i_domain = to_sun50i_domain (domain );
704
705
705
- free_pages (( unsigned long ) sun50i_domain -> dt , get_order (DT_SIZE ));
706
+ iommu_free_pages ( sun50i_domain -> dt , get_order (DT_SIZE ));
706
707
sun50i_domain -> dt = NULL ;
707
708
708
709
kfree (sun50i_domain );
You can’t perform that action at this time.
0 commit comments