Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp5361568pxv; Wed, 28 Jul 2021 09:00:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyWw7MpEK/oq+RDL1lSdK3WIEF8Yqgbr0wTdD8qvPSjfguzpKQtqrCdxSjtpH/ceQDrjP6l X-Received: by 2002:a92:c083:: with SMTP id h3mr364788ile.73.1627488054749; Wed, 28 Jul 2021 09:00:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627488054; cv=none; d=google.com; s=arc-20160816; b=QMaHpsbZiYD+bC5gPWrtTqgZoqWOVCZWe3ha2lzIwubGaM57m5ZXuAbpKo2VT6vR13 c8LqWh0l9HL2OTpKeQ8IzUyo+wYUKVNmh+65uwe/xeiF0V95kB50s88wsbbznCwqniU9 jYubo0ZFzNrWfTcbE80G0CpCbcOQZeSiOUghRJnenu6skSbU07Rt8R4wB2o8YSFb07em hu8pntXH4FLU7jgsVg8RaSxwfmu+279nfDVQIRNaV5LM33FinOSWZUyjhzUFOLlpzYxD DHJnJTKuO8tMHC4VCxeYpDaevIuysJ+euNNFhrozQ+hmOhg2kgLxKdg8hqE3i69mDebP BVaQ== 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:cc:to:from; bh=oBO5q6MXlsshOoZSHq1v1JfutFHVrWdvsU8mGFI8hWI=; b=oQLn2iEhULv+MW0SEPl4pa1GNXvd08CYJcGxdcQhLX0q4OeTQN+lqnuenJ/J2tcjpj jO+vkP7EpXeRNgnvQ/I5twtOlf5zzi6RHrHVBUu/TYwRItRr5wHiMJUyDmiYdLQpAZ78 yxrpD6lXgAaHjLFGckM9shUz/G3BxQfpSnhiraIp7pNKnLxmH84ucK0FysX1B0Cxeh8Q A8emrLGRvDhrTzKGwkvNlIly/m/vkyGDiZVrIs5alHqWW2qh8KXVIRc28SR36LJ2Z+PK qXj/oZsA2raBoLPRxI3q9uQ1+uORxN3RmpGzkfWG5XbrGXr4fFhj9r/4o5kDAHiqLKZS RhEA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u26si252881jam.87.2021.07.28.09.00.41; Wed, 28 Jul 2021 09:00:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237398AbhG1P7Z (ORCPT + 99 others); Wed, 28 Jul 2021 11:59:25 -0400 Received: from foss.arm.com ([217.140.110.172]:59326 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237369AbhG1P7V (ORCPT ); Wed, 28 Jul 2021 11:59:21 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id B1B19106F; Wed, 28 Jul 2021 08:59:19 -0700 (PDT) Received: from 010265703453.arm.com (unknown [10.57.36.146]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 1CFCD3F70D; Wed, 28 Jul 2021 08:59:17 -0700 (PDT) From: Robin Murphy To: joro@8bytes.org, will@kernel.org Cc: iommu@lists.linux-foundation.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, suravee.suthikulpanit@amd.com, baolu.lu@linux.intel.com, john.garry@huawei.com, dianders@chromium.org, Heiko Stuebner Subject: [PATCH v2 08/24] iommu/rockchip: Drop IOVA cookie management Date: Wed, 28 Jul 2021 16:58:29 +0100 Message-Id: <9baf515beb326882a1cadf65c832c7ef330f3128.1627468309.git.robin.murphy@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The core code bakes its own cookies now. CC: Heiko Stuebner Signed-off-by: Robin Murphy --- drivers/iommu/rockchip-iommu.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/drivers/iommu/rockchip-iommu.c b/drivers/iommu/rockchip-iommu.c index 9febfb7f3025..c24561f54f32 100644 --- a/drivers/iommu/rockchip-iommu.c +++ b/drivers/iommu/rockchip-iommu.c @@ -1074,10 +1074,6 @@ static struct iommu_domain *rk_iommu_domain_alloc(unsigned type) if (!rk_domain) return NULL; - if (type == IOMMU_DOMAIN_DMA && - iommu_get_dma_cookie(&rk_domain->domain)) - goto err_free_domain; - /* * rk32xx iommus use a 2 level pagetable. * Each level1 (dt) and level2 (pt) table has 1024 4-byte entries. @@ -1085,7 +1081,7 @@ static struct iommu_domain *rk_iommu_domain_alloc(unsigned type) */ rk_domain->dt = (u32 *)get_zeroed_page(GFP_KERNEL | GFP_DMA32); if (!rk_domain->dt) - goto err_put_cookie; + goto err_free_domain; rk_domain->dt_dma = dma_map_single(dma_dev, rk_domain->dt, SPAGE_SIZE, DMA_TO_DEVICE); @@ -1106,9 +1102,6 @@ static struct iommu_domain *rk_iommu_domain_alloc(unsigned type) err_free_dt: free_page((unsigned long)rk_domain->dt); -err_put_cookie: - if (type == IOMMU_DOMAIN_DMA) - iommu_put_dma_cookie(&rk_domain->domain); err_free_domain: kfree(rk_domain); @@ -1137,8 +1130,6 @@ static void rk_iommu_domain_free(struct iommu_domain *domain) SPAGE_SIZE, DMA_TO_DEVICE); free_page((unsigned long)rk_domain->dt); - if (domain->type == IOMMU_DOMAIN_DMA) - iommu_put_dma_cookie(&rk_domain->domain); kfree(rk_domain); } -- 2.25.1