Commit 3057fb93 authored by Joerg Roedel's avatar Joerg Roedel

iommu/amd: Pass gfp flags to iommu_map_page() in amd_iommu_map()

A recent commit added a gfp parameter to amd_iommu_map() to make it
callable from atomic context, but forgot to pass it down to
iommu_map_page() and left GFP_KERNEL there. This caused
sleep-while-atomic warnings and needs to be fixed.
Reported-by: default avatarQian Cai <cai@lca.pw>
Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Fixes: 781ca2de ("iommu: Add gfp parameter to iommu_ops::map")
Reviewed-by: default avatarJerry Snitselaar <jsnitsel@redhat.com>
Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
parent 470eb3b3
......@@ -2561,7 +2561,7 @@ static int amd_iommu_map(struct iommu_domain *dom, unsigned long iova,
if (iommu_prot & IOMMU_WRITE)
prot |= IOMMU_PROT_IW;
ret = iommu_map_page(domain, iova, paddr, page_size, prot, GFP_KERNEL);
ret = iommu_map_page(domain, iova, paddr, page_size, prot, gfp);
domain_flush_np_cache(domain, iova, page_size);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment