Message ID | 20231226200205.562565-8-pasha.tatashin@soleen.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-11670-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:6f82:b0:100:9c79:88ff with SMTP id tb2csp1073101dyb; Tue, 26 Dec 2023 12:06:13 -0800 (PST) X-Google-Smtp-Source: AGHT+IEl0Bcg7l5rNBmWKAhG0ppEDF0InZ54cFmAJaI6xVQL7oyX+tE0Jp3FZA/a3LQBoRMkf+oM X-Received: by 2002:a50:8d16:0:b0:553:dcc7:f797 with SMTP id s22-20020a508d16000000b00553dcc7f797mr3774766eds.56.1703621173631; Tue, 26 Dec 2023 12:06:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703621173; cv=none; d=google.com; s=arc-20160816; b=LhU2gIYmM9IF0p6pbkHMhGvKjCHg2J8RJPHwEY4cCm+kt1zye8sgmuisfsToC+YmVQ DIkVJmTS4hm8gBItJkjNnFJ1pXPDdZ1ekuHjHnrDy9G7vW250CoqOkaZCGczRO8CAWgM IsEE+N8p62WnUbYNd/dHmgSiQE8S1X8t1pRtMxrvkghbFTJ597FSkzMsMPBDCBTN7G1F 9U0wL9bAVO0O9BldbUvz3sf/+m0n5EExygMcfCBs1XfcbjIHcqnfcY6Du+AMuCjrxGy2 IJmSUrfZa2unnpE1ka//KixJwboExz9cknHsWzZJrehosyDrY+5KXtU/ALhaE4j71sDR HJ4w== 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-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-11670-ouuuleilei=gmail.com@vger.kernel.org" Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id 21-20020a508e15000000b0055469363fe7si4055182edw.370.2023.12.26.12.06.13 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Dec 2023 12:06:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-11670-ouuuleilei=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-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-11670-ouuuleilei=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 1685E1F22ABE for <ouuuleilei@gmail.com>; Tue, 26 Dec 2023 20:06:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 945B418E26; Tue, 26 Dec 2023 20:02:24 +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 <linux-kernel@vger.kernel.org>; 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 <linux-kernel@vger.kernel.org>; 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 <pasha.tatashin@soleen.com> 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: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1786376275757262944 X-GMAIL-MSGID: 1786376275757262944 |
Series |
IOMMU memory observability
|
|
Commit Message
Pasha Tatashin
Dec. 26, 2023, 8:02 p.m. UTC
Convert iommu/sun50i-iommu.c to use the new page allocation functions provided in iommu-pages.h. Signed-off-by: Pasha Tatashin <pasha.tatashin@soleen.com> Acked-by: David Rientjes <rientjes@google.com> --- 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 <linux/spinlock.h> #include <linux/types.h> +#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);