aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/iommu/amd/io_pgtable_v2.c
diff options
context:
space:
mode:
authorJason Gunthorpe <[email protected]>2025-04-08 16:54:09 +0000
committerJoerg Roedel <[email protected]>2025-04-17 14:22:51 +0000
commit5087f663c21e8ac2af7bd178a9b8da50ff7752ac (patch)
treeb650d88caa4eb5788a5d411f9c4fb0d771bbd5b2 /drivers/iommu/amd/io_pgtable_v2.c
parentiommu/pages: Remove iommu_alloc_page/pages() (diff)
downloadkernel-5087f663c21e8ac2af7bd178a9b8da50ff7752ac.tar.gz
kernel-5087f663c21e8ac2af7bd178a9b8da50ff7752ac.zip
iommu/pages: Remove iommu_alloc_page_node()
Use iommu_alloc_pages_node_sz() instead. AMD and Intel are both using 4K pages for these structures since those drivers only work on 4K PAGE_SIZE. riscv is also spec'd to use SZ_4K. Reviewed-by: Lu Baolu <[email protected]> Tested-by: Alejandro Jimenez <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Joerg Roedel <[email protected]>
Diffstat (limited to 'drivers/iommu/amd/io_pgtable_v2.c')
-rw-r--r--drivers/iommu/amd/io_pgtable_v2.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/iommu/amd/io_pgtable_v2.c b/drivers/iommu/amd/io_pgtable_v2.c
index f5f2f5327378..b47941353ccb 100644
--- a/drivers/iommu/amd/io_pgtable_v2.c
+++ b/drivers/iommu/amd/io_pgtable_v2.c
@@ -152,7 +152,7 @@ static u64 *v2_alloc_pte(int nid, u64 *pgd, unsigned long iova,
}
if (!IOMMU_PTE_PRESENT(__pte)) {
- page = iommu_alloc_page_node(nid, gfp);
+ page = iommu_alloc_pages_node_sz(nid, gfp, SZ_4K);
if (!page)
return NULL;
@@ -346,7 +346,7 @@ static struct io_pgtable *v2_alloc_pgtable(struct io_pgtable_cfg *cfg, void *coo
struct amd_io_pgtable *pgtable = io_pgtable_cfg_to_data(cfg);
int ias = IOMMU_IN_ADDR_BIT_SIZE;
- pgtable->pgd = iommu_alloc_page_node(cfg->amd.nid, GFP_KERNEL);
+ pgtable->pgd = iommu_alloc_pages_node_sz(cfg->amd.nid, GFP_KERNEL, SZ_4K);
if (!pgtable->pgd)
return NULL;