Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1627072rwd; Thu, 15 Jun 2023 13:14:15 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7jJYeHWT+qgMe/rrjXVXctuTXt+w0IedELeVyZp1cBoCsdSMo2ahb/Is4u+ysAOG7pzWJM X-Received: by 2002:aa7:de01:0:b0:516:a09c:cb42 with SMTP id h1-20020aa7de01000000b00516a09ccb42mr13213664edv.4.1686860055277; Thu, 15 Jun 2023 13:14:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686860055; cv=none; d=google.com; s=arc-20160816; b=PX0QetxxIeExGCNeseM5vHonjUDb4jiz6quFBISWA0ZwxiG7uh/HAD0KvKQs7/SqX4 NG/8+UjaFpLNN9f7Vk3rdSNGVpAG9VRwKhkSVFvR7pT73DbF1Lx5KzJitn9XzFye6oB7 LGLFvlr59E2z0bQGx8LMbDpXuPmMszBUDaeKWssEUA8xH1vhubOBN+/Ho/Kf0lmjWKuD UQDGItLXxnZAD8PMSqEd4xaP22fp1rvD19T/5KRRmsqCfE9rmv8g2HOc+t1vUi1PlUX9 crX4IWD/TL6nwzVHozeKuv2kJkDq9g6EMV/b+UkK76rLmG0sqDqe/2y9k8I5LpoYAdNg QYgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:mime-version :references:in-reply-to:message-id:date:subject:from:dkim-signature; bh=/qL4tWH5vlfUGDltwgczmV318twf9yMJvn1JbUu8GiY=; b=YfZ67SBIWyDBQMi0aWG40uog4DknDaI4mS3VT40es41wuRS/RPXRxtJhBYUvGovvNT Ma627rwfW1krCPdezjLFnIGEfVhg3SHW4D510kIdLE4JHJNKEH6c2P2EV4MSUaXAOmxS tGb1Al/hV9saxpQudh+JKB8keHORSwH4TYlpfVRBu+0sePFUfWL6ZVZUWZRaWQaRrOJz eqbf3o6JlAcAftzidHeKgag2YN1ar90leV3TStOa5oqUDPpNiktsmQHl09arGKiaxuM8 JAheR8gMi2zx2RaezkD0tBCFcLVS3dNODm/N0/h4TY1q1uMP9VQKO3zM9DEaJ2ce6aiC Bkfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kwiboo.se header.s=s1 header.b="Oci/zWt4"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=kwiboo.se Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z13-20020a50eb4d000000b005162d2d3c1csi10528866edp.58.2023.06.15.13.13.51; Thu, 15 Jun 2023 13:14:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kwiboo.se header.s=s1 header.b="Oci/zWt4"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=kwiboo.se Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235638AbjFOULA (ORCPT + 99 others); Thu, 15 Jun 2023 16:11:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36884 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230081AbjFOUKv (ORCPT ); Thu, 15 Jun 2023 16:10:51 -0400 Received: from s.wrqvtbkv.outbound-mail.sendgrid.net (s.wrqvtbkv.outbound-mail.sendgrid.net [149.72.123.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E94771BDB for ; Thu, 15 Jun 2023 13:10:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kwiboo.se; h=from:subject:in-reply-to:references:mime-version:to:cc: content-transfer-encoding:content-type:cc:content-type:from:subject:to; s=s1; bh=/qL4tWH5vlfUGDltwgczmV318twf9yMJvn1JbUu8GiY=; b=Oci/zWt4tgI1SRFLzpYzM1/YhWgKLN++0kQB/UrIyGdcxHE9JjapDGiGKk4efPOZLgf9 R3H+LI+3oeIyEUf+h2WAi9ni5//WfQGwSAOruYTyMjLZS5z3IuPi3t7QGAWKacHelM1JwA 7GwXbbL37UEi/aTaJ4i8eNECvwYkE4hYAhicBv4gsVPMGDUyGaK/IuBCSYfExxwi2L2kOY eyOA7DEIvALtozWTqML2K25reBwoAKSVs0boFeBnvry3XNkLXJkcWncRpR5tcQo8v4Td1x CKAvvto5ebEeVCvNt4wjGv+O/wcCEI1T53uGb/wFi1PFtZ1I10XNtddq1ouhDF+A== Received: by filterdrecv-65f68489c8-xfp5j with SMTP id filterdrecv-65f68489c8-xfp5j-1-648B7048-2B 2023-06-15 20:10:48.817052942 +0000 UTC m=+3098087.423003092 Received: from bionic.localdomain (unknown) by geopod-ismtpd-5 (SG) with ESMTP id UaAYmYNhTEmHCxT9KxKCWA Thu, 15 Jun 2023 20:10:48.624 +0000 (UTC) From: Jonas Karlman Subject: [PATCH v2 3/3] iommu: rockchip: Allocate tables from all available memory Date: Thu, 15 Jun 2023 20:10:49 +0000 (UTC) Message-Id: <20230615201042.2291867-4-jonas@kwiboo.se> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230615201042.2291867-1-jonas@kwiboo.se> References: <20230615201042.2291867-1-jonas@kwiboo.se> MIME-Version: 1.0 X-SG-EID: =?us-ascii?Q?TdbjyGynYnRZWhH+7lKUQJL+ZxmxpowvO2O9SQF5CwCVrYgcwUXgU5DKUU3QxA?= =?us-ascii?Q?fZekEeQsTe+RrMu3cja6a0hwSnsPxsggRhT=2FD+A?= =?us-ascii?Q?9yEtkGRht4pdol+jy3k6QpCorymp5gRwI4WQaU7?= =?us-ascii?Q?3dOcXB8iUX5JPwAso4KvAGCmmGsdC8xW80R1JvI?= =?us-ascii?Q?Q=2FXn9yJjPjX=2FuSKbOcTHJdEbgtge3ity=2F2paIrx?= =?us-ascii?Q?XuUf=2FVgpsldhx8UNlWhCA7ZO7dIxRgoy2Qtyb9?= To: Joerg Roedel , Will Deacon , Robin Murphy , Heiko Stuebner Cc: Benjamin Gaignard , iommu@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, Jonas Karlman X-Entity-ID: P7KYpSJvGCELWjBME/J5tg== Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_BL_SPAMCOP_NET, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Newer Rockchip SoCs, RK356x and RK3588, support more then 4GB of memory. However, the RK IOMMU driver is using the GFP_DMA32 flag to limit allocation of the discovery and page tables into memory below 4GB. Let's remove this limitation now that the discovery table address is correctly configured for addresses above 4GB. Signed-off-by: Jonas Karlman --- v2: - no change drivers/iommu/rockchip-iommu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iommu/rockchip-iommu.c b/drivers/iommu/rockchip-iommu.c index 62be9bf42390..46498fc382ee 100644 --- a/drivers/iommu/rockchip-iommu.c +++ b/drivers/iommu/rockchip-iommu.c @@ -727,7 +727,7 @@ static u32 *rk_dte_get_page_table(struct rk_iommu_domain *rk_domain, if (rk_dte_is_pt_valid(dte)) goto done; - page_table = (u32 *)get_zeroed_page(GFP_ATOMIC | GFP_DMA32); + page_table = (u32 *)get_zeroed_page(GFP_ATOMIC); if (!page_table) return ERR_PTR(-ENOMEM); @@ -1076,7 +1076,7 @@ static struct iommu_domain *rk_iommu_domain_alloc(unsigned type) * Each level1 (dt) and level2 (pt) table has 1024 4-byte entries. * Allocate one 4 KiB page for each table. */ - rk_domain->dt = (u32 *)get_zeroed_page(GFP_KERNEL | GFP_DMA32); + rk_domain->dt = (u32 *)get_zeroed_page(GFP_KERNEL); if (!rk_domain->dt) goto err_free_domain; -- 2.40.1