From: Christophe JAILLET Date: Tue, 1 Dec 2020 01:31:49 +0000 (+0800) Subject: iommu/vt-d: Avoid GFP_ATOMIC where it is not needed X-Git-Tag: accepted/tizen/unified/20230118.172025~8257^2~4^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=33e07157105e472b746b70b3ed4197c57c43ab68;p=platform%2Fkernel%2Flinux-rpi.git iommu/vt-d: Avoid GFP_ATOMIC where it is not needed 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 Link: https://lore.kernel.org/r/20201030182630.5154-1-christophe.jaillet@wanadoo.fr Signed-off-by: Lu Baolu Link: https://lore.kernel.org/r/20201201013149.2466272-2-baolu.lu@linux.intel.com Signed-off-by: Will Deacon --- diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c index e27eb6f..770c537 100644 --- a/drivers/iommu/intel/iommu.c +++ b/drivers/iommu/intel/iommu.c @@ -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; }