From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BA857648 for ; Thu, 13 Apr 2023 04:06:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1681358816; x=1712894816; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=KLcSzST6hDd+fcr/F74YMXpjYh9sQavSmsQ3e9U8YPk=; b=ZbRwQOT/HquxKZ9j9gqUh6VSZSFlhmmv/xCzkdULzYWlEcr4Kp48Oj5g Owm9ZHEmkVz6uNwmKp7r/7NP6aDuozzHGEjSWDmJmP032c30w1xHb3ncX cujQlOuR8h9WwZoDakPGu2HNjp1DaNhnuTVn4czrz/QQkv14WarCZ4bX/ XMsHmEqfL8yJgOhlR5p7bdgZdgfpw4FlCNUnBKn3H51NvdrsCmB7ZvTmM eTQ1HmBKPYjRRqy87S5CyGP0qKx45qZ/MDxRpVv+RUU4FkSpRxMA25lNN GCb/kjj2WYS1ncj/0uiTW8nDhampyOokzgaFq5PL74Ro5Ue62G65wojES A==; X-IronPort-AV: E=McAfee;i="6600,9927,10678"; a="332786578" X-IronPort-AV: E=Sophos;i="5.98,339,1673942400"; d="scan'208";a="332786578" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Apr 2023 21:06:56 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10678"; a="935361017" X-IronPort-AV: E=Sophos;i="5.98,339,1673942400"; d="scan'208";a="935361017" Received: from allen-box.sh.intel.com ([10.239.159.127]) by fmsmga006.fm.intel.com with ESMTP; 12 Apr 2023 21:06:54 -0700 From: Lu Baolu To: Joerg Roedel Cc: Tina Zhang , Jacob Pan , Christophe JAILLET , iommu@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH v2 07/17] iommu/vt-d: Do not use GFP_ATOMIC when not needed Date: Thu, 13 Apr 2023 12:06:35 +0800 Message-Id: <20230413040645.46157-8-baolu.lu@linux.intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230413040645.46157-1-baolu.lu@linux.intel.com> References: <20230413040645.46157-1-baolu.lu@linux.intel.com> Precedence: bulk X-Mailing-List: iommu@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Christophe JAILLET There is no need to use GFP_ATOMIC here. GFP_KERNEL is already used for some other memory allocations just a few lines above. Commit e3a981d61d15 ("iommu/vt-d: Convert allocations to GFP_KERNEL") has changed the other memory allocation flags. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/e2a8a1019ffc8a86b4b4ed93def3623f60581274.1675542576.git.christophe.jaillet@wanadoo.fr Signed-off-by: Lu Baolu --- drivers/iommu/intel/irq_remapping.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/intel/irq_remapping.c b/drivers/iommu/intel/irq_remapping.c index df9e261af0b5..a1b987335b31 100644 --- a/drivers/iommu/intel/irq_remapping.c +++ b/drivers/iommu/intel/irq_remapping.c @@ -548,7 +548,7 @@ static int intel_setup_irq_remapping(struct intel_iommu *iommu) goto out_free_table; } - bitmap = bitmap_zalloc(INTR_REMAP_TABLE_ENTRIES, GFP_ATOMIC); + bitmap = bitmap_zalloc(INTR_REMAP_TABLE_ENTRIES, GFP_KERNEL); if (bitmap == NULL) { pr_err("IR%d: failed to allocate bitmap\n", iommu->seq_id); goto out_free_pages; -- 2.34.1