Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1644931rwd; Thu, 15 Jun 2023 13:32:17 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7wK33XUy+ScBo66mwOiw0ebgFTHcWUW4TcExmVSQ6sJySqwY8fM0iTMj3yEwBrn6q3DPv0 X-Received: by 2002:a05:6808:bd3:b0:39a:a99a:2195 with SMTP id o19-20020a0568080bd300b0039aa99a2195mr377523oik.31.1686861137364; Thu, 15 Jun 2023 13:32:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686861137; cv=none; d=google.com; s=arc-20160816; b=Cz6FSAaI1ZQXNWV7syuK9xA/t/NB1yOHqDUYcJZJ77dBhnvZu3JYe+IM1hH82ISI4e 6CH4QRHZhvTPJnhP8drTjTKh4Ut98qPUxTm2mtjHgglaizMxUyK9Ok9TpVrYMjvZslb1 ymG1ugeaar0aVR3gozRGZpJHp6vIVk3Dfl25isZvQFf9hhQkCUS/p1wBR/zF7Kh78mgw RYPePmFIB+Z+H/h++OsyM9tk9NRYKTyPek6SfyvzERAGwT07sUmRrnbIhKaX629gvdR0 XXbqmVFLXtPabmhKOSDJgaI4YPVjCx21qGKUd8Bepc1XNmS7sE+H39DJ738azB6heQjM 054g== 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=Jo6WrxNEBvFGf7AFwmeZPUW/JDvN4uXBntOmSb9t0Xw=; b=sdRqc81ZHwGZBObs9I5mEeHU0rhiZQLzy7xr9yDl7vOygyN4aFE7YvJD9A0/IfR2wT X9jv0JBASQNopOL2wIJSUYGPoX3BWstezNs5rNzoiBzCpIma5QLIXImw75ZQW2K3zzCj cDyGKpfRE4aEHUhRUsZSKyw4jvoLGJNC0rmBJlT0j8W1aRhew40SL7nVdCxObuFVu8Hh 51Dp9H8Bx4gsaKMIGWsVhBltUlKdaYC+U1IFy6/3VrZdH3OVjjo0zj42gojhBA2agk/I uMqLSqQIT/MG0xK6TFzGJyPxMiiWsJT3uOGKx3QQlh8dVtUGag2YJ4+egqhoJKlD4Pjx eAVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kwiboo.se header.s=s1 header.b="UJJk/i2k"; 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 v71-20020a63894a000000b0055339136a78si883575pgd.517.2023.06.15.13.32.02; Thu, 15 Jun 2023 13:32:17 -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="UJJk/i2k"; 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 S232905AbjFOUKx (ORCPT + 99 others); Thu, 15 Jun 2023 16:10:53 -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 S230116AbjFOUKt (ORCPT ); Thu, 15 Jun 2023 16:10:49 -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 A635A1715 for ; Thu, 15 Jun 2023 13:10:48 -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=Jo6WrxNEBvFGf7AFwmeZPUW/JDvN4uXBntOmSb9t0Xw=; b=UJJk/i2kqv2+FgNaiQ7osSjPGFyvg+xx90znS7A6WMqpEnFj0gnvj33JNOjwqfmjCZoI tSLxmZqwcsQKATSs6fM4Gps9ufnOKMUjlhXvEDSoWroLpX/rE1PWMnXqRlUb8XbXb0MgLF ibIF8AKNo2ZVEmVCK9SaYEib/6zYEyPutujJQ6JxhTZgZU4f4DVgstiAX6+v4ke3IAVvYX jkbxngwRNbkcrAxNCy26C4VTpKJKETu3TDec6VksvJbNLTZ8k+IaeqCMkusynPGdCvjFts DyBy4hJZT+mhIHF/WSKbH+OfwXp+4NDboY5ZJ8WFOTs+XDyMYuDiBeHPL8Y5Hzwg== Received: by filterdrecv-77869f68cc-lcgp6 with SMTP id filterdrecv-77869f68cc-lcgp6-1-648B7047-29 2023-06-15 20:10:47.655923269 +0000 UTC m=+3098089.849329708 Received: from bionic.localdomain (unknown) by geopod-ismtpd-5 (SG) with ESMTP id HeBgvyqzQEmrDPru8i_iZw Thu, 15 Jun 2023 20:10:47.460 +0000 (UTC) From: Jonas Karlman Subject: [PATCH v2 2/3] iommu: rockchip: Remove unused variant ops Date: Thu, 15 Jun 2023 20:10:47 +0000 (UTC) Message-Id: <20230615201042.2291867-3-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+RrMu3cja6a0hw3PhMXq4dBde3yCz?= =?us-ascii?Q?R1jfjYCf+7fd8HHpQWrb68EQHPtq89X0VUIvV9y?= =?us-ascii?Q?qtrQo51l3wTBwoWjkkPMRshT5iwndBQnUXHgbOj?= =?us-ascii?Q?M=2FABO2jE8IRX+k=2F+7kFVMmCGoRyc2hY3vNV2J6F?= =?us-ascii?Q?MoH7IkANy=2FKKjUwP=2FrTERjLDN=2FaZV4lp=2FFk8cW?= 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 The dte_addr_phys and dma_addr_dte ops is now unused by the driver, let's remove them. Signed-off-by: Jonas Karlman --- v2: - no change drivers/iommu/rockchip-iommu.c | 33 --------------------------------- 1 file changed, 33 deletions(-) diff --git a/drivers/iommu/rockchip-iommu.c b/drivers/iommu/rockchip-iommu.c index d46319f77e5c..62be9bf42390 100644 --- a/drivers/iommu/rockchip-iommu.c +++ b/drivers/iommu/rockchip-iommu.c @@ -98,8 +98,6 @@ struct rk_iommu_ops { phys_addr_t (*pt_address)(u32 dte); u32 (*mk_dtentries)(dma_addr_t pt_dma); u32 (*mk_ptentries)(phys_addr_t page, int prot); - phys_addr_t (*dte_addr_phys)(u32 addr); - u32 (*dma_addr_dte)(dma_addr_t dt_dma); u64 dma_bit_mask; }; @@ -531,33 +529,6 @@ static int rk_iommu_force_reset(struct rk_iommu *iommu) return 0; } -static inline phys_addr_t rk_dte_addr_phys(u32 addr) -{ - return (phys_addr_t)addr; -} - -static inline u32 rk_dma_addr_dte(dma_addr_t dt_dma) -{ - return dt_dma; -} - -#define DT_HI_MASK GENMASK_ULL(39, 32) -#define DTE_BASE_HI_MASK GENMASK(11, 4) -#define DT_SHIFT 28 - -static inline phys_addr_t rk_dte_addr_phys_v2(u32 addr) -{ - u64 addr64 = addr; - return (phys_addr_t)(addr64 & RK_DTE_PT_ADDRESS_MASK) | - ((addr64 & DTE_BASE_HI_MASK) << DT_SHIFT); -} - -static inline u32 rk_dma_addr_dte_v2(dma_addr_t dt_dma) -{ - return (dt_dma & RK_DTE_PT_ADDRESS_MASK) | - ((dt_dma & DT_HI_MASK) >> DT_SHIFT); -} - static void log_iova(struct rk_iommu *iommu, int index, dma_addr_t iova) { void __iomem *base = iommu->bases[index]; @@ -1405,8 +1376,6 @@ static struct rk_iommu_ops iommu_data_ops_v1 = { .pt_address = &rk_dte_pt_address, .mk_dtentries = &rk_mk_dte, .mk_ptentries = &rk_mk_pte, - .dte_addr_phys = &rk_dte_addr_phys, - .dma_addr_dte = &rk_dma_addr_dte, .dma_bit_mask = DMA_BIT_MASK(32), }; @@ -1414,8 +1383,6 @@ static struct rk_iommu_ops iommu_data_ops_v2 = { .pt_address = &rk_dte_pt_address_v2, .mk_dtentries = &rk_mk_dte_v2, .mk_ptentries = &rk_mk_pte_v2, - .dte_addr_phys = &rk_dte_addr_phys_v2, - .dma_addr_dte = &rk_dma_addr_dte_v2, .dma_bit_mask = DMA_BIT_MASK(40), }; -- 2.40.1