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=-13.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable 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 0DA0DC4320A for ; Wed, 4 Aug 2021 18:53:45 +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 55D14610FB for ; Wed, 4 Aug 2021 18:53:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 55D14610FB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=sntech.de 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 1525F40538; Wed, 4 Aug 2021 18:53:44 +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 UGN3wIIMA4Ll; Wed, 4 Aug 2021 18:53:43 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp2.osuosl.org (Postfix) with ESMTPS id 9E3A9401D2; Wed, 4 Aug 2021 18:53:42 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 78067C001A; Wed, 4 Aug 2021 18:53:42 +0000 (UTC) Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by lists.linuxfoundation.org (Postfix) with ESMTP id A51DAC000E for ; Wed, 4 Aug 2021 18:53:41 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 8643740686 for ; Wed, 4 Aug 2021 18:53:41 +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 rd9GH5-Lq8er for ; Wed, 4 Aug 2021 18:53:41 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0 Received: from gloria.sntech.de (gloria.sntech.de [185.11.138.130]) by smtp4.osuosl.org (Postfix) with ESMTPS id E63F44061A for ; Wed, 4 Aug 2021 18:53:40 +0000 (UTC) Received: from ip5f5aa64a.dynamic.kabel-deutschland.de ([95.90.166.74] helo=diego.localnet) by gloria.sntech.de with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mBM1J-0002cI-Lo; Wed, 04 Aug 2021 20:53:37 +0200 From: Heiko =?ISO-8859-1?Q?St=FCbner?= To: joro@8bytes.org, will@kernel.org, Robin Murphy Subject: Re: [PATCH v3 08/25] iommu/rockchip: Drop IOVA cookie management Date: Wed, 04 Aug 2021 20:53:36 +0200 Message-ID: <4512656.mogB4TqSGs@diego> In-Reply-To: <0d25511c58981ecd0a1f3006dc1c30a73fb7d377.1628094601.git.robin.murphy@arm.com> References: <0d25511c58981ecd0a1f3006dc1c30a73fb7d377.1628094601.git.robin.murphy@arm.com> MIME-Version: 1.0 Cc: linux-kernel@vger.kernel.org, dianders@chromium.org, iommu@lists.linux-foundation.org, rajatja@google.com, linux-arm-kernel@lists.infradead.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-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: iommu-bounces@lists.linux-foundation.org Sender: "iommu" Am Mittwoch, 4. August 2021, 19:15:36 CEST schrieb Robin Murphy: > The core code bakes its own cookies now. > > CC: Heiko Stuebner > Signed-off-by: Robin Murphy On a Rockchip rk3288 (arm32), rk3399 (arm64) and px30 (arm64) with the graphics pipeline using the iommu Tested-by: Heiko Stuebner Acked-by: Heiko Stuebner Works now nicely on both arm32 and arm64 Thanks Heiko > > --- > > v3: Also remove unneeded include > --- > drivers/iommu/rockchip-iommu.c | 12 +----------- > 1 file changed, 1 insertion(+), 11 deletions(-) > > diff --git a/drivers/iommu/rockchip-iommu.c b/drivers/iommu/rockchip-iommu.c > index 9febfb7f3025..5cb260820eda 100644 > --- a/drivers/iommu/rockchip-iommu.c > +++ b/drivers/iommu/rockchip-iommu.c > @@ -10,7 +10,6 @@ > #include > #include > #include > -#include > #include > #include > #include > @@ -1074,10 +1073,6 @@ static struct iommu_domain *rk_iommu_domain_alloc(unsigned type) > if (!rk_domain) > return NULL; > > - if (type == IOMMU_DOMAIN_DMA && > - iommu_get_dma_cookie(&rk_domain->domain)) > - goto err_free_domain; > - > /* > * rk32xx iommus use a 2 level pagetable. > * Each level1 (dt) and level2 (pt) table has 1024 4-byte entries. > @@ -1085,7 +1080,7 @@ static struct iommu_domain *rk_iommu_domain_alloc(unsigned type) > */ > rk_domain->dt = (u32 *)get_zeroed_page(GFP_KERNEL | GFP_DMA32); > if (!rk_domain->dt) > - goto err_put_cookie; > + goto err_free_domain; > > rk_domain->dt_dma = dma_map_single(dma_dev, rk_domain->dt, > SPAGE_SIZE, DMA_TO_DEVICE); > @@ -1106,9 +1101,6 @@ static struct iommu_domain *rk_iommu_domain_alloc(unsigned type) > > err_free_dt: > free_page((unsigned long)rk_domain->dt); > -err_put_cookie: > - if (type == IOMMU_DOMAIN_DMA) > - iommu_put_dma_cookie(&rk_domain->domain); > err_free_domain: > kfree(rk_domain); > > @@ -1137,8 +1129,6 @@ static void rk_iommu_domain_free(struct iommu_domain *domain) > SPAGE_SIZE, DMA_TO_DEVICE); > free_page((unsigned long)rk_domain->dt); > > - if (domain->type == IOMMU_DOMAIN_DMA) > - iommu_put_dma_cookie(&rk_domain->domain); > kfree(rk_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=-14.4 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,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable 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 23F27C4338F for ; Wed, 4 Aug 2021 18:54:50 +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 728C760F58 for ; Wed, 4 Aug 2021 18:54:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 728C760F58 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=sntech.de 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-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=aIeEAL2U63rEEuCslnA9DQLdowZGHJLQvUkcTNcIOCc=; b=af52jStaGsyv0W DhTF4hnCIHkiHMDZyhOQKDXgHcqaMfXFS3kUF53rXSiJui0deUt69udMqV95ZUE7ChNuxW60BEoiT c27tiFwbCZj9p8K1B8dOzpN0LUvOXh+JeR6n+TtWM6ceohy380LfBNhCiKClSg331wNY8WTgCiS6p klUZETutNPZbByR74BaZ/CeTBVVXPoS0LMTtAb6Qb0vnW/RZzkpiUFAQM6fYE4k5fHoUNkfBXLn5M enLog/AwYeXoASzSVTk+BqzaC7iCwTnmUTj2zH7Tk8pLVuy67BcRorx0WxLIjT6uFnrz0fBBbfzTW XenkI+HB65ijI1Yw21Qg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mBM1Q-007EFr-Ad; Wed, 04 Aug 2021 18:53:44 +0000 Received: from gloria.sntech.de ([185.11.138.130]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mBM1M-007EF6-UE for linux-arm-kernel@lists.infradead.org; Wed, 04 Aug 2021 18:53:42 +0000 Received: from ip5f5aa64a.dynamic.kabel-deutschland.de ([95.90.166.74] helo=diego.localnet) by gloria.sntech.de with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mBM1J-0002cI-Lo; Wed, 04 Aug 2021 20:53:37 +0200 From: Heiko =?ISO-8859-1?Q?St=FCbner?= To: joro@8bytes.org, will@kernel.org, Robin Murphy 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: Re: [PATCH v3 08/25] iommu/rockchip: Drop IOVA cookie management Date: Wed, 04 Aug 2021 20:53:36 +0200 Message-ID: <4512656.mogB4TqSGs@diego> In-Reply-To: <0d25511c58981ecd0a1f3006dc1c30a73fb7d377.1628094601.git.robin.murphy@arm.com> References: <0d25511c58981ecd0a1f3006dc1c30a73fb7d377.1628094601.git.robin.murphy@arm.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210804_115341_027876_AE13F303 X-CRM114-Status: GOOD ( 18.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-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Am Mittwoch, 4. August 2021, 19:15:36 CEST schrieb Robin Murphy: > The core code bakes its own cookies now. > > CC: Heiko Stuebner > Signed-off-by: Robin Murphy On a Rockchip rk3288 (arm32), rk3399 (arm64) and px30 (arm64) with the graphics pipeline using the iommu Tested-by: Heiko Stuebner Acked-by: Heiko Stuebner Works now nicely on both arm32 and arm64 Thanks Heiko > > --- > > v3: Also remove unneeded include > --- > drivers/iommu/rockchip-iommu.c | 12 +----------- > 1 file changed, 1 insertion(+), 11 deletions(-) > > diff --git a/drivers/iommu/rockchip-iommu.c b/drivers/iommu/rockchip-iommu.c > index 9febfb7f3025..5cb260820eda 100644 > --- a/drivers/iommu/rockchip-iommu.c > +++ b/drivers/iommu/rockchip-iommu.c > @@ -10,7 +10,6 @@ > #include > #include > #include > -#include > #include > #include > #include > @@ -1074,10 +1073,6 @@ static struct iommu_domain *rk_iommu_domain_alloc(unsigned type) > if (!rk_domain) > return NULL; > > - if (type == IOMMU_DOMAIN_DMA && > - iommu_get_dma_cookie(&rk_domain->domain)) > - goto err_free_domain; > - > /* > * rk32xx iommus use a 2 level pagetable. > * Each level1 (dt) and level2 (pt) table has 1024 4-byte entries. > @@ -1085,7 +1080,7 @@ static struct iommu_domain *rk_iommu_domain_alloc(unsigned type) > */ > rk_domain->dt = (u32 *)get_zeroed_page(GFP_KERNEL | GFP_DMA32); > if (!rk_domain->dt) > - goto err_put_cookie; > + goto err_free_domain; > > rk_domain->dt_dma = dma_map_single(dma_dev, rk_domain->dt, > SPAGE_SIZE, DMA_TO_DEVICE); > @@ -1106,9 +1101,6 @@ static struct iommu_domain *rk_iommu_domain_alloc(unsigned type) > > err_free_dt: > free_page((unsigned long)rk_domain->dt); > -err_put_cookie: > - if (type == IOMMU_DOMAIN_DMA) > - iommu_put_dma_cookie(&rk_domain->domain); > err_free_domain: > kfree(rk_domain); > > @@ -1137,8 +1129,6 @@ static void rk_iommu_domain_free(struct iommu_domain *domain) > SPAGE_SIZE, DMA_TO_DEVICE); > free_page((unsigned long)rk_domain->dt); > > - if (domain->type == IOMMU_DOMAIN_DMA) > - iommu_put_dma_cookie(&rk_domain->domain); > kfree(rk_domain); > } > > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel 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=-13.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 37808C4338F for ; Wed, 4 Aug 2021 18:53:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0EC7360F10 for ; Wed, 4 Aug 2021 18:53:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239574AbhHDSxz (ORCPT ); Wed, 4 Aug 2021 14:53:55 -0400 Received: from gloria.sntech.de ([185.11.138.130]:50092 "EHLO gloria.sntech.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238726AbhHDSxy (ORCPT ); Wed, 4 Aug 2021 14:53:54 -0400 Received: from ip5f5aa64a.dynamic.kabel-deutschland.de ([95.90.166.74] helo=diego.localnet) by gloria.sntech.de with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mBM1J-0002cI-Lo; Wed, 04 Aug 2021 20:53:37 +0200 From: Heiko =?ISO-8859-1?Q?St=FCbner?= To: joro@8bytes.org, will@kernel.org, Robin Murphy 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: Re: [PATCH v3 08/25] iommu/rockchip: Drop IOVA cookie management Date: Wed, 04 Aug 2021 20:53:36 +0200 Message-ID: <4512656.mogB4TqSGs@diego> In-Reply-To: <0d25511c58981ecd0a1f3006dc1c30a73fb7d377.1628094601.git.robin.murphy@arm.com> References: <0d25511c58981ecd0a1f3006dc1c30a73fb7d377.1628094601.git.robin.murphy@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am Mittwoch, 4. August 2021, 19:15:36 CEST schrieb Robin Murphy: > The core code bakes its own cookies now. > > CC: Heiko Stuebner > Signed-off-by: Robin Murphy On a Rockchip rk3288 (arm32), rk3399 (arm64) and px30 (arm64) with the graphics pipeline using the iommu Tested-by: Heiko Stuebner Acked-by: Heiko Stuebner Works now nicely on both arm32 and arm64 Thanks Heiko > > --- > > v3: Also remove unneeded include > --- > drivers/iommu/rockchip-iommu.c | 12 +----------- > 1 file changed, 1 insertion(+), 11 deletions(-) > > diff --git a/drivers/iommu/rockchip-iommu.c b/drivers/iommu/rockchip-iommu.c > index 9febfb7f3025..5cb260820eda 100644 > --- a/drivers/iommu/rockchip-iommu.c > +++ b/drivers/iommu/rockchip-iommu.c > @@ -10,7 +10,6 @@ > #include > #include > #include > -#include > #include > #include > #include > @@ -1074,10 +1073,6 @@ static struct iommu_domain *rk_iommu_domain_alloc(unsigned type) > if (!rk_domain) > return NULL; > > - if (type == IOMMU_DOMAIN_DMA && > - iommu_get_dma_cookie(&rk_domain->domain)) > - goto err_free_domain; > - > /* > * rk32xx iommus use a 2 level pagetable. > * Each level1 (dt) and level2 (pt) table has 1024 4-byte entries. > @@ -1085,7 +1080,7 @@ static struct iommu_domain *rk_iommu_domain_alloc(unsigned type) > */ > rk_domain->dt = (u32 *)get_zeroed_page(GFP_KERNEL | GFP_DMA32); > if (!rk_domain->dt) > - goto err_put_cookie; > + goto err_free_domain; > > rk_domain->dt_dma = dma_map_single(dma_dev, rk_domain->dt, > SPAGE_SIZE, DMA_TO_DEVICE); > @@ -1106,9 +1101,6 @@ static struct iommu_domain *rk_iommu_domain_alloc(unsigned type) > > err_free_dt: > free_page((unsigned long)rk_domain->dt); > -err_put_cookie: > - if (type == IOMMU_DOMAIN_DMA) > - iommu_put_dma_cookie(&rk_domain->domain); > err_free_domain: > kfree(rk_domain); > > @@ -1137,8 +1129,6 @@ static void rk_iommu_domain_free(struct iommu_domain *domain) > SPAGE_SIZE, DMA_TO_DEVICE); > free_page((unsigned long)rk_domain->dt); > > - if (domain->type == IOMMU_DOMAIN_DMA) > - iommu_put_dma_cookie(&rk_domain->domain); > kfree(rk_domain); > } > >