Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp4139574rdh; Tue, 28 Nov 2023 13:00:24 -0800 (PST) X-Google-Smtp-Source: AGHT+IHnZTm6mVbw0B8uFpkHCxpZB9bDfwhB3/JmWKWTFSd+P/ZdXoPm72KDropU9xO+YH6NB3NJ X-Received: by 2002:a17:903:110d:b0:1cc:548d:4252 with SMTP id n13-20020a170903110d00b001cc548d4252mr22162728plh.57.1701205224140; Tue, 28 Nov 2023 13:00:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701205224; cv=none; d=google.com; s=arc-20160816; b=BkV7kXaNfia0QFD2iJTDFNQoQGjk2HJJ+zv+c2BKFmSYShooinhJZQeL295vszpteN CDlWiSfAToAJYY7EhQmX6TPzLmtsh/MTHXwoXAy7z0DSREMC5Wdqxsg2v0iEo8ucmJzK si4oMUHYO8ltZWBcFdHG18McqlCWPPoPwiaMU98QNcxs4xRhBBUIF3FlU9aNsrK1MNvd c+aWd3huIfcbZb/W5PfdZ2neivAwIlVcSxEVe0MTO2C4htsqCcr8dO1oO4LhaRDeKR1i FeyH6z7rH4q0BOGzRSwaYKozdGHMx2HVTxf9IlSKufF8hwYRfZwp9bFjcChstP17C9V4 NpBA== 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=z7CihAYYs+frw4g3uL4utEDJXxOOJDcFFsLsywo+fzs=; b=lXlVykXah0jw9DzwwTnNtgJc0GY3iwDhzA6syeU5TGbQD/JFPkAluZ20Lw4ewky7vK kolAjnMoS5oUd+SbgZBsPErS3poA7vjZnsvmhLx65Ml6PVQg1wLtyLCVzsXLNQiW4/Uj p2yG5WvAz3EZO4TbrZVEOI95Wa2N1WsXzkTY67wwqC5Cnjk4yZlxxHuD4FC3gqyVg2b8 jYAJnyPd309/VHKHUop9+ef8+s9tLQVGTzmofsCv3AfqHJsOB0M4cMBcBH07v3NUXhFD H9cz8zmSjiae2x5kKCtqN0d5xWd5GYMaKfuvojbi3Mod6N2dYwG79Ywq4zs+VSrR60UA 7rkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@soleen.com header.s=google header.b=SvWFKyrF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id ju12-20020a170903428c00b001cf67e08915si12350300plb.562.2023.11.28.13.00.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Nov 2023 13:00:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@soleen.com header.s=google header.b=SvWFKyrF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (Postfix) with ESMTP id 3962B807F48B; Tue, 28 Nov 2023 12:50:45 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346565AbjK1UuQ (ORCPT + 99 others); Tue, 28 Nov 2023 15:50:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57104 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346300AbjK1Utx (ORCPT ); Tue, 28 Nov 2023 15:49:53 -0500 Received: from mail-yw1-x1132.google.com (mail-yw1-x1132.google.com [IPv6:2607:f8b0:4864:20::1132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8D99E1FD5 for ; Tue, 28 Nov 2023 12:49:52 -0800 (PST) Received: by mail-yw1-x1132.google.com with SMTP id 00721157ae682-5cd0af4a7d3so61689617b3.0 for ; 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=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=SvWFKyrF6VDMtt35mvvjqHaCQnIBwza4Mio9j2jVB6Rc7q2c317f52e286/e8iTyVN isdvbCxLGYRUNn5tyh3Vq6cxnZ067QRRTWs9fC3vSHpHsrNqLfcKeRZzaBdFNPkgHJPO wxhb/RG7HZ/7KfAfppZEDRLgnoo43V8s3yKtIDuAM/tYdEsaujThmKQRrHXUq74EAMEb fXc12W2Y0/yVOB0ChfGsPdNYI4bEnoE2pIu9gVTOtH/iAFAJPijqEeq3z/o20oYa/tYO ctUOr8Cua2gAjiwdwfzdBY5R7PayKOoszFEDpaXxbQDKwav56fJF+kREwA/aoZnc1xHz JL7w== 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=uR9y7L+FWM+nCZeDVtkVGQsrnpiWctLOZyWdQMxqATt7pMXs+HPH34gF1UVjpVmYLu SRA8kBs/5Ox+0JkiakIJK2YZ8k5wH++9v+XNYW0woHlJw6NHktaD278dLJpIo9zJ+N+p QI1P6vnm1P/VRJN84Lc6Z1M4e9KOn5PE5or0sVdVgzgGqEhU6s1g/yMS4cnhDbqBpMwx 3iLhi1OJZ3ysJHNk47ABoiUsZrwOrEWm62lviOIma7rSoqinmYZYpTJ9lNklD1wnYPRc IYPzsRYVhIwGkDBWnek6K3Bu1imXx3CFrXDTTFBUNaSyMch320zsZBXSwYqG+Xo/UJ8v AJlQ== X-Gm-Message-State: AOJu0Yxu836x46DsmMYzrq44kGlBmgD7dzYKjHJiX+ooW/fvpvaSf5RF ADVNOTIF8ZBmkcKWUFZgnspkLg== 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 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-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 howler.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 (howler.vger.email [0.0.0.0]); Tue, 28 Nov 2023 12:50:46 -0800 (PST) Convert iommu/sun50i-iommu.c to use the new page allocation functions provided in iommu-pages.h. Signed-off-by: Pasha Tatashin --- 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); -- 2.43.0.rc2.451.g8631bc7472-goog