Message ID | 20231128204938.1453583-12-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 12CA0C07E98 for <linux-mm@archiver.kernel.org>; Tue, 28 Nov 2023 20:50:12 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8A7CC6B035E; Tue, 28 Nov 2023 15:49:54 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 855DE6B035F; Tue, 28 Nov 2023 15:49:54 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 65BEB6B0361; Tue, 28 Nov 2023 15:49:54 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 52C7D6B035E for <linux-mm@kvack.org>; Tue, 28 Nov 2023 15:49:54 -0500 (EST) Received: from smtpin21.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 2E65EA03AA for <linux-mm@kvack.org>; Tue, 28 Nov 2023 20:49:54 +0000 (UTC) X-FDA: 81508554708.21.4F5B268 Received: from mail-yw1-f182.google.com (mail-yw1-f182.google.com [209.85.128.182]) by imf15.hostedemail.com (Postfix) with ESMTP id 6B3B8A0012 for <linux-mm@kvack.org>; Tue, 28 Nov 2023 20:49:52 +0000 (UTC) Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=soleen.com header.s=google header.b=lXKOIJ1t; dmarc=none; spf=pass (imf15.hostedemail.com: domain of pasha.tatashin@soleen.com designates 209.85.128.182 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=1701204592; 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=WwZxW20NTsAI6OtU2mg3WBn7dc7VhXurLb9lJcGaB3s=; b=IDA+d0adFqChIpCLSh/xNSswVlrJ7hOCHOKcoZ1b+vib80P++QqCnoCQ7dDnr7YBPyKfuo pp3j+yDQ9bwLCX+j1hjnN2aBkNWS+XphNztbVPjAkmD9h15G0TnP0uaT9nsSwuhxTBv/GN bgML6xbLqxeTdMfczyiRLZDxt30ONWs= ARC-Authentication-Results: i=1; imf15.hostedemail.com; dkim=pass header.d=soleen.com header.s=google header.b=lXKOIJ1t; dmarc=none; spf=pass (imf15.hostedemail.com: domain of pasha.tatashin@soleen.com designates 209.85.128.182 as permitted sender) smtp.mailfrom=pasha.tatashin@soleen.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1701204592; a=rsa-sha256; cv=none; b=uswtFspruHstzAO98QPV3YL2KE+VNZO1A0cO72pL9vFQ7EwsOp7La44tegwue0o3bfhzid w7Nog8eu5eH2ooyIWzE2LQJOvvkMRLyA+g+QO8pHbDjW48grbv6TMxE6IaTdjWf7TSQU5K NZQeODuixg/LYqf3VO2GEIZOf4mSqJg= Received: by mail-yw1-f182.google.com with SMTP id 00721157ae682-5d05ff42db0so27503557b3.2 for <linux-mm@kvack.org>; Tue, 28 Nov 2023 12:49:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=soleen.com; s=google; t=1701204591; x=1701809391; 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=WwZxW20NTsAI6OtU2mg3WBn7dc7VhXurLb9lJcGaB3s=; b=lXKOIJ1tvlFsqy4JXBOZTVEqXfQKyXLcJXHv222z4LDeL15X9gm4iNJjhi89zjrRyD hpv2D3WMDsKHNraoNfxuv8+AymYC+JOFTQmcsE3mVGmmhOka8A6xEkTfYidyUKt4pPSE xtx+s4Wsar0lVZP43q2K1wVAYGFrBVL2rAbK7oXO+LdLgR8VvJRHWmJEi+wLQ/AHJM7k gkJ99laZ4tQnGGq9eIKQyv+25kn4R+QvTaL1iKZ9ECibsX2Gj6mGNMPUnyfyAbZr4jUl +GMVxHPAp3i6jX6RVxQmH5/Bwo2bgRLchrIylFNoiNp/q7K4z3pPULo8BT97eOeDZrLN 50GA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701204591; x=1701809391; 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=WwZxW20NTsAI6OtU2mg3WBn7dc7VhXurLb9lJcGaB3s=; b=CUoHNLOBFvAswlpbAsky8F/dfYCSy/lbyNFQ5qI+TWCBVo3WqTQTPS7W8NQxzsbNmI I6iYUmDdvCNnk2j7wpN6tBGb1RjZgCY40WJlqOgUVML60wunDIfzQ/WxBHSCXSKAVZou NTmGfDYNtSOCEb09YTa4/Hh7WtCNXRHIzVgWuhJBxTQIMdBgzjicOpsBuQJNuGwnTNQL 3piMQNewl2UoR98JucK+ZgwdWJdPl3VfqGv8o3e1/At3+Tdrk7TuKW8fgGPaOr7wyt/4 ZI3LzPTpZ5lJ9bIwulVDUgNTo/GMkMAvHDyi/shsUc1uOUL6rHaZcEq4G0bJucPmJEtL 4nDw== X-Gm-Message-State: AOJu0YwvYkrHjLgskodYBSUeBZhO041nfyPN17Dg+qi/X8o6iPe+S7+j VeCcsEtbmkJ6lsCfmsffxYsGMQ== X-Google-Smtp-Source: AGHT+IHCcneC8xut0NvwO9Mjx/qxjTP4L7ixlY2hbUe9eNo80eBX8ekYQZcNVvvgdD6z0QrQuBV3MA== X-Received: by 2002:a0d:d409:0:b0:5cb:5171:ab07 with SMTP id w9-20020a0dd409000000b005cb5171ab07mr16139567ywd.12.1701204591541; Tue, 28 Nov 2023 12:49:51 -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.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Nov 2023 12:49:51 -0800 (PST) From: Pasha Tatashin <pasha.tatashin@soleen.com> 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 11/16] iommu/sun50i: use page allocation function provided by iommu-pages.h Date: Tue, 28 Nov 2023 20:49:33 +0000 Message-ID: <20231128204938.1453583-12-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 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 6B3B8A0012 X-Rspam-User: X-Rspamd-Server: rspam04 X-Stat-Signature: hfjj76xxkhpmxxhibcf1mwo7yrpd8g8e X-HE-Tag: 1701204592-438416 X-HE-Meta: U2FsdGVkX1/FYCbCo8YbDWrmKbv6fT3FCVvwQjuBDh4dzfx7xwGTfN/udjGhJTxvxFjOmWBNupF3RLZS2Yq3oS5Ro2T8OOw7AIfvXRcKFyRHtf3hr9CK1ZFYrRBMST9v58zlIGw1/wjLT1QJu3X914U0TOBItHCloFojY5030dDpdhOCrd7N7ohWTmWVUpihzSpSQhnrean34m3WfEolWs23XObIUM3ZOq8pLWbe6uLHzKgOYtd03KnZB3HFbJjMclGRJkyR8QIb0memtUJnYgK7a2EeW5J6MeKMTPdfVHsLCYHfa36Y1sjip7UYF4giERreyhUn0+ktYUS+keNmrROF7N3ZDK1aYiFzYeCB8DoEF995XoBwnL9JRQUvqWcs9MbUvcji4syhqDnC1HBmJpBDAelkTa5GGXn4td1A36kLWVuzfycHiU40BzvZyz/nSgp7QhXkHDv2GR0RApqW9blmYTroJXmHSubByOUCtVdyUfInyx6TYKInLdk8IDaWBZDpHP6zF5+OrH4oy7ghcF4nh37hSQGaCumw+rZcrcRzNK2d16EAmznoWZA609DQqWXlrLOPc44frH9184FAk+QMBNDjiqjlyn7tz4gBcF6YxmWki+7g4FZRLyKJTYAe7G4IpFdZoW5z5WojWzuw5gnCm3aCVkkiqFlDhRcF+gpEYQ0+lxXMNHSRK445sdWTjHw7DlCjtxoMv6DvA2/Vpcw4ZkGIa6ikAbDt0ut/QylpshuMOmctwRXeTXU/3ihN5X4n/bCvtj0OLMfcL67LVd+3iea3f6BmSydZgB1rIproom193BtT48+vWoU7yMsAbC8yV0dCiyyiGRHVkjJJOYyAhEXxCTg98zBnsHe1ytCaESZTiC212y8Ixr9ooYX1QzkusywGjcCiOGqt4nt0/wF0huzfHGRIbvYgX/9QXBjNgYDOszwRcw3HmgbS44vV2Ozvg9tyF2kljluIwb0 RiZQU1vH VdFfz/WNX+k4NlnzLq4uGnH6gh4VoeETq9CZCSBc0ouyblMOGot47eDSZnhlZ1s9AGGyF4l/FkPr5bwPBdZ5qXu/J+iS8XdTqu2f/tsA4aQOa4FPXrHEPL8S9Q/poOvZuuAQPLHBPjPYs+dTLhOSy51slmNg/WxsPRlhzwjwJZ1td4ssweoz5F6wxgPIBFhY+QmHx0d6hWm/lOz+1xvef8/FBa5/EmkrNxLSvqYk9RqvN/PP5PdVA9ALt+mU2ENCxeggFxEg4OpjpRMfqWWia3OJF9S40HxgOXReVWe7fdcXxp6pW4DR2dfM0pnBtOmkdJONhVfOLj4TrivZFr5Iuan3jdL9eQ/g6Y99KVx/5s/GZn2OywrdmgkqA+8tb2RhTmINj7lyGyLvDmlhBduyiB+lMF/uEJdhG8A8jgKX8npKEZrcAcX2SaTtZ7cALUMQ9Yplc 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);
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> --- drivers/iommu/sun50i-iommu.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)