From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.4 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 970C4C4338F for ; Thu, 5 Aug 2021 09:38:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6562560E96 for ; Thu, 5 Aug 2021 09:38:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238895AbhHEJiW (ORCPT ); Thu, 5 Aug 2021 05:38:22 -0400 Received: from foss.arm.com ([217.140.110.172]:41792 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238146AbhHEJiT (ORCPT ); Thu, 5 Aug 2021 05:38:19 -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 168B16D; Thu, 5 Aug 2021 02:38:05 -0700 (PDT) Received: from [10.57.36.146] (unknown [10.57.36.146]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id DFEED3F719; Thu, 5 Aug 2021 02:38:03 -0700 (PDT) Subject: Re: [PATCH v3 02/25] iommu/amd: Drop IOVA cookie management From: Robin Murphy To: joro@8bytes.org, will@kernel.org Cc: linux-kernel@vger.kernel.org, dianders@chromium.org, iommu@lists.linux-foundation.org, rajatja@google.com, linux-arm-kernel@lists.infradead.org References: Message-ID: <44f5c699-1177-7f1d-479e-59a8a42efab6@arm.com> Date: Thu, 5 Aug 2021 10:37:58 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021-08-04 18:15, Robin Murphy wrote: > 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 Oh dear, how embarrassing... I went through all the drivers making that decision based on iommu_dma* references but totally forgot about iommu_setup_dma_ops() here. And then of course fell into the trap of "such a minor change I don't need to re-rest it" hubris... sigh, roll back to v2 for this one. Apologies, Robin. > #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); > > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.4 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7AC5FC4320A for ; Thu, 5 Aug 2021 09:38:10 +0000 (UTC) Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id EE8E561106 for ; Thu, 5 Aug 2021 09:38:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org EE8E561106 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.linux-foundation.org Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id B695C40229; Thu, 5 Aug 2021 09:38:09 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id dE_9vIgIaOtT; Thu, 5 Aug 2021 09:38:08 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp2.osuosl.org (Postfix) with ESMTPS id 43191400AF; Thu, 5 Aug 2021 09:38:08 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 1B0F2C001A; Thu, 5 Aug 2021 09:38:08 +0000 (UTC) Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by lists.linuxfoundation.org (Postfix) with ESMTP id CFA2FC000E for ; Thu, 5 Aug 2021 09:38:06 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id B76D340435 for ; Thu, 5 Aug 2021 09:38:06 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2y9QRLAu_laM for ; Thu, 5 Aug 2021 09:38:06 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp4.osuosl.org (Postfix) with ESMTP id 0B678403E2 for ; Thu, 5 Aug 2021 09:38:05 +0000 (UTC) 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 168B16D; Thu, 5 Aug 2021 02:38:05 -0700 (PDT) Received: from [10.57.36.146] (unknown [10.57.36.146]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id DFEED3F719; Thu, 5 Aug 2021 02:38:03 -0700 (PDT) Subject: Re: [PATCH v3 02/25] iommu/amd: Drop IOVA cookie management From: Robin Murphy To: joro@8bytes.org, will@kernel.org References: Message-ID: <44f5c699-1177-7f1d-479e-59a8a42efab6@arm.com> Date: Thu, 5 Aug 2021 10:37:58 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-GB Cc: iommu@lists.linux-foundation.org, rajatja@google.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, dianders@chromium.org X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Development issues for Linux IOMMU support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: iommu-bounces@lists.linux-foundation.org Sender: "iommu" On 2021-08-04 18:15, Robin Murphy wrote: > 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 Oh dear, how embarrassing... I went through all the drivers making that decision based on iommu_dma* references but totally forgot about iommu_setup_dma_ops() here. And then of course fell into the trap of "such a minor change I don't need to re-rest it" hubris... sigh, roll back to v2 for this one. Apologies, Robin. > #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); > > _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9D66EC4338F for ; Thu, 5 Aug 2021 09:40:26 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5925260E09 for ; Thu, 5 Aug 2021 09:40:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 5925260E09 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:References: Cc:To:From:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=gdRkwBtkD39szXZQ6Nv1ymZfwxFFdUf5JDQJuoYOiVg=; b=hqstmQcVQXDE7//FqXM+YL0zHg OXCM+H0aFQ/4uQcJuCHbTpxzFJcHynWMWP+6jcKV1H3D/H/RPvf9VeB6OYA/W6RPvzoCzY0+O+OEm LLXc7oMtxd+ys+u46vyT7poS/3I4RYCGeWpJMhGCjuFQuTM5rhct4o4qXBWxf6vHaRXsdKLVm0ayt LzCm3lbc7EwNlbkY/luIyi+cURtH0jc8WcQd8t+IqsDAjCxLcotAzOhzmR0G5ZVxfxF6bTfkwu6RY R9dDLuQyHfMA8YodU5Rj83dUz+S+ZfMzZDgR//Amx+OMpIshp0GP3XpSPPItt7SBQ/uk00SARmEyj U74zj/Lg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mBZpo-008uYm-8M; Thu, 05 Aug 2021 09:38:40 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mBZpK-008uPX-MP for linux-arm-kernel@lists.infradead.org; Thu, 05 Aug 2021 09:38:12 +0000 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 168B16D; Thu, 5 Aug 2021 02:38:05 -0700 (PDT) Received: from [10.57.36.146] (unknown [10.57.36.146]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id DFEED3F719; Thu, 5 Aug 2021 02:38:03 -0700 (PDT) Subject: Re: [PATCH v3 02/25] iommu/amd: Drop IOVA cookie management From: Robin Murphy To: joro@8bytes.org, will@kernel.org Cc: linux-kernel@vger.kernel.org, dianders@chromium.org, iommu@lists.linux-foundation.org, rajatja@google.com, linux-arm-kernel@lists.infradead.org References: Message-ID: <44f5c699-1177-7f1d-479e-59a8a42efab6@arm.com> Date: Thu, 5 Aug 2021 10:37:58 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-GB X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210805_023810_842964_EF2395E8 X-CRM114-Status: GOOD ( 16.43 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 2021-08-04 18:15, Robin Murphy wrote: > 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 Oh dear, how embarrassing... I went through all the drivers making that decision based on iommu_dma* references but totally forgot about iommu_setup_dma_ops() here. And then of course fell into the trap of "such a minor change I don't need to re-rest it" hubris... sigh, roll back to v2 for this one. Apologies, Robin. > #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); > > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel