From patchwork Thu Nov 30 20:15:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pasha Tatashin X-Patchwork-Id: 172106 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp658694vqy; Thu, 30 Nov 2023 12:16:31 -0800 (PST) X-Google-Smtp-Source: AGHT+IHCe8vgYyZBmhJYCIJCpymaPyyBUIKQ7kuEQYRDVOTVhdgCmzUUEUG5pmBz5B3yn86fyccA X-Received: by 2002:a05:6a21:3116:b0:18b:8158:86ea with SMTP id yz22-20020a056a21311600b0018b815886eamr30013813pzb.10.1701375391476; Thu, 30 Nov 2023 12:16:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701375391; cv=none; d=google.com; s=arc-20160816; b=HoCb6Ha50Rwu+YhY10wvTWds20YuqfHZb/pfs2EcFqhDX+l9LrAsd1IEnMCFfVq7jm L2J8QxmI0elvgQJCQFV7jqwRWNCd6Jg+FAFLUha04EspweTnNJ2/NFzmRLdeZEdUh1A8 jWkxKYlp6g6GVt073J223ZRUNYaKBb6oqb5PIrmQWJAwzSBDGkRtc2xxlxSytLFiPR5D ua7Ug2rOHfdLoUP+agO3w82SU8hSxalolfcZdk74XsmTdf/yFw14qr99WxudKcOX0TI6 JFzJO3ptH/8+Um/B/rkHlEj+iWF+5l5OTPrYQ7pFAn2bb0X8GUNmHvvteaw9ygVRfhd/ KQPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=WwZxW20NTsAI6OtU2mg3WBn7dc7VhXurLb9lJcGaB3s=; fh=EWgL8IBvHPGC0Y7opUuF57pNES+TiFvURSlxmGDMOzg=; b=r4nXNdZXxRlewFSsHdKz/Ua6bIDbGzyaGZICBmHc2w4ADseMc01XYdM7RkWipB1Bmg grjk3ACkQbuP0qpjyP20U/R7NveQZ5N3FuYHkKBznPoqOI7m9Taxl7fGtvTMAeGhxvyB KllJZWq9LMtd6aTRyRspglLAmQQmNCuTY4WlLUG+8jibh/jtPq4OPjuIcEVir3ie8HBh TYgZefjFwnXA2YPtrj6h5mV4PjlL/WZpCDb8CDCh7DBwv+csWuaacG+9rFNa1K0mbqt3 7jw4LCX3CsEAaMIdzaon7GKH0hKcVfMJeugHh7ADTDO2G2Z/XyIclVAGKBT+OYWWICfw A8iA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@soleen.com header.s=google header.b=GL8qFp09; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id o21-20020a056a0015d500b006cde1cef718si1946555pfu.322.2023.11.30.12.16.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 12:16:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@soleen.com header.s=google header.b=GL8qFp09; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 450B2801B641; Thu, 30 Nov 2023 12:16:27 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376635AbjK3UP2 (ORCPT + 99 others); Thu, 30 Nov 2023 15:15:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50248 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1376669AbjK3UPJ (ORCPT ); Thu, 30 Nov 2023 15:15:09 -0500 Received: from mail-oi1-x233.google.com (mail-oi1-x233.google.com [IPv6:2607:f8b0:4864:20::233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8BB791990 for ; Thu, 30 Nov 2023 12:15:15 -0800 (PST) Received: by mail-oi1-x233.google.com with SMTP id 5614622812f47-3b5714439b3so789712b6e.3 for ; Thu, 30 Nov 2023 12:15:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=soleen.com; s=google; t=1701375314; x=1701980114; 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=WwZxW20NTsAI6OtU2mg3WBn7dc7VhXurLb9lJcGaB3s=; b=GL8qFp09V5Wiu+F/ho2KvnbNKcZG0DYvo4Pm20uRl/F7ijxpOsamWsN/VtKbUFiiSG tAwQGV1ZFXnCHLMaLHLpRT12zGCFjwHDAw7njRVhha6RFgXjzttE8llm4vGA+8BPDDJd hpPWVkqvX6auu2em1j3XvPtvqa4aMwJFN7dPoeBJgF1K6J1kp2pQIjpEfZfM6wVvBPyE 0FU4MzQZ24fdQwX8kwH9CGCET/zXKpOxFcXIq9crY4iS7fsacaXGOuV0i8Z/sJ1cSVgM /OaMlYtoeju/XakvbmQx3VJV/wtcb/4/owqh78jBvvLCqynv3cfNRZ7eiuVz0/0xKvp0 K8tA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701375314; x=1701980114; 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=L3x3L0/MeYg2FRHde79HYAggLamO6neMnerSS1HMWke8YWAAEWyvzQG0FE44hYK2bD vgvZMyPUsRQI73pcLjuaCHmN+tsDTP2P8/fSd1JWpXBXx7SuEG60QKrysSAiLYrs00DX +DMYvv7deeapvEiL3bcdMqiu+huJIfi2bJCLozBkw+pUegpsg3R8BI0geuvIoAgwPZeV 7xSW87Nz524mEB72jueLFy8FukwEMJTQJTNnELW7L4V4u7Yy3kQ7Y292+YSqO8SfbGlJ RZcetSACmTSBbzuTrA2HCS7F/0yCK/wDis9/ahUHLhd3uBhe1qmyVnQ7ca6beW03mX1Y 8kgg== X-Gm-Message-State: AOJu0YyAAGQhgqbbfsbiRgMd9QEFfO3IAtNFtURNwh+u1lCfB9wG9K3Z n6MZdjc2PpCh9R+W+NqWDgSlTQ== X-Received: by 2002:a05:6871:3281:b0:1fa:5890:7840 with SMTP id mp1-20020a056871328100b001fa58907840mr16958744oac.35.1701375314449; Thu, 30 Nov 2023 12:15: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 e1-20020a0cb441000000b0067a35608186sm795252qvf.28.2023.11.30.12.15.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 12:15: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 Subject: [PATCH v2 07/10] iommu/sun50i: use page allocation function provided by iommu-pages.h Date: Thu, 30 Nov 2023 20:15:01 +0000 Message-ID: <20231130201504.2322355-8-pasha.tatashin@soleen.com> X-Mailer: git-send-email 2.43.0.rc2.451.g8631bc7472-goog In-Reply-To: <20231130201504.2322355-1-pasha.tatashin@soleen.com> References: <20231130201504.2322355-1-pasha.tatashin@soleen.com> MIME-Version: 1.0 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Thu, 30 Nov 2023 12:16:27 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784021402352069209 X-GMAIL-MSGID: 1784021402352069209 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);