Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp257592pxt; Wed, 4 Aug 2021 10:19:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzBt+lgBw/+RUK+Ur0gSeiCocDhAysIjlRp2j74Z28FC8xhfIliT5WFvK/XZZGL670JGflh X-Received: by 2002:a05:6402:550:: with SMTP id i16mr954580edx.177.1628097559291; Wed, 04 Aug 2021 10:19:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628097559; cv=none; d=google.com; s=arc-20160816; b=HuEBIhJPoyVBAatsq0NZy1GAVVp8MlupYBCZsLw3CnjyYOwlfkCP/3b1kOuEwxOF7i ace4tMJKBAWTHr2DGbu1regExNxS05vQJXdDRkkzAJITvsuTrQQ3capiVcRTCay7xeYN A2NdrAoH77zK+R6VXpEor97D/nVI1l2HWYvYBHk8Oc2NBh9TzTnc2HZRR2GXkqdb0oom RX0qkgZYJ6ZV2UDPbbQR2yiPCNw8LFiH0TLoJ+VdlOMXquuNr9doEyg9iwsNf12r431p zCRFwQSCDXwxzHOS8Rxdiw3oHo1muW5a0EQkg9jI+a0KXkgUMJcjcEa9DONYRGkpJLGe TA7w== 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=dh2p0lxUIMlGxhYTEkXTUUWFlaP43QP4JL+h/Zcbdks=; b=QOaoPWVRcoQDzF1IwifHp0pDM8Ediw6hGfvmndhPtKGVuzc2hby/qjNuA/7jna59/X JNx0aaMjVR3C3dLjJOkC5s6BF0kM7ELiMLYg851x2jEDrEo404IRpBASgKVSX41Kw921 cllBR6LkjKufWZDwkXYBXyXJosEtLXp3TCpL30FEPvroHg+43G6drT+z49JT4C80vSYD TcDUdw5sNrugqSWQlQCcE4iL6wjloUBCqowfRdZnMBogjxa0mey6V0sf7rUKANj2qFyG io1Ug5drX4JM2gGGn+1CTtx+OogpuILf7XFnb7WxSgADDnzzWRO2fksPRixtQ8oGZXOh V5Ww== 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 hx15si2505848ejc.725.2021.08.04.10.18.51; Wed, 04 Aug 2021 10:19:19 -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 S239822AbhHDRQ1 (ORCPT + 99 others); Wed, 4 Aug 2021 13:16:27 -0400 Received: from foss.arm.com ([217.140.110.172]:34790 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239695AbhHDRQZ (ORCPT ); Wed, 4 Aug 2021 13:16: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 E71E711FB; Wed, 4 Aug 2021 10:16:12 -0700 (PDT) Received: from 010265703453.arm.com (unknown [10.57.36.146]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 3767F3F66F; Wed, 4 Aug 2021 10:16:11 -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 Subject: [PATCH v3 02/25] iommu/amd: Drop IOVA cookie management Date: Wed, 4 Aug 2021 18:15:30 +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. Signed-off-by: Robin Murphy --- v3: Also remove unneeded include --- drivers/iommu/amd/iommu.c | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/drivers/iommu/amd/iommu.c b/drivers/iommu/amd/iommu.c index 52fe2326042a..92f7cbe3d14a 100644 --- a/drivers/iommu/amd/iommu.c +++ b/drivers/iommu/amd/iommu.c @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include @@ -1918,16 +1917,7 @@ static struct iommu_domain *amd_iommu_domain_alloc(unsigned type) domain->domain.geometry.aperture_end = ~0ULL; domain->domain.geometry.force_aperture = true; - if (type == IOMMU_DOMAIN_DMA && - iommu_get_dma_cookie(&domain->domain) == -ENOMEM) - goto free_domain; - return &domain->domain; - -free_domain: - protection_domain_free(domain); - - return NULL; } static void amd_iommu_domain_free(struct iommu_domain *dom) @@ -1944,9 +1934,6 @@ static void amd_iommu_domain_free(struct iommu_domain *dom) if (!dom) return; - if (dom->type == IOMMU_DOMAIN_DMA) - iommu_put_dma_cookie(&domain->domain); - if (domain->flags & PD_IOMMUV2_MASK) free_gcr3_table(domain); -- 2.25.1