Message ID | 20240413002522.1101315-9-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 3B530C4345F for <linux-mm@archiver.kernel.org>; Sat, 13 Apr 2024 00:25:48 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A691D6B009C; Fri, 12 Apr 2024 20:25:36 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A0BBB6B009E; Fri, 12 Apr 2024 20:25:36 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 838E66B009F; Fri, 12 Apr 2024 20:25:36 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 638806B009C for <linux-mm@kvack.org>; Fri, 12 Apr 2024 20:25:36 -0400 (EDT) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 319A6A1DC6 for <linux-mm@kvack.org>; Sat, 13 Apr 2024 00:25:36 +0000 (UTC) X-FDA: 82002615072.05.7239335 Received: from mail-qk1-f171.google.com (mail-qk1-f171.google.com [209.85.222.171]) by imf28.hostedemail.com (Postfix) with ESMTP id 33FFCC000C for <linux-mm@kvack.org>; Sat, 13 Apr 2024 00:25:34 +0000 (UTC) Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=soleen-com.20230601.gappssmtp.com header.s=20230601 header.b=tlzG9ILN; spf=pass (imf28.hostedemail.com: domain of pasha.tatashin@soleen.com designates 209.85.222.171 as permitted sender) smtp.mailfrom=pasha.tatashin@soleen.com; dmarc=pass (policy=none) header.from=soleen.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1712967934; 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=MO45TG6xfzZsYhTVPnL09wSWtApUT5YGrrbgII3maTY=; b=IFvWOzwpOxnL6ilBRU+Ff5GnoThcIhDt8chs/mmkfmXn9jYJ+IdHoqWqd5eIqm6oqhsSD+ h11G9nZ4Q0HLz0umq3XCqYWsFtGnPlbOjlNszBRtxcx/o6OGUzIRmAiTDv9i4hs7j6sq7V ee7BeeFwmw27PPSKqOL6hdOSt2UldyY= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1712967934; a=rsa-sha256; cv=none; b=310vxPd7bZyR/iAGApGIW5sQYOWhpqdJDP2EBqvY7iJZLBts0KIFkdFthWT+P2tEih554M 1BxlSgmDvBxiqInSp4KIkCxLV5bo6OyEdH4CKlgVC87J1430oEZ3v6tesWR+oc+21T3DlI 2OL7/U8dCo3XwxOOifzmyuwQ56mxxnw= ARC-Authentication-Results: i=1; imf28.hostedemail.com; dkim=pass header.d=soleen-com.20230601.gappssmtp.com header.s=20230601 header.b=tlzG9ILN; spf=pass (imf28.hostedemail.com: domain of pasha.tatashin@soleen.com designates 209.85.222.171 as permitted sender) smtp.mailfrom=pasha.tatashin@soleen.com; dmarc=pass (policy=none) header.from=soleen.com Received: by mail-qk1-f171.google.com with SMTP id af79cd13be357-78d723c0d9fso92613285a.1 for <linux-mm@kvack.org>; Fri, 12 Apr 2024 17:25:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=soleen-com.20230601.gappssmtp.com; s=20230601; t=1712967933; x=1713572733; 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=MO45TG6xfzZsYhTVPnL09wSWtApUT5YGrrbgII3maTY=; b=tlzG9ILNpun847s1YGhbKT3SfXmOVVZh3qUn3dGZ00wT+vRAK3FXjz6224d0oeYH0H CCBXejunYkmC3ukJSKDsptYW9rVjWBMU3UaBSr0OSp93UJhiG0U7kTLwd8hBhnu4vUC5 a63g4hbiH6tkHg2LSgce7Kw0lbKyxAIYrcVIzysPSGw9BhGJvflWBgyke4Q26KS+uRhR Fm4034TW3INDyxilNZDbUWTSH2DI/cgla9JouLq/lRVCk3XUsXZY+x1PNKqBGNSPNvZq R3mt0Okzucw0GBmvWKJ837d3750oN1BZwAXzlkXw1RJJMHcOd/RJUscQXe39lqkhYvyy yV2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712967933; x=1713572733; 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=MO45TG6xfzZsYhTVPnL09wSWtApUT5YGrrbgII3maTY=; b=A6EZvIwkisc/owZ/mb0iDqa+5L53NRc1UUB1/Kldgv1GNhQSyMKRwR6Do6Uw8j+nDn ndZmCWeRosa2ZNFLJURET/cn/06usx+hXqijGwZJvbywVaCp+rjVLSzhvnif0ii3zHtJ ELbMHXEGmr2zBKu4MHvNzGXUw2ZRwckJLIKsZXUN0+V5SNIPJNGoB83gROFpyxnVymXX 2xRuuI2QDjM9byVAAyFQt5O2Ix+9t+L4eKkO1qfGmREq4abluCNxCz1HYVNt6jvoM7gg pTbrIwIjE7cmUXKXKX4AEo/PDDDLbzbJcAdP0+ChGbQrTI6mlE8eK2O45bS/hXx9THZF pr2w== X-Forwarded-Encrypted: i=1; AJvYcCX0n0niXx/jtOGa0V0wvpNxWPmR6D0JhcXalsoWXeEn7Yg7hAS3WWrsCkF5yLkGcEGa+7hfbg1M6W0UXxaFQML8SKU= X-Gm-Message-State: AOJu0Yw+a+vwYE8O0h8siEOkTtAbV4Ey4y9QiPKSw2g3xCF1G5v52vka rV0pCH9hovJRAHZsbcJasQ5lRpzPZs0gcDwjIo4zcRB4PS7BKhEPZb/QzGlQPbA= X-Google-Smtp-Source: AGHT+IEXUm4h5HemGXduoWJF1eYDhRYKVLtFqnvpNR6ns26vxx0/EdOeXta2X/OaQb67WRloCqHbfw== X-Received: by 2002:a37:e306:0:b0:78e:c0f7:54fb with SMTP id y6-20020a37e306000000b0078ec0f754fbmr4866171qki.50.1712967933251; Fri, 12 Apr 2024 17:25:33 -0700 (PDT) Received: from soleen.c.googlers.com.com (128.174.85.34.bc.googleusercontent.com. [34.85.174.128]) by smtp.gmail.com with ESMTPSA id wl25-20020a05620a57d900b0078d5fece9a6sm3053490qkn.101.2024.04.12.17.25.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Apr 2024 17:25:32 -0700 (PDT) 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, bagasdotme@gmail.com, mkoutny@suse.com Subject: [PATCH v6 08/11] iommu/sun50i: use page allocation function provided by iommu-pages.h Date: Sat, 13 Apr 2024 00:25:19 +0000 Message-ID: <20240413002522.1101315-9-pasha.tatashin@soleen.com> X-Mailer: git-send-email 2.44.0.683.g7961c838ac-goog In-Reply-To: <20240413002522.1101315-1-pasha.tatashin@soleen.com> References: <20240413002522.1101315-1-pasha.tatashin@soleen.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 33FFCC000C X-Rspam-User: X-Rspamd-Server: rspam11 X-Stat-Signature: y7ma6uhp49urbgc4uuume5hw55j8q1ou X-HE-Tag: 1712967934-674391 X-HE-Meta: U2FsdGVkX1/sRgyO6lUazFou+kq7TXRUyhIqbNwi9veL907Psb3MnpWWbV9QKK+oZJRA7JnSTvFs/WdbKKLpLZUZIsSnlPjeEhNeLbTFpg9caIKJ2/gO2vlVezC4keVEJmKLO9ekNWDB87EFmUVAidz7e1jqiRlIqMSuqzBXM+NrM5efvM2d3Tlg9k5Sj+V9NT8Q4LhKZE+df38QuXX9omtE1Inbpy3vjZJt6QnVt5BOLFI+CEMs2wQsH7UFPXpFecGEeti6l2j9j5nn3s0UXtHzSgivIJZdJ2HfLhUYR0k+BuCBOPvYTg2tn5S60jX7AtDEZJWXM74DFjLJKBKPQsjB/q8JzuZCpAGvp6aLGyp+gyOuwJ41kW3TPcV3P1yOSEf41nxsrvdT68pBp65PeHGInA3rCmbYkhbb6xPNqYUPq9MlIokDTZGSlsaAyJ0NZnAe2+gJ8xFcNJO4oP0dqwGG1vZOSE3WdaX8ECIfYM+0pK8OIHmUWmmQ0K5QjoCZW9TskpsGzxBcXYB/+CYmoH9VQN6quIVjnoOyf7JFihfk7NzgQ/8Bn5IzhOXArR5mw4i47KuXHJC4LmkdK7Xn8SReOj7eBOoT2e4vN+W2tV9FgVhPNrCRyGWw/H4oXdlvUJiG7fqR94rR2hUb9Ei7ggk1H3w5Q61Z0I0nF2gHVsrk7J0JVT5qjn0IlzxMMZi8kmZN7WZxkh8k+Ub/alz2rbP5Ss5chq11SZEMu1oq6gS0jBrvhrVxu9n8yvUq50kId+7bgWOiPVcAvhLDd/8cUHCXgHDbVUyD0bKP22KK8+bLzm+BUbIPAuSPfIE0T0cgcZGQoCcCj9+NKtedG0pDdWJ41K5ef2UtjAfWIJrRN711xAJHPSkhdhfQscUZoZdVe7wqAST8Zr6YvtTA2HH84DWgg1JalaKEtLQRvd2FSRhUyfaOHxtw32bIm1k4eN4cxKivDv9pmfPddzhzZoU gLrS7GtT jhUsJK52UAvFj8l7QcsawT8knHCr4T1/eRsDwXYG5cgiDebrBaR2bbFEm4nKDNobpeLWdR/4F+eIhJRGuR++fIPtZfDw9Ru7vJLXE4BDeqqxTPFn87KF9uETbspppUYq9R0r/69dWtUiNrz7cLrQSlRzugb/NyfsGxMN/iZLCQdvQkhUC4+q1K5jY8QhHwnOtuCLHyKjbhzcFcfdK/w+BVyLHWRC7BAoIYKIyGe7RCLtyHa00NE2V65sTYJsnQqiyuEmDb0H6MHCegTZzVd9IcNuU/d8Lrz5IPfOxDOqZ0eD10ifbgF/tgc/PF7ZcXAMv1dkdRx7BnLlKu8ugCAWLFngcSDKpD9e4Exnv/zxe3dRXaZ2/17XpjBnnsYf+j1ZCdtICO/ji9fmNwJmMYo9XnyJVHslJpCs0jon0shxxbMcMS2sTk6LECChLAkdTa0oXo4MqgvJPb2lUWwcwce25KOa8zafX+OEt0EP1qaMhjqDOIAsrn6kzbgTlmiJAytH/AAI6zuCW18V8kMii24VP1LpDt8leej+ZQc/BF9lrzwsuooz9+3aSIjh24KdtNkeIXu3w 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 decd52cba998..c519b991749d 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);