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=-17.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,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 CE15EC64E7C for ; Mon, 23 Nov 2020 15:19:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7B89820729 for ; Mon, 23 Nov 2020 15:19:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="TGvdR7b3" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388759AbgKWPTh (ORCPT ); Mon, 23 Nov 2020 10:19:37 -0500 Received: from mail.kernel.org ([198.145.29.99]:34226 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732214AbgKWPTh (ORCPT ); Mon, 23 Nov 2020 10:19:37 -0500 Received: from willie-the-truck (236.31.169.217.in-addr.arpa [217.169.31.236]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B1F1C20782; Mon, 23 Nov 2020 15:19:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1606144777; bh=HkinMwp5K7ka06g0utiNxu3rxootZ1+V4T5exYOBO1c=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=TGvdR7b3KxTd/HWyy+y0XK9/hi6aL9HGe3tNeV7FSJbrOAe//4MfArc0FZhcJ3x79 AYH5VvqqGpyxDiKdwz0xS9id3+SwCuhW1kd4x4GLKDzv3Jx7e/LfgDxeI1T4JmUDRG bVUNty5vcumpqly04CNjjfJlC4/q2zUXA6or6+LA= Date: Mon, 23 Nov 2020 15:19:31 +0000 From: Will Deacon To: Sai Prakash Ranjan Cc: Robin Murphy , Joerg Roedel , Jordan Crouse , Rob Clark , Akhil P Oommen , freedreno@lists.freedesktop.org, "Kristian H . Kristensen" , dri-devel@lists.freedesktop.org, iommu@lists.linux-foundation.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: Re: [PATCHv8 3/8] iommu/arm-smmu: Move non-strict mode to use domain_attr_io_pgtbl_cfg Message-ID: <20201123151930.GD11033@willie-the-truck> References: <672a1cf7bbfc43ab401a2c157dafa0e9099e67a2.1605621785.git.saiprakash.ranjan@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <672a1cf7bbfc43ab401a2c157dafa0e9099e67a2.1605621785.git.saiprakash.ranjan@codeaurora.org> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org On Tue, Nov 17, 2020 at 08:00:42PM +0530, Sai Prakash Ranjan wrote: > Now that we have a struct domain_attr_io_pgtbl_cfg with quirks, > use that for non_strict mode as well thereby removing the need > for more members of arm_smmu_domain in the future. > > Signed-off-by: Sai Prakash Ranjan > --- > drivers/iommu/arm/arm-smmu/arm-smmu.c | 7 ++----- > drivers/iommu/arm/arm-smmu/arm-smmu.h | 1 - > 2 files changed, 2 insertions(+), 6 deletions(-) > > diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu.c b/drivers/iommu/arm/arm-smmu/arm-smmu.c > index 7b05782738e2..5f066a1b7221 100644 > --- a/drivers/iommu/arm/arm-smmu/arm-smmu.c > +++ b/drivers/iommu/arm/arm-smmu/arm-smmu.c > @@ -786,9 +786,6 @@ static int arm_smmu_init_domain_context(struct iommu_domain *domain, > goto out_clear_smmu; > } > > - if (smmu_domain->non_strict) > - pgtbl_cfg.quirks |= IO_PGTABLE_QUIRK_NON_STRICT; > - > if (smmu_domain->pgtbl_cfg.quirks) > pgtbl_cfg.quirks |= smmu_domain->pgtbl_cfg.quirks; > > @@ -1527,7 +1524,7 @@ static int arm_smmu_domain_get_attr(struct iommu_domain *domain, > case IOMMU_DOMAIN_DMA: > switch (attr) { > case DOMAIN_ATTR_DMA_USE_FLUSH_QUEUE: > - *(int *)data = smmu_domain->non_strict; > + *(int *)data = smmu_domain->pgtbl_cfg.quirks; Probably better to compare with IO_PGTABLE_QUIRK_NON_STRICT here even though we only support this one quirk for DMA domains atm. Will 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.3 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, 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 D13E6C2D0E4 for ; Mon, 23 Nov 2020 15:19:39 +0000 (UTC) Received: from hemlock.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 515C7208DB for ; Mon, 23 Nov 2020 15:19:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="TGvdR7b3" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 515C7208DB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=iommu-bounces@lists.linux-foundation.org Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id E1FF2870F7; Mon, 23 Nov 2020 15:19:38 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6fg3AN0LFWkg; Mon, 23 Nov 2020 15:19:38 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by hemlock.osuosl.org (Postfix) with ESMTP id 6F1D1870EB; Mon, 23 Nov 2020 15:19:38 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 64617C0891; Mon, 23 Nov 2020 15:19:38 +0000 (UTC) Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by lists.linuxfoundation.org (Postfix) with ESMTP id EF6CDC0052 for ; Mon, 23 Nov 2020 15:19:37 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id DB01D8575A for ; Mon, 23 Nov 2020 15:19:37 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tH2CAjY8A0oT for ; Mon, 23 Nov 2020 15:19:37 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by whitealder.osuosl.org (Postfix) with ESMTPS id 5D595856ED for ; Mon, 23 Nov 2020 15:19:37 +0000 (UTC) Received: from willie-the-truck (236.31.169.217.in-addr.arpa [217.169.31.236]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B1F1C20782; Mon, 23 Nov 2020 15:19:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1606144777; bh=HkinMwp5K7ka06g0utiNxu3rxootZ1+V4T5exYOBO1c=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=TGvdR7b3KxTd/HWyy+y0XK9/hi6aL9HGe3tNeV7FSJbrOAe//4MfArc0FZhcJ3x79 AYH5VvqqGpyxDiKdwz0xS9id3+SwCuhW1kd4x4GLKDzv3Jx7e/LfgDxeI1T4JmUDRG bVUNty5vcumpqly04CNjjfJlC4/q2zUXA6or6+LA= Date: Mon, 23 Nov 2020 15:19:31 +0000 From: Will Deacon To: Sai Prakash Ranjan Subject: Re: [PATCHv8 3/8] iommu/arm-smmu: Move non-strict mode to use domain_attr_io_pgtbl_cfg Message-ID: <20201123151930.GD11033@willie-the-truck> References: <672a1cf7bbfc43ab401a2c157dafa0e9099e67a2.1605621785.git.saiprakash.ranjan@codeaurora.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <672a1cf7bbfc43ab401a2c157dafa0e9099e67a2.1605621785.git.saiprakash.ranjan@codeaurora.org> User-Agent: Mutt/1.10.1 (2018-07-13) Cc: linux-kernel@vger.kernel.org, Robin Murphy , dri-devel@lists.freedesktop.org, Akhil P Oommen , iommu@lists.linux-foundation.org, "Kristian H . Kristensen" , linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org, 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" On Tue, Nov 17, 2020 at 08:00:42PM +0530, Sai Prakash Ranjan wrote: > Now that we have a struct domain_attr_io_pgtbl_cfg with quirks, > use that for non_strict mode as well thereby removing the need > for more members of arm_smmu_domain in the future. > > Signed-off-by: Sai Prakash Ranjan > --- > drivers/iommu/arm/arm-smmu/arm-smmu.c | 7 ++----- > drivers/iommu/arm/arm-smmu/arm-smmu.h | 1 - > 2 files changed, 2 insertions(+), 6 deletions(-) > > diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu.c b/drivers/iommu/arm/arm-smmu/arm-smmu.c > index 7b05782738e2..5f066a1b7221 100644 > --- a/drivers/iommu/arm/arm-smmu/arm-smmu.c > +++ b/drivers/iommu/arm/arm-smmu/arm-smmu.c > @@ -786,9 +786,6 @@ static int arm_smmu_init_domain_context(struct iommu_domain *domain, > goto out_clear_smmu; > } > > - if (smmu_domain->non_strict) > - pgtbl_cfg.quirks |= IO_PGTABLE_QUIRK_NON_STRICT; > - > if (smmu_domain->pgtbl_cfg.quirks) > pgtbl_cfg.quirks |= smmu_domain->pgtbl_cfg.quirks; > > @@ -1527,7 +1524,7 @@ static int arm_smmu_domain_get_attr(struct iommu_domain *domain, > case IOMMU_DOMAIN_DMA: > switch (attr) { > case DOMAIN_ATTR_DMA_USE_FLUSH_QUEUE: > - *(int *)data = smmu_domain->non_strict; > + *(int *)data = smmu_domain->pgtbl_cfg.quirks; Probably better to compare with IO_PGTABLE_QUIRK_NON_STRICT here even though we only support this one quirk for DMA domains atm. Will _______________________________________________ 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=-15.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, 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 A4BB8C2D0E4 for ; Mon, 23 Nov 2020 15:20:05 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 485E620773 for ; Mon, 23 Nov 2020 15:20:05 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="AoRr/du7"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="TGvdR7b3" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 485E620773 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=FHhrtkc7P27a6fWXx0NGyTNVQ2FC70dym9Tv9POFvto=; b=AoRr/du7cNnMxZ6qXssD8evn6 XJChs74oIQH43XjIVSlkR3esjTUGX7P6YjSN8+d4ZMUFw52YUFu96XQ0YWQU3n3Z9ABcHTAQuXcw4 ycRs0v9YykwyIpLIt4fRITuZ5qpARwBp195AnCp1cQYmdxsrtTBfw5goUxGlN/wgAyYK941VUI6lg 13JTyEBSDlIl5OuIX7NjmifG/0Gzm6Ku42SVXXvrT98YduUNAyX4LbTlgCc1bp0JI/rqO0AgynoRS xzCiwvb/1701flKZRhTVBD8cyEbqfXMq8a+ljwEZY6OSHq07FqXWcIIvDip+V/evXYOol4AUdHc28 jSoMU/vJg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1khDcz-0005z5-JC; Mon, 23 Nov 2020 15:19:41 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1khDcv-0005y1-R1 for linux-arm-kernel@lists.infradead.org; Mon, 23 Nov 2020 15:19:38 +0000 Received: from willie-the-truck (236.31.169.217.in-addr.arpa [217.169.31.236]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B1F1C20782; Mon, 23 Nov 2020 15:19:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1606144777; bh=HkinMwp5K7ka06g0utiNxu3rxootZ1+V4T5exYOBO1c=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=TGvdR7b3KxTd/HWyy+y0XK9/hi6aL9HGe3tNeV7FSJbrOAe//4MfArc0FZhcJ3x79 AYH5VvqqGpyxDiKdwz0xS9id3+SwCuhW1kd4x4GLKDzv3Jx7e/LfgDxeI1T4JmUDRG bVUNty5vcumpqly04CNjjfJlC4/q2zUXA6or6+LA= Date: Mon, 23 Nov 2020 15:19:31 +0000 From: Will Deacon To: Sai Prakash Ranjan Subject: Re: [PATCHv8 3/8] iommu/arm-smmu: Move non-strict mode to use domain_attr_io_pgtbl_cfg Message-ID: <20201123151930.GD11033@willie-the-truck> References: <672a1cf7bbfc43ab401a2c157dafa0e9099e67a2.1605621785.git.saiprakash.ranjan@codeaurora.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <672a1cf7bbfc43ab401a2c157dafa0e9099e67a2.1605621785.git.saiprakash.ranjan@codeaurora.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201123_101937_969257_4F27F3C0 X-CRM114-Status: GOOD ( 17.21 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org, Robin Murphy , Joerg Roedel , Jordan Crouse , dri-devel@lists.freedesktop.org, Akhil P Oommen , Rob Clark , iommu@lists.linux-foundation.org, "Kristian H . Kristensen" , linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org 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 On Tue, Nov 17, 2020 at 08:00:42PM +0530, Sai Prakash Ranjan wrote: > Now that we have a struct domain_attr_io_pgtbl_cfg with quirks, > use that for non_strict mode as well thereby removing the need > for more members of arm_smmu_domain in the future. > > Signed-off-by: Sai Prakash Ranjan > --- > drivers/iommu/arm/arm-smmu/arm-smmu.c | 7 ++----- > drivers/iommu/arm/arm-smmu/arm-smmu.h | 1 - > 2 files changed, 2 insertions(+), 6 deletions(-) > > diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu.c b/drivers/iommu/arm/arm-smmu/arm-smmu.c > index 7b05782738e2..5f066a1b7221 100644 > --- a/drivers/iommu/arm/arm-smmu/arm-smmu.c > +++ b/drivers/iommu/arm/arm-smmu/arm-smmu.c > @@ -786,9 +786,6 @@ static int arm_smmu_init_domain_context(struct iommu_domain *domain, > goto out_clear_smmu; > } > > - if (smmu_domain->non_strict) > - pgtbl_cfg.quirks |= IO_PGTABLE_QUIRK_NON_STRICT; > - > if (smmu_domain->pgtbl_cfg.quirks) > pgtbl_cfg.quirks |= smmu_domain->pgtbl_cfg.quirks; > > @@ -1527,7 +1524,7 @@ static int arm_smmu_domain_get_attr(struct iommu_domain *domain, > case IOMMU_DOMAIN_DMA: > switch (attr) { > case DOMAIN_ATTR_DMA_USE_FLUSH_QUEUE: > - *(int *)data = smmu_domain->non_strict; > + *(int *)data = smmu_domain->pgtbl_cfg.quirks; Probably better to compare with IO_PGTABLE_QUIRK_NON_STRICT here even though we only support this one quirk for DMA domains atm. Will _______________________________________________ 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=-15.3 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, 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 71462C56202 for ; Mon, 23 Nov 2020 15:19:39 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 0E9A020729 for ; Mon, 23 Nov 2020 15:19:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="TGvdR7b3" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0E9A020729 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5199C89FCC; Mon, 23 Nov 2020 15:19:38 +0000 (UTC) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4721189F92; Mon, 23 Nov 2020 15:19:37 +0000 (UTC) Received: from willie-the-truck (236.31.169.217.in-addr.arpa [217.169.31.236]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B1F1C20782; Mon, 23 Nov 2020 15:19:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1606144777; bh=HkinMwp5K7ka06g0utiNxu3rxootZ1+V4T5exYOBO1c=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=TGvdR7b3KxTd/HWyy+y0XK9/hi6aL9HGe3tNeV7FSJbrOAe//4MfArc0FZhcJ3x79 AYH5VvqqGpyxDiKdwz0xS9id3+SwCuhW1kd4x4GLKDzv3Jx7e/LfgDxeI1T4JmUDRG bVUNty5vcumpqly04CNjjfJlC4/q2zUXA6or6+LA= Date: Mon, 23 Nov 2020 15:19:31 +0000 From: Will Deacon To: Sai Prakash Ranjan Subject: Re: [PATCHv8 3/8] iommu/arm-smmu: Move non-strict mode to use domain_attr_io_pgtbl_cfg Message-ID: <20201123151930.GD11033@willie-the-truck> References: <672a1cf7bbfc43ab401a2c157dafa0e9099e67a2.1605621785.git.saiprakash.ranjan@codeaurora.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <672a1cf7bbfc43ab401a2c157dafa0e9099e67a2.1605621785.git.saiprakash.ranjan@codeaurora.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org, Robin Murphy , Joerg Roedel , dri-devel@lists.freedesktop.org, Akhil P Oommen , iommu@lists.linux-foundation.org, "Kristian H . Kristensen" , linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Tue, Nov 17, 2020 at 08:00:42PM +0530, Sai Prakash Ranjan wrote: > Now that we have a struct domain_attr_io_pgtbl_cfg with quirks, > use that for non_strict mode as well thereby removing the need > for more members of arm_smmu_domain in the future. > > Signed-off-by: Sai Prakash Ranjan > --- > drivers/iommu/arm/arm-smmu/arm-smmu.c | 7 ++----- > drivers/iommu/arm/arm-smmu/arm-smmu.h | 1 - > 2 files changed, 2 insertions(+), 6 deletions(-) > > diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu.c b/drivers/iommu/arm/arm-smmu/arm-smmu.c > index 7b05782738e2..5f066a1b7221 100644 > --- a/drivers/iommu/arm/arm-smmu/arm-smmu.c > +++ b/drivers/iommu/arm/arm-smmu/arm-smmu.c > @@ -786,9 +786,6 @@ static int arm_smmu_init_domain_context(struct iommu_domain *domain, > goto out_clear_smmu; > } > > - if (smmu_domain->non_strict) > - pgtbl_cfg.quirks |= IO_PGTABLE_QUIRK_NON_STRICT; > - > if (smmu_domain->pgtbl_cfg.quirks) > pgtbl_cfg.quirks |= smmu_domain->pgtbl_cfg.quirks; > > @@ -1527,7 +1524,7 @@ static int arm_smmu_domain_get_attr(struct iommu_domain *domain, > case IOMMU_DOMAIN_DMA: > switch (attr) { > case DOMAIN_ATTR_DMA_USE_FLUSH_QUEUE: > - *(int *)data = smmu_domain->non_strict; > + *(int *)data = smmu_domain->pgtbl_cfg.quirks; Probably better to compare with IO_PGTABLE_QUIRK_NON_STRICT here even though we only support this one quirk for DMA domains atm. Will _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel