Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp5361758pxv; Wed, 28 Jul 2021 09:01:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJytYXp8jpIy6SiqNYIlvDF1g67AZbsBkm31FcJmrSqdQ6RI9V29QO3xns09VIBjpTdU/OHO X-Received: by 2002:a05:6e02:68d:: with SMTP id o13mr379558ils.150.1627488067354; Wed, 28 Jul 2021 09:01:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627488067; cv=none; d=google.com; s=arc-20160816; b=pcXEk7cO2SrR92Owg2R3khzsFs+wdapCwLOSlcQCL+N2EpGjVeE+XJTnk19PvoMalp FkUbI2YEEYEJ5b4zizbSAqjPgIjVbaZZtTWSEJmbOsclWPd5zLSae2F0i4LITJ0rJogN xa6xABL1jtUi0RVH+n88w/R7ZLnuxnxHoPIvFBp2l8Lj93SPIFgUJ7HhliGbGZzeQwrW HzE4VWCnGr79xr7ywX+XLjaOji8p0INKB6ftDirgE5fvqWmRX6WOt8yAqubgEnhl6Kw8 LfW0+bEDlxwu7hp07IWCnspIcP9kA3NlcnbzQOc5FOGq30PiEdJsXazkVrNcDBB2uDlq dYBQ== 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=7u5y0MAjerAaIgAip9OWe9XPZaBgoW7QuipJ2bYl2Rs=; b=nCTG5V0HoMZxFFGsMPH9IE1LUn26zjcsIEBtw0KSP+c5ZAo1S8q22CReBVyMGlcFxs /0h/TDe41mD6kUZqyM5ENNa9UoYWaqSj5Vsn/IwcZt24QdZU/5NWPR8a9H1HSF6oBrnI ewP4ormYtX1QtMYLG02MAqHet0dVw925s7g8b4XOWXxU66/iTapgQ53zp/X4MKC/9y2z 9EtlQdYkJwwBdkT4rcIbafqHO/4t6L1Dkf8yxYaow+dArJOEz/++YjfHkETVl2b8SAG0 llL4yaWI8+QtaRdaJ7d1gBEgAOHHt/lo8oG4pHBWZIGOErkdinhk2DxK3jxpmqWGJTdp QfhQ== 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 y14si299344iot.9.2021.07.28.09.00.55; Wed, 28 Jul 2021 09:01: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 S237455AbhG1P7c (ORCPT + 99 others); Wed, 28 Jul 2021 11:59:32 -0400 Received: from foss.arm.com ([217.140.110.172]:59384 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237382AbhG1P71 (ORCPT ); Wed, 28 Jul 2021 11:59:27 -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 83B79D6E; Wed, 28 Jul 2021 08:59:25 -0700 (PDT) Received: from 010265703453.arm.com (unknown [10.57.36.146]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id E098E3F70D; Wed, 28 Jul 2021 08:59:23 -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, Jean-Philippe Brucker Subject: [PATCH v2 11/24] iommu/virtio: Drop IOVA cookie management Date: Wed, 28 Jul 2021 16:58:32 +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: Jean-Philippe Brucker Signed-off-by: Robin Murphy --- drivers/iommu/virtio-iommu.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/drivers/iommu/virtio-iommu.c b/drivers/iommu/virtio-iommu.c index 6abdcab7273b..80930ce04a16 100644 --- a/drivers/iommu/virtio-iommu.c +++ b/drivers/iommu/virtio-iommu.c @@ -598,12 +598,6 @@ static struct iommu_domain *viommu_domain_alloc(unsigned type) spin_lock_init(&vdomain->mappings_lock); vdomain->mappings = RB_ROOT_CACHED; - if (type == IOMMU_DOMAIN_DMA && - iommu_get_dma_cookie(&vdomain->domain)) { - kfree(vdomain); - return NULL; - } - return &vdomain->domain; } @@ -643,8 +637,6 @@ static void viommu_domain_free(struct iommu_domain *domain) { struct viommu_domain *vdomain = to_viommu_domain(domain); - iommu_put_dma_cookie(domain); - /* Free all remaining mappings (size 2^64) */ viommu_del_mappings(vdomain, 0, 0); -- 2.25.1