Message ID | 20231226200205.562565-8-pasha.tatashin@soleen.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> 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 4306BC4706F for <linux-mm@archiver.kernel.org>; Tue, 26 Dec 2023 20:02:28 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C09D66B0080; Tue, 26 Dec 2023 15:02:17 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id B92216B0081; Tue, 26 Dec 2023 15:02:17 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9BC716B0082; Tue, 26 Dec 2023 15:02:17 -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 87A396B0080 for <linux-mm@kvack.org>; Tue, 26 Dec 2023 15:02:17 -0500 (EST) Received: from smtpin15.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 37F9F120618 for <linux-mm@kvack.org>; Tue, 26 Dec 2023 20:02:17 +0000 (UTC) X-FDA: 81610041114.15.07C37F6 Received: from mail-qv1-f53.google.com (mail-qv1-f53.google.com [209.85.219.53]) by imf07.hostedemail.com (Postfix) with ESMTP id 71BD240015 for <linux-mm@kvack.org>; Tue, 26 Dec 2023 20:02:15 +0000 (UTC) Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=soleen.com header.s=google header.b=VQEje7Jr; dmarc=none; spf=pass (imf07.hostedemail.com: domain of pasha.tatashin@soleen.com designates 209.85.219.53 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=1703620935; 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=WnHaCiJRfpPGl2Fxvk26Xz7yYvu7rKjQdjdVfjQamuM=; b=uv+EixrSLW4U7SXtRXAZsW+az1jBkB/ymrL5kSNDCxcA4OANqTbweHIRwVmMnJD7M951UB p5k4Sk8MPI74dlMCqLR89hBN4A3S/5ErPKbCIgrzOX54b/O2Q7adJCajI1Un2RMJWyXLSB lfqynyKfz0WpK+3rCQFPA9vWSeg1Xuo= ARC-Authentication-Results: i=1; imf07.hostedemail.com; dkim=pass header.d=soleen.com header.s=google header.b=VQEje7Jr; dmarc=none; spf=pass (imf07.hostedemail.com: domain of pasha.tatashin@soleen.com designates 209.85.219.53 as permitted sender) smtp.mailfrom=pasha.tatashin@soleen.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1703620935; a=rsa-sha256; cv=none; b=qfHLk6F14MgldJcBY7/V7rku5QTnjo40QHLOhWgDIrIbzuf7PSIUzLmhxCyJ8YiBVrAuAE CVYvnMqRIY7J3Z3tiFmAAW8alvQsCj0rzOWt2iR/h8aOpbxeRPPjZVns/teHNv31CZmIpx OX+UYaZJ8PYY4gaCAfLHb3WnESecGEg= Received: by mail-qv1-f53.google.com with SMTP id 6a1803df08f44-67f9f6163a1so23913046d6.1 for <linux-mm@kvack.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=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=WnHaCiJRfpPGl2Fxvk26Xz7yYvu7rKjQdjdVfjQamuM=; b=VQEje7JrTw96M/Ji7gtDYJGf5yCSUx21wCUFsSgaw89CG/xkevjiRJYMf94y7O9pqV N+q6keZbDu9qlRcaUaKM46XidMNQGCdDLtuo2ywN1HzOuo5kRBf1WYMXHVHNIwAI9HQt j9IPbAoWxrQdtO9BHchc1jfUfu8QrwpiXmQeZ7J07xjOP0O03B+lvXrp1+X5kF7tKWty pq/hw9UKUV0YGapLPu7/iRhtOeMW5kIFVYBnQlz6OFHjJDS+TIPSs9RYFhyy4EWc1f1Z Bz44PEhdZV+Qt+mIsmNFHz+fIvDxEpQ343k70W/7iqTm73iHmQwJ8Dd736cM4pOZsmw1 G/eg== 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=UMcJKD9SjYEYPd9SCWECFLagjkqGuYMOF5dBnKwlVXqhQSApq0gyrTs8PKrDemLu4J aARno10Ljeo0BTQ/AGk0I5LDmi3VXXz4FcGnN/LvPhEVDcXFkUCneU82rZBBW/Cn5BvM HAUPTowPSs3HMEOJACJW1IpDOUoouhFSThRQSbl//p0Bsc6RBGCqc277Jp17myqzVrSl k+zj42SVN2WDdg3GE+gIphzJkTb5AWcG4/7eFyrFmT4j6JbNBdUu4pbSy3V6RUDHCdWG YVPQo7xFxDHXuRHtrSeYrgeThs9Bhr+bD7x4I4mEBnvgjFxuw8CoMm19r+qVKJEXrySK LneA== X-Gm-Message-State: AOJu0YzIIslz30a9qxxc+i95bvVvl63Cl1OiocD9MMvJzKfUfV4HlokZ jfY9qdicW+XcmVY+YPAuTsoHlDbByeudVg== X-Google-Smtp-Source: AGHT+IEjSL92+xZ/bAtRl2Tju/DugZ1gVQzpypJBCuESKN0IWhI/QyhY0T30YGd/IZCCOkD5WPDVJg== 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> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspam-User: X-Stat-Signature: rcnsaqsicfpiefi8siguftib5fa4zewj X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 71BD240015 X-HE-Tag: 1703620935-521706 X-HE-Meta: U2FsdGVkX18B/SHmdXkCifmo5kyUNE7Fv9UxLaqie65wAd5YRRs2gPZZG4GGsJIx8U80T31Tp6+isaa7tZ/XGMugCDIweHP0J8uldEfFV+MXyMw2HTD9qFEXuCl5jReTekT8yL7zLEAcr+MupJdOK0Af7rf2V7qd6/JgFy08NcDvHgafntVl60sa3R9sdRFcX+w8YkH5LDqmH83ceo0J6RcWWvZL7ttMUdlLU4odo0UWwMRu3H4p3dbQL5+hek3G+LNIcZTy19oSW7uNVPQB1KaQpvn2mZjOd+snenyk0BNlD7VrJW5MMUETolVK8F8F4PxnAsyrcXYRm57JTekn1xi2QTt9yNGMcYGXUmRPQCsNR6DcAs0T20EMyUfyvDH5AzsEOxcpM08tgbecsr5gdVWZ3lSKrPKIIoBOCzvGNmzLSsrZfAZR0LSm4TQg3dzRLLBUHAxfpNR2zpcq14jewp5KPYkVXVFjyT1ltstgMc03hrhrxrjlNAG0559ziblKgYyG9m2/Y+C8uzR1tpLA2qUjyCINgzpWktckpQTCVqJW9IClas+/wmtVm1Mvho+YWp5oajuDyS4sEd1V0WBHkjsOkG8SwdliMzsc1c1QaNw5ysXkvhViw6wTAAMU7QG3gAnWY3bSxq0PVsX4iQFzdok7uTL+kCQZsEccVjsQP+7/B+qcDOwJdKb1UkZw8DPPCyiALMEUgcJAmUqx23RurYkuV2RBeCQAdcxzK/VW44gZMYMeLwAtlXHfZ6VbZTQ3bR2y5rOepB9JSXATF4mEwhwNZApLr6FvL2XX757ZUZB0oPC07hbZXZim5NNWDvW4LLg6kQ57S5Saev1fQx0KWCP3q4myFPkqB6kQfWs/5bijvjGR6zv8FG9kjpvuRPYqv0+cprQo/B+LTrF6GM7tQlaRx8DiO0GMWqhxrhjfvxd2vh6Wsb5lqbWUv5PGllLSBZSbFQQM0XQMyMVLraJ 2pzl9JQY m5gu/9xPwjPlGaE3q0yyRJWs+t7XpNr8nrfWRFCAPSMLynr5qGRAGzFHkACght+0Mu1vxhO1ZHnNPOBSzNHdbPA+eFJdluaSJMk8hmzNMGOQ7pbPOxxiqLPQQSD5JKhIXwiAjeejb7MyrFt9w49FlxlbykUxIeybo7JJG2y7aYtUHidQoZmy89AUZ6ijy/VMV68A151KTwB8SoRM3AyJN/Z+2npbyyz1mAvfTuxYHQ6xuqi04PRfYIVlsTvXeCfvvIbgwzxI6A7cDUACZ4A1mqVNs98uWiOUI0tu7MZLZO5LPcJjCE4rNKF9OfZjTA4PD3Nh1ZG+1PhRaRi9DxujccR1IpHcF5oI8H1TwBe+VJdT07uk0jXQDUcq454V7ZMXK+J6e1785iHPygEMEOGRP4VzEWgqIYJTrond/hqOb75fUJZ4e/4Db0/YYypW5CO9yCFciqhyTWa9EVZQQu+WpsV1Whw== 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: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
IOMMU memory observability
|
expand
|
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);