From patchwork Sat Feb 4 20:31:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe JAILLET X-Patchwork-Id: 52816 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1497477wrn; Sat, 4 Feb 2023 12:32:47 -0800 (PST) X-Google-Smtp-Source: AK7set+Vgmw4OpnDMm4WRTvoULtnXP/a3mbjk/psNGJXVq0HnrUHU0vkeY95TpVmZjnliihci4cF X-Received: by 2002:a17:903:41ca:b0:196:6b7d:e6eb with SMTP id u10-20020a17090341ca00b001966b7de6ebmr17534620ple.59.1675542767014; Sat, 04 Feb 2023 12:32:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675542767; cv=none; d=google.com; s=arc-20160816; b=osAyRzIWRx2IgN85qS4A0B02O+mNDRzNYPl+LMhfddO0md5F0TZ9Ox3FwbvxUVWLE2 nZeD3SIflg/lIQS2rOpacbTIIqZhfYfHKQ07FGw9jxRbQ1a39Ph+qEm11f522n3uK544 CzAFmqQwfQH8SNFYjtXh8aDn7diBVhmx7FHtwM3q9vriNGnq3U5FRFsoGVV8PTKS3IDN WMG4MajFpu6k9sHV/xSpQRimnqn8FSg9CIqcIK4kBZpzp8u9n3Bqai7ndaZRkaY4enWH YKFlsg0l7MWq+5JntunR0Z1y22lK6LBU3KzIM/jNzVioAVr/dH3d7SB1aEgVKERyxOR5 Sgqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=dP9g6fZNrfO4goSfK9K+RUN9vlXMtmQwIhCyCXCgHj4=; b=lJ6M8KB/IqoxF0rB99nP+pFw69qpCVrYUkX6BlAZzzeIT432JxKnssFjy/ohoS6C8H hdugxQiMUbIO7ABuJs271WKWOfjuKj/8Ei39uqqQT+Jk7f0BotcCr+Qh7YZ4FRMAcv1V 8NARjzrsPyL+RH6Tb+xZ+jMIpKPf9rPse+lg3PkRBYP+52mY1EmO+3xPfGQ7Tc3D9lwh 1FO26lvv5ywudXaniqrL3mXZdB2BATYO8AKKX6SoM9Rg8xOI/GPPzTycKyQgN9rAf1P2 iwTusXhtx/wfLTjcAmipM0Zxl2Dw/lc2YRSYfss8idyzuFzZlqZeqOFLYUydbZnxWobd VP7A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bs70-20020a632849000000b004e9f66e4f66si6978388pgb.230.2023.02.04.12.32.34; Sat, 04 Feb 2023 12:32:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229746AbjBDUcO (ORCPT + 99 others); Sat, 4 Feb 2023 15:32:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53442 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231987AbjBDUcN (ORCPT ); Sat, 4 Feb 2023 15:32:13 -0500 Received: from smtp.smtpout.orange.fr (smtp-15.smtpout.orange.fr [80.12.242.15]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E0FDB2B091 for ; Sat, 4 Feb 2023 12:32:08 -0800 (PST) Received: from pop-os.home ([86.243.2.178]) by smtp.orange.fr with ESMTPA id OPCRpn7kE4UotOPCRphKuG; Sat, 04 Feb 2023 21:32:06 +0100 X-ME-Helo: pop-os.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Sat, 04 Feb 2023 21:32:06 +0100 X-ME-IP: 86.243.2.178 From: Christophe JAILLET To: David Woodhouse , Lu Baolu , Joerg Roedel , Will Deacon , Robin Murphy Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET , iommu@lists.linux.dev Subject: [PATCH] iommu/intel: Do not use GFP_ATOMIC when not needed Date: Sat, 4 Feb 2023 21:31:45 +0100 Message-Id: X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1756933932152429080?= X-GMAIL-MSGID: =?utf-8?q?1756933932152429080?= 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 --- 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 6d01fa078c36..013ccc25ee4f 100644 --- a/drivers/iommu/intel/irq_remapping.c +++ b/drivers/iommu/intel/irq_remapping.c @@ -552,7 +552,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;