Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp2998528rdb; Tue, 26 Dec 2023 12:04:59 -0800 (PST) X-Google-Smtp-Source: AGHT+IEamQTkSLf2f355hSK/Ih60qtlOpu14taPOS9p7rqapRpHGUm1RBueqhJcAOaOx19Hi9Zu/ X-Received: by 2002:a50:d60e:0:b0:555:2504:ab91 with SMTP id x14-20020a50d60e000000b005552504ab91mr615830edi.44.1703621098925; Tue, 26 Dec 2023 12:04:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703621098; cv=none; d=google.com; s=arc-20160816; b=aiOIvuLrku/brcbOZGl9YUS9v7yEv4I522uLveV6+nc6ABTn/dQMkV0+dUJC2JD4KN 9+zm6kxRrBUE7Xf7MVARmYtUcVUl8XmS6D67iRcmlWt5UfkvvNMD+j5R8kQhUqNHso0G iF/ILcWjUxavB1pbfT80dfSNecQYqW8pVhYEIJRqvq/XUZ9f0hSLkhBBRpY4GT3RlxkT wUmIjsC8nwVP3BK5lENppYUTqCls4qvggpM+G413V7zH1UcEHaa71//eNE5SRhlRnBj2 +hNnNXmI5hWLlJtGE97Ixss/VPlX46q3veDV2p6srDHoKs3I81FJ+7KdMfEzYgZxLQU4 mZPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:to:from:dkim-signature; bh=WnHaCiJRfpPGl2Fxvk26Xz7yYvu7rKjQdjdVfjQamuM=; fh=lUkiT048LCyG2kYH3uS9GPNyu6fkGQdYtFXGdyQ4NZk=; b=tDHdL7AeoOVBTjTyw/x6sG5d2hNcjayptHseuxknTjcLv3gLBzPIdww1MlGIT/3Lt9 X+hR6YIZ/o4e6ZlGio4LA4kPKRT4udj2B8FxY1T9c1GE6jXg8AK9WHmaZDhqx4Opo8Yy ZbxZXAjZeXyRp13YkC9f9aeIhKZab2b7Dlk8ENpsPJMxnQm9nFD5nmO5aHiOq3ZPQhNp BJctMFF+qWSAz2eYZpy4nOfkOuW29y3NKaXjQYQbijOBhYYQT6VUtmSS1nG3r0fb+3oJ zkeR0zXpanKkybwBZDEnrrtchY8ZltcuxW/zKIWxkJqu/mImDAmz8NxUDHPCP5eq4BG8 yC2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@soleen.com header.s=google header.b="Mh0HGI8/"; spf=pass (google.com: domain of linux-kernel+bounces-11670-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-11670-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id dc20-20020a056402311400b00554661b09b2si4184343edb.502.2023.12.26.12.04.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Dec 2023 12:04:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-11670-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@soleen.com header.s=google header.b="Mh0HGI8/"; spf=pass (google.com: domain of linux-kernel+bounces-11670-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-11670-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id A7B0C1F21990 for ; Tue, 26 Dec 2023 20:04:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AA4EC16416; Tue, 26 Dec 2023 20:02:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=soleen.com header.i=@soleen.com header.b="Mh0HGI8/" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-qv1-f50.google.com (mail-qv1-f50.google.com [209.85.219.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 261FE23C6 for ; Tue, 26 Dec 2023 20:02:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=soleen.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=soleen.com Received: by mail-qv1-f50.google.com with SMTP id 6a1803df08f44-67f6729a57fso44152726d6.1 for ; Tue, 26 Dec 2023 12:02:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=soleen.com; s=google; t=1703620934; x=1704225734; darn=vger.kernel.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=WnHaCiJRfpPGl2Fxvk26Xz7yYvu7rKjQdjdVfjQamuM=; b=Mh0HGI8/n3SxesCSYlYs3yXUUaCOBikXNgoC8gCUbQnMySjGnAlu/5MmF/gCk2C9cA HwN0DnkTWcMS0qbtv5eEr8wK5FbjiQXia8IWukBHqdsQZEUG6gh1AJVcs42COFvdLrC7 1V/l/1TEgGItcx52FZeFTyiFfa76K4954F0z2PUkUxZN4u7HueCSJLT3B9MBJtqElK1m 9sePuC1OWDaRvP7B23JBUq6mksOf6mQk2XQFRqvJUTFnIWlC/BviTXlc/31J1K1p/k+m StPnHSwGxqPBzLamr56zNWtnT6/o9QYaRucnQfkfIuWoOZXM8O1fO7zqaZuhCYcBRSKo hgHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703620934; x=1704225734; 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=WnHaCiJRfpPGl2Fxvk26Xz7yYvu7rKjQdjdVfjQamuM=; b=kJbwLVYnd5uNKsgS8LVX1668PsGkO0a7lFu6XX9+IWnUYSCP70jrw8AWkoGPEHGq21 InAZYypgrwQD/aUB/EJfGcaLkO1pK0wa/xUG4jhaIio6E3eJmQcSE7GcXiaNNnveiAcR 5JM2Ct1dmzdRge5QsVapxgUpk+5ei2Z8iqnP4aqVjsfGD8pFT7cINzO0Jm7AuB0Xr7WP 1XpEIY1hesgsFLZLdkVyPGVOQbq6xtWU8fy4Ou/fa7VXYHaJfnJSdHV28DvJhUrtgeLm zMqvlAwX73vc4ifOIFEQwNSYSXuggJIfaEZ3Ct2ysQ2rlO7lpQ/eXyBvYXywJoNaiawi T1Gw== X-Gm-Message-State: AOJu0Yx8V8EZedTE9C56GLLZfURNzXerccRQouJaaYMvLL1Kd/svqYci mosSUZRZp0bP0TR+1GNV+9EZc283JF9K8Q== X-Received: by 2002:a05:6214:2a85:b0:67f:67de:5d32 with SMTP id jr5-20020a0562142a8500b0067f67de5d32mr12181917qvb.41.1703620934647; Tue, 26 Dec 2023 12:02:14 -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 t5-20020a0cf985000000b0067f696f412esm4894539qvn.112.2023.12.26.12.02.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Dec 2023 12:02:14 -0800 (PST) From: Pasha Tatashin To: akpm@linux-foundation.org, 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, jernej.skrabec@gmail.com, jonathanh@nvidia.com, joro@8bytes.org, krzysztof.kozlowski@linaro.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, m.szyprowski@samsung.com, 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, wens@csie.org, will@kernel.org, yu-cheng.yu@intel.com, rientjes@google.com Subject: [PATCH v3 07/10] iommu/sun50i: use page allocation function provided by iommu-pages.h Date: Tue, 26 Dec 2023 20:02:02 +0000 Message-ID: <20231226200205.562565-8-pasha.tatashin@soleen.com> X-Mailer: git-send-email 2.43.0.472.g3155946c3a-goog In-Reply-To: <20231226200205.562565-1-pasha.tatashin@soleen.com> References: <20231226200205.562565-1-pasha.tatashin@soleen.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Convert iommu/sun50i-iommu.c to use the new page allocation functions provided in iommu-pages.h. Signed-off-by: Pasha Tatashin Acked-by: David Rientjes --- drivers/iommu/sun50i-iommu.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/iommu/sun50i-iommu.c b/drivers/iommu/sun50i-iommu.c index 41484a5a399b..172ddb717eb5 100644 --- a/drivers/iommu/sun50i-iommu.c +++ b/drivers/iommu/sun50i-iommu.c @@ -26,6 +26,8 @@ #include #include +#include "iommu-pages.h" + #define IOMMU_RESET_REG 0x010 #define IOMMU_RESET_RELEASE_ALL 0xffffffff #define IOMMU_ENABLE_REG 0x020 @@ -679,8 +681,7 @@ sun50i_iommu_domain_alloc_paging(struct device *dev) if (!sun50i_domain) return NULL; - sun50i_domain->dt = (u32 *)__get_free_pages(GFP_KERNEL | __GFP_ZERO, - get_order(DT_SIZE)); + sun50i_domain->dt = iommu_alloc_pages(GFP_KERNEL, get_order(DT_SIZE)); if (!sun50i_domain->dt) goto err_free_domain; @@ -702,7 +703,7 @@ static void sun50i_iommu_domain_free(struct iommu_domain *domain) { struct sun50i_iommu_domain *sun50i_domain = to_sun50i_domain(domain); - free_pages((unsigned long)sun50i_domain->dt, get_order(DT_SIZE)); + iommu_free_pages(sun50i_domain->dt, get_order(DT_SIZE)); sun50i_domain->dt = NULL; kfree(sun50i_domain); -- 2.43.0.472.g3155946c3a-goog