Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp5362374pxv; Wed, 28 Jul 2021 09:01:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwLsKDVQ5lVoP+JJPtty+FOGdvUygfraaPTdXvMyhny4vr4VE09tBLU4Y2RlMhbpaBzP1k5 X-Received: by 2002:a5d:5906:: with SMTP id v6mr116571wrd.194.1627488107916; Wed, 28 Jul 2021 09:01:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627488107; cv=none; d=google.com; s=arc-20160816; b=JRig+LKQnQEgBuf6TsAVVHbmpMM3hWRHxFjxIPOYTJunr96A4KG3QtXztz/eQ04WMK h/EmBVn2tu+p05SR2BIwU1XjZLD0sjSBiiePOYy+JCnfjkf/MsQrfCbRKVyNv4mIDXAx Yj+z8WPKg5WoSk7TDhvROInBlpNc3p8NgDhdNYh/VgM/DamS/Gcr4EAGek3izwzza1Hw 2aoLCMMEA5gD02k8ad7vtWdGULKKKVm5Jx9QnPHu2b3mSe9UTDG3OI+f1pCmEOeLh6eh ah4dVmA1iiZjPLVyyRE2fdsTKxLrw4ur6y2P2jVEmLTn9nb6u/9nu1R15eKXx7AlG60D Zjlw== 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=uX8jadMUSnZwmj6iEQElXDcVTWr5qMk1AqlopVGKcuo=; b=PjjKBIp7sbJIGwLobc5D72CMiN+nLsjAdnN4GQj/SRKH815vJ5QrdvN4wiT2myKe1+ KwkiK/z9F0NxiAVf6rzr+4fyaMuMxvy1IR19FCqep5XiW1XiheeeGDSemO26NvDG5nsm mt3nn3bSd3YP6E8qw5QiO9lK4PcZP68V2kX/bgjRnnkEzQn1IMBoXHw82DyH+XrwRV2Y XBF3/m8ydsz22yKlJiLA7iI1Gl5apAA1I/xtTlRmhDogN/TCjWVNZONhut2oMw2kSFcC 4xGdTPKwp8XErPONDAmdI6xdcq6ADV5bM9vZNGGT5q82SBcJWBGxcte1jl7Iqe+s3NDU +Fnw== 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 h6si266357ejo.154.2021.07.28.09.01.21; Wed, 28 Jul 2021 09:01:47 -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 S237420AbhG1P72 (ORCPT + 99 others); Wed, 28 Jul 2021 11:59:28 -0400 Received: from foss.arm.com ([217.140.110.172]:59368 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237387AbhG1P7Z (ORCPT ); Wed, 28 Jul 2021 11:59:25 -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 9308C113E; Wed, 28 Jul 2021 08:59:23 -0700 (PDT) Received: from 010265703453.arm.com (unknown [10.57.36.146]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id F1B7D3F70D; Wed, 28 Jul 2021 08:59:21 -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, Maxime Ripard Subject: [PATCH v2 10/24] iommu/sun50i: Drop IOVA cookie management Date: Wed, 28 Jul 2021 16:58:31 +0100 Message-Id: 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 --- drivers/iommu/sun50i-iommu.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/iommu/sun50i-iommu.c b/drivers/iommu/sun50i-iommu.c index 181bb1c3437c..c349a95ec7bd 100644 --- a/drivers/iommu/sun50i-iommu.c +++ b/drivers/iommu/sun50i-iommu.c @@ -610,14 +610,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 +623,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 +636,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