Skip to content

Commit

Permalink
iommu/vt-d: Avoid GFP_ATOMIC where it is not needed
Browse files Browse the repository at this point in the history
There is no reason to use GFP_ATOMIC in a 'suspend' function.
Use GFP_KERNEL instead to give more opportunities to allocate the
requested memory.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/20201030182630.5154-1-christophe.jaillet@wanadoo.fr
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Link: https://lore.kernel.org/r/20201201013149.2466272-2-baolu.lu@linux.intel.com
Signed-off-by: Will Deacon <will@kernel.org>
  • Loading branch information
Christophe JAILLET authored and Will Deacon committed Dec 1, 2020
1 parent 405a43c commit 33e0715
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/iommu/intel/iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -3492,7 +3492,7 @@ static int iommu_suspend(void)

for_each_active_iommu(iommu, drhd) {
iommu->iommu_state = kcalloc(MAX_SR_DMAR_REGS, sizeof(u32),
GFP_ATOMIC);
GFP_KERNEL);
if (!iommu->iommu_state)
goto nomem;
}
Expand Down

0 comments on commit 33e0715

Please sign in to comment.