From patchwork Tue Nov 28 20:49:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pasha Tatashin X-Patchwork-Id: 13471791 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0B0D4C07E97 for ; Tue, 28 Nov 2023 20:50:07 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id DDD396B035C; Tue, 28 Nov 2023 15:49:52 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id D19766B035D; Tue, 28 Nov 2023 15:49:52 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AECD96B035E; Tue, 28 Nov 2023 15:49:52 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 9A3A26B035C for ; Tue, 28 Nov 2023 15:49:52 -0500 (EST) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 7833780358 for ; Tue, 28 Nov 2023 20:49:52 +0000 (UTC) X-FDA: 81508554624.05.AFF38F3 Received: from mail-qk1-f176.google.com (mail-qk1-f176.google.com [209.85.222.176]) by imf22.hostedemail.com (Postfix) with ESMTP id 7CEF0C0006 for ; Tue, 28 Nov 2023 20:49:50 +0000 (UTC) Authentication-Results: imf22.hostedemail.com; dkim=pass header.d=soleen.com header.s=google header.b=AkhZFfNz; dmarc=none; spf=pass (imf22.hostedemail.com: domain of pasha.tatashin@soleen.com designates 209.85.222.176 as permitted sender) smtp.mailfrom=pasha.tatashin@soleen.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1701204590; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=GuhRNW8EraGxCVOazJoq98oeC/940DRf0iOPJkOnyXY=; b=WVbBo+Nle36Mk1sdwHzGXEczaaaBaf/q+dZJ8e2oW1YUpuCFQN+O3qQIUeIV2YnFo2+NEH cT88SbDZFVRT2RH+xOUybhkSe2X7Vu3tIT4dnyleVTnr3HdLo4ayrgQqPK47CWvwmFaWEu stMNXuIIyl9yVT0QaIgye/X4xX0ca9w= ARC-Authentication-Results: i=1; imf22.hostedemail.com; dkim=pass header.d=soleen.com header.s=google header.b=AkhZFfNz; dmarc=none; spf=pass (imf22.hostedemail.com: domain of pasha.tatashin@soleen.com designates 209.85.222.176 as permitted sender) smtp.mailfrom=pasha.tatashin@soleen.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1701204590; a=rsa-sha256; cv=none; b=MCPeM4TS7bUnmj7t6ZHEu1q6pkLN/OZdSRp4qkajfju1/gojT4BXxid23Kq7GDeJ0uCgXh ne9iF+Yo8P8kM+2hUVH5HmnQXlwoukrJVUqMShwrtZ9FxOJqwMutAFqhWzj4greKPn9xz4 ZwA0+IVjcB20sSAlDYmv8o6vk5TJpo8= Received: by mail-qk1-f176.google.com with SMTP id af79cd13be357-77d66c7af31so15650485a.1 for ; Tue, 28 Nov 2023 12:49:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=soleen.com; s=google; t=1701204589; x=1701809389; darn=kvack.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=GuhRNW8EraGxCVOazJoq98oeC/940DRf0iOPJkOnyXY=; b=AkhZFfNzqPr5vrmyKNt4ivZsAUwO/X07CbXdk8ri02qLROC+AHc8G7/7MXONtSGOit KNg4m1xGzbX6Uv7QfZJtQVeqihBgawiX3t5nlcAkLoO2OmUfiH5hn9ADHqjuI5d3uJNJ Kciq5ZudpSFb/k+REe2pNSp1RsQpcIEk/xKNgsgKgLlM9AaGzp0LLdnlZu9ObCm3tn14 mMspnYAOqh3c9+UH6QLwQ2wuFJs1rljLYH2ZYLxv/JyZ3ZiAg9n9tXeCkLDpSw8AiO7Q BCWTtO+XoHQmY447jDPruoVfOZu/FpPn7sl82IZWijIXrY9aGW30JK5uPf1iXYc31yTu qtlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701204589; x=1701809389; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=GuhRNW8EraGxCVOazJoq98oeC/940DRf0iOPJkOnyXY=; b=sPf5DUGlfKwGA09lf5mhZO5dUW4jeNMHpzsxlt+VMdA7fP6wCTXpfcaRcTBj8P/63M 3zYRK1xakMKJEuUAL4qBImVXfFhpXOjPzm/GmcmPTDQJ5mm8pXZsMjrv0cHZspTbOQqJ LfltrxH8FCciJjNVwvzRp3gv8a+QwereZidYHyocbF3u3z1FuJrZ0X2WjjM1dsh1UmWa aWmnhKEnNbISpb7vTDvS6Tb6uin5qZgIgwkx2ZKzWYbolv4fnNmM2eblGGYq3Ltfmnts uMgnoes2bXsJhRFqakZ44y1/Ik7PEgCTR/OBoRDQPe/rCxeexYsty5z0lEvbo6sipLAo qvZA== X-Gm-Message-State: AOJu0YyB2xHoFCD6Mm/2npjLuICWDSN29rVThHgYS7PjAWyzkMwSszXI Bn9lALtljD+SmV3Bl1YMYv3JPQ== X-Google-Smtp-Source: AGHT+IGPu3upFAdCP6yNYmrLD/qlosIlP36YcCIt0RdR7fCBV7LNnnJ4icXgqHOsHyLuFzh/n11wOA== X-Received: by 2002:a05:6214:1c0b:b0:67a:4546:9895 with SMTP id u11-20020a0562141c0b00b0067a45469895mr14672496qvc.12.1701204589666; Tue, 28 Nov 2023 12:49:49 -0800 (PST) Received: from soleen.c.googlers.com.com (55.87.194.35.bc.googleusercontent.com. [35.194.87.55]) by smtp.gmail.com with ESMTPSA id d11-20020a0cfe8b000000b0067a56b6adfesm1056863qvs.71.2023.11.28.12.49.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Nov 2023 12:49:49 -0800 (PST) From: Pasha Tatashin To: akpm@linux-foundation.org, alex.williamson@redhat.com, alim.akhtar@samsung.com, alyssa@rosenzweig.io, asahi@lists.linux.dev, baolu.lu@linux.intel.com, bhelgaas@google.com, cgroups@vger.kernel.org, corbet@lwn.net, david@redhat.com, dwmw2@infradead.org, hannes@cmpxchg.org, heiko@sntech.de, iommu@lists.linux.dev, jasowang@redhat.com, jernej.skrabec@gmail.com, jgg@ziepe.ca, jonathanh@nvidia.com, joro@8bytes.org, kevin.tian@intel.com, krzysztof.kozlowski@linaro.org, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-rockchip@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-sunxi@lists.linux.dev, linux-tegra@vger.kernel.org, lizefan.x@bytedance.com, marcan@marcan.st, mhiramat@kernel.org, mst@redhat.com, m.szyprowski@samsung.com, netdev@vger.kernel.org, pasha.tatashin@soleen.com, paulmck@kernel.org, rdunlap@infradead.org, robin.murphy@arm.com, samuel@sholland.org, suravee.suthikulpanit@amd.com, sven@svenpeter.dev, thierry.reding@gmail.com, tj@kernel.org, tomas.mudrunka@gmail.com, vdumpa@nvidia.com, virtualization@lists.linux.dev, wens@csie.org, will@kernel.org, yu-cheng.yu@intel.com Subject: [PATCH 09/16] iommu/iommufd: use page allocation function provided by iommu-pages.h Date: Tue, 28 Nov 2023 20:49:31 +0000 Message-ID: <20231128204938.1453583-10-pasha.tatashin@soleen.com> X-Mailer: git-send-email 2.43.0.rc2.451.g8631bc7472-goog In-Reply-To: <20231128204938.1453583-1-pasha.tatashin@soleen.com> References: <20231128204938.1453583-1-pasha.tatashin@soleen.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: 7CEF0C0006 X-Rspam-User: X-Rspamd-Server: rspam04 X-Stat-Signature: swrsm3curxqocohmwfs66goi84cbtesz X-HE-Tag: 1701204590-778696 X-HE-Meta: U2FsdGVkX19+YIWz7sk/SUFpmRSjiJ/uJV8xKGaJw04n02uuPKN+rnWCAbOkIYtpTp3pFhec/i7gitpxje78s2BlhgQwpNL07ok87NtICcEOhMjKNbRqo1H6eSNBD7Z+7w5uVTd2q5lUzZEM/fwl25+aNcgXZBAkH9hJpCy694tSK2kza/z9szuA6bnP9fbqbgModC9XM2/Dd0BRTcxEK2W6C0WiDk/f1SK7ycFgAl3TIgdpa11mZl75LHper5KYD0thn5e9+/qZq4T5N9GqZEfQT6Y3pPwX8F61vXW5IQyl9t65TJV35OovrprnNAHWimJUViWTEVVzH/Kiq1/UXKRCmHtV6SyErYHIfSGvnU7bt0lrLXvpug39CbYr0BFY59+Xr/f13gsT5ZlVzYo3JQdSIkC+wGENAL3u1V1Wg236F62/M859w8ZLknlit2UNDaMrWB1LAheSPJuAB8QJyMivrMyW7Jjnz0Gm5lK9D/aNR08e/6TvSj9jM39TcyQgFpgP2rh6fskDvgtoFS7j8ej/gMZFH7Q7FKmecGi4b14A5zvkWfITFK4PgkvngvaTUcPzvM2sdlDGhdcxeufCY5JtwMhDdIsuWcEenKdHOy9mkb0UJ6rNbTI+PNZQWxeCQvdR5Ih4ZHCG4HAEieSRS3bWxVXYM9Y4tBbF27r5uc/RuGoEp78T2lK/1ss53+DeGmXkHuKiBQB9KnqEiNPNu1+IZYkBmMBpEdUss18OczPlh2iLvfN6b6ojv1NmRIImMPJfc6Zi1DbFGeWBawhda2sjcA704Not1IsoK5QpOVh9osJIKDuRaYPyYPr/1n7qgtt5D/5eAA5trVkKplM9QX+mdxojmERh7SHC5FB519KutfhslrrQdAiBpsj0kvo4HT9BpcI7Ggf3XSxgzlubqltcadD5pFB9Ulb2xaiSj0E5HHMvoJ2scIQEB1aZCXkvKt3eaACKCstZ9ek8E0r JSz7kFhV xROCQWvSGCKgRysH9KhYfKu+EzQzGvN6sXapa/PM34kwrCKF+kLcFqkx87E50YkO300EMfBQapT/u6pptSjRiIYuTIRd2ggio7tNpFL8z/6dw2PlF16y9/EFiZk98W68Q/5cSf3SKeJ1a9pOgOvottmB7lwb4fwcG+7uIi/5liB0kiw1RZjo0OnsB+9DarousLstHSjGj10yIFmzJtXw2Uyhc4ff/3t2/cYxG+JtMQn78ko5Ad4IhVmVIBrIrcOXPkWUcDjrzuzjmI8mw4LLmO+8NOmhjNfLbxxI3jeT24etpQJtXGVURnR2U4BY5swWY+CLtVEkqahsC02x1RHdw0+Z5c+UwTBhsScssrVwfYE3qGFbZFeV4k7xRLUgENH+esH/BjnGRWKdKlwIZ2XjKeRvbvipFW83lp1VYwxddtUJz+XQCHKNyZ2g7jI+o0mpqn4fF X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Convert iommu/iommufd/* files to use the new page allocation functions provided in iommu-pages.h. Signed-off-by: Pasha Tatashin --- drivers/iommu/iommufd/iova_bitmap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iommu/iommufd/iova_bitmap.c b/drivers/iommu/iommufd/iova_bitmap.c index 0a92c9eeaf7f..6b8575b93f17 100644 --- a/drivers/iommu/iommufd/iova_bitmap.c +++ b/drivers/iommu/iommufd/iova_bitmap.c @@ -253,7 +253,7 @@ struct iova_bitmap *iova_bitmap_alloc(unsigned long iova, size_t length, bitmap->iova = iova; bitmap->length = length; mapped->iova = iova; - mapped->pages = (struct page **)__get_free_page(GFP_KERNEL); + mapped->pages = iommu_alloc_page(GFP_KERNEL); if (!mapped->pages) { rc = -ENOMEM; goto err; @@ -284,7 +284,7 @@ void iova_bitmap_free(struct iova_bitmap *bitmap) iova_bitmap_put(bitmap); if (mapped->pages) { - free_page((unsigned long)mapped->pages); + iommu_free_page(mapped->pages); mapped->pages = NULL; }