Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp256726pxt; Wed, 4 Aug 2021 10:18:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyiY1Fs89lhS45m+Xa0sEOUxHS71l1A28ILUhhJrOnjr+/rKw914xgBu3e5gMEFjbqWrj9B X-Received: by 2002:a05:6602:5de:: with SMTP id w30mr302961iox.199.1628097487020; Wed, 04 Aug 2021 10:18:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628097487; cv=none; d=google.com; s=arc-20160816; b=rKKZb7hqJBsNzUNvqTwxYB9kmrkMiJxtVboXuARlhesVcBZpAShJ5terToOuJqHTqM xHp23dqpa6q45aQFArcXvbKZLJ3CsRkiTiscvqRZkYemIUWAbv0LdrVTtSJdATOcqVvp 6PYsUUmQ2Xe7mPGyvPZefz578IZpGCrEtVx03rd3scflUgEYnIsmjGOA+QDCWoyUj5j3 TDwSSF+NtY2nwwUkHbdsSfrF6cq13S16hw76Q2mC/qchEv3XGCuzmw0EZkaSStyEZZjg VEVELWkeWsYKLXGs06zc0Qlyw3AsyQt+ChGHCTYx+FpjRtkbuQ4w7NRiCkwKqto/OQyL MQOg== 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=bk2sNyDbbHMkzGJ0Tidw0ihWIH1V6s3arz2uNovJItY=; b=Qb/uFmwxLHbUapOAmQcAO8vW9INUkB9c6yWXOFuG0E+TvwloZ5HZBIqDwxhJ0aOBJv FWVsKwZYM9a47a6r+qJGkHV5NW2SQGodAWcRT9TpKb37V41GuNgtRhDiOl20DBmuj1xf rqDjiCZ+vUL/WiBvRT32gGtYKn8uHtlPWeHjy4KDiYI89X8EpyMqWa7h7WBhVN5n7ZDc 9zWVfSAxB7s0SCLcMqWx3GKr9qjKf1ivJ2uVNyjJXQ36bHdtt0+lmqjaTtVahyNEjD9I ZuHfBV/gj75T3SErThb5vTJfae863ltVFh4vvYUsp6estK9pNDfSyVOb3Ajl1+spdpS/ 8XZQ== 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 q23si2839189jav.118.2021.08.04.10.17.54; Wed, 04 Aug 2021 10:18:07 -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 S239940AbhHDRQz (ORCPT + 99 others); Wed, 4 Aug 2021 13:16:55 -0400 Received: from foss.arm.com ([217.140.110.172]:34996 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239886AbhHDRQm (ORCPT ); Wed, 4 Aug 2021 13:16:42 -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 B288D1063; Wed, 4 Aug 2021 10:16:29 -0700 (PDT) Received: from 010265703453.arm.com (unknown [10.57.36.146]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id D700F3F66F; Wed, 4 Aug 2021 10:16:27 -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, rajatja@google.com, chenxiang66@hisilicon.com, Maxime Ripard Subject: [PATCH v3 10/25] iommu/sun50i: Drop IOVA cookie management Date: Wed, 4 Aug 2021 18:15:38 +0100 Message-Id: <5b0549d9f9eb0f7fa707ecdbb5d267469c0c490b.1628094601.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: Maxime Ripard Signed-off-by: Robin Murphy --- v3: Also remove unneeded include --- drivers/iommu/sun50i-iommu.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/iommu/sun50i-iommu.c b/drivers/iommu/sun50i-iommu.c index 181bb1c3437c..92997021e188 100644 --- a/drivers/iommu/sun50i-iommu.c +++ b/drivers/iommu/sun50i-iommu.c @@ -7,7 +7,6 @@ #include #include #include -#include #include #include #include @@ -610,14 +609,10 @@ static struct iommu_domain *sun50i_iommu_domain_alloc(unsigned type) if (!sun50i_domain) return NULL; - if (type == IOMMU_DOMAIN_DMA && - iommu_get_dma_cookie(&sun50i_domain->domain)) - goto err_free_domain; - sun50i_domain->dt = (u32 *)__get_free_pages(GFP_KERNEL | __GFP_ZERO, get_order(DT_SIZE)); if (!sun50i_domain->dt) - goto err_put_cookie; + goto err_free_domain; refcount_set(&sun50i_domain->refcnt, 1); @@ -627,10 +622,6 @@ static struct iommu_domain *sun50i_iommu_domain_alloc(unsigned type) return &sun50i_domain->domain; -err_put_cookie: - if (type == IOMMU_DOMAIN_DMA) - iommu_put_dma_cookie(&sun50i_domain->domain); - err_free_domain: kfree(sun50i_domain); @@ -644,8 +635,6 @@ static void sun50i_iommu_domain_free(struct iommu_domain *domain) free_pages((unsigned long)sun50i_domain->dt, get_order(DT_SIZE)); sun50i_domain->dt = NULL; - iommu_put_dma_cookie(domain); - kfree(sun50i_domain); } -- 2.25.1