Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1031453pxj; Thu, 17 Jun 2021 20:43:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx3I9m1K7j99A0uULC9QDVmZul01TH2CkI//oeZr8RnlJfqlWambFoxEvKAeemUcbJbfUb8 X-Received: by 2002:a05:6638:267:: with SMTP id x7mr1377889jaq.51.1623987802188; Thu, 17 Jun 2021 20:43:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623987802; cv=none; d=google.com; s=arc-20160816; b=lfLUderJY0KGQ/Ea0vGxyPiMeJbCwFAmJRSw97ldpOVyGFnW7Trj2TqfZ+8KgeCHc1 g1hMGqlZi2Yu4L6LtWpucDmfK4G3nthJYEJtQoxIWTO0PlBAsvQV8RuLEdp2lMvjXZ5g nE+cXxknd7qhoi5Iy1dq4Wmrbv3RxTVZESzUc8wICfHSAxphLcAdWgtpPbBgP/ASosRf bOiP7761YZs3QcRBByUkeSf4ktN/B+CzgjjWNJlX0zVvJSiMCFNpskOXm+kjUGnYBEic xLuXW6iZZfFUPhMIouoBXTpe3NmRpPtmV5XUnokFspZzaCFFHwf4vZSe82zT9b5NREUp idGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:message-id:references:in-reply-to :subject:cc:to:from:date:content-transfer-encoding:mime-version :sender:dkim-signature; bh=YkbRytX69iUvG0ZM+UxVcMo8JSuDp5vDTNk35atHQbA=; b=U2Onf4w0J14nhosTabUBd900l12ASX+owSvjbHb5oC7Rj6VUpnRuQv3P9wQoosatty 44UQ6gxu1A9eTOFRH249obxIAfzFDoWZUb3akD82FNyvC5fTwwCweRjcl7WN3vQo8jh5 5JhDiW8gNeqTm5JVg/JEV+el7J/3YZpCMWKrPfrKVNgxY6khbkDqcJd45oSX1O1WY1Zd suuhZOxtnCpQP1HLL4V97h7F0mFQnALvfpfGiMKyufyQL2C8XTLAN2NvNHd8oPZZLznO gZCpA+TKj3/yKEbH3yVWVzkV+gkgARkOE2sjWaATAjHWQgqgqdf8JRtM2qqrDRKJmN1T eurw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=TAjfjfVW; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u6si991132ilq.55.2021.06.17.20.43.09; Thu, 17 Jun 2021 20:43:22 -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; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=TAjfjfVW; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231250AbhFRCuD (ORCPT + 99 others); Thu, 17 Jun 2021 22:50:03 -0400 Received: from so254-9.mailgun.net ([198.61.254.9]:62759 "EHLO so254-9.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231147AbhFRCuD (ORCPT ); Thu, 17 Jun 2021 22:50:03 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1623984474; h=Message-ID: References: In-Reply-To: Subject: Cc: To: From: Date: Content-Transfer-Encoding: Content-Type: MIME-Version: Sender; bh=YkbRytX69iUvG0ZM+UxVcMo8JSuDp5vDTNk35atHQbA=; b=TAjfjfVWpq4PypVcRhDXi32ot6/HJJ3+W6CqOz0CiANvXJoYmVSn9hpmyQs1g0KujGGa2NCG 7g3deKVwCikaCJsXt6vi2eVc2oJe0bEhc/cvcJ6wYu8Su9N9664jHjUVTX8UIQ8vtEYk4e7+ wMwGr325Rlma5c5pWGPsNVsKAAE= X-Mailgun-Sending-Ip: 198.61.254.9 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n06.prod.us-west-2.postgun.com with SMTP id 60cc0949ed59bf69ccb06a7c (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Fri, 18 Jun 2021 02:47:37 GMT Sender: saiprakash.ranjan=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id E3618C4323A; Fri, 18 Jun 2021 02:47:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=ALL_TRUSTED,BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.codeaurora.org (localhost.localdomain [127.0.0.1]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: saiprakash.ranjan) by smtp.codeaurora.org (Postfix) with ESMTPSA id 4B35DC433F1; Fri, 18 Jun 2021 02:47:36 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Fri, 18 Jun 2021 08:17:36 +0530 From: Sai Prakash Ranjan To: Krishna Reddy Cc: Robin Murphy , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org, Will Deacon , linux-arm-kernel@lists.infradead.org, Thierry Reding Subject: Re: [PATCH] iommu/io-pgtable-arm: Optimize partial walk flush for large scatter-gather list In-Reply-To: References: <20210609145315.25750-1-saiprakash.ranjan@codeaurora.org> <35bfd245-45e2-8083-b620-330d6dbd7bd7@arm.com> <12067ffb8243b220cf03e83aaac3e823@codeaurora.org> <266f190e-99ae-9175-cf13-7a77730af389@arm.com> <61c69d23-324a-85d7-2458-dfff8df9280b@arm.com> <07001b4ed6c0a491eacce6e4dc13ab5e@codeaurora.org> <5eb5146ab51a8fe0b558680d479a26cd@codeaurora.org> <8535b6c757a5584b495f135f4377053c@codeaurora.org> Message-ID: <32cb0645ce80db062291734464c7ef07@codeaurora.org> X-Sender: saiprakash.ranjan@codeaurora.org User-Agent: Roundcube Webmail/1.3.9 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Krishna, On 2021-06-18 02:48, Krishna Reddy wrote: >> Instead of flush_ops in init_context hook, perhaps a io_pgtable quirk >> since this is >> related to tlb, probably a bad name but IO_PGTABLE_QUIRK_TLB_INV which >> will >> be set in init_context impl hook and the prev condition in >> io_pgtable_tlb_flush_walk() >> becomes something like below. Seems very minimal and neat instead of >> poking >> into tlb_flush_walk functions or touching dma strict with some flag? >> >> if (iop->cfg.quirks & IO_PGTABLE_QUIRK_NON_STRICT || >> iop->cfg.quirks & IO_PGTABLE_QUIRK_TLB_INV) { >> iop->cfg.tlb->tlb_flush_all(iop->cookie); >> return; >> } > > Can you name it as IO_PGTABLE_QUIRK_TLB_INV_ASID or > IO_PGTABLE_QUIRK_TLB_INV_ALL_ASID? > tlb_flush_all() callback implementations can use TLBIALL or TLBIASID. so having ASID in the quirk name doesn't sound right given this quirk should be generic enough to be usable on other implementations as well. Instead I will go with IO_PGTABLE_QUIRK_TLB_INV_ALL and will be happy to change if others have some other preference. Thanks, Sai -- QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation