Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp3685570imm; Wed, 5 Sep 2018 04:26:58 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYHzKbtWm9PN5WVwjYsZDBnd9Frygj8YLVBJqhaktFwA4H05dWIL2aF+FjJK3GpfUkpgsOc X-Received: by 2002:a62:e813:: with SMTP id c19-v6mr39977063pfi.124.1536146818510; Wed, 05 Sep 2018 04:26:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536146818; cv=none; d=google.com; s=arc-20160816; b=oIPdWQ34oZhWPTAyCL388/5YnHKNz1mPAU3zZon5s0EL247x6XIjPV/SXlT8P+nCwR RkYo91uQdpGArTQud1X7WaV2NvpfK1CXLovLEj+9MG0Af6HhCYnnjKacQditEKZwty0T 8coxH18FMERT7kMZB8fI31rO9N7cbdO72vht26nHCg8hZtVQ/3U0E5W+xG3rpwNA7rXq lwEvfr2P3sSpG/ZnR3m2YOokHx7qOiYhrEFRqDU5FreDhDFsY/9W+UiUoriIro25esZI CA/sgxfHzCVUK4LAz5GfXsm/UdflVPCs+EyD2/ziK1qCaPkyRKZ2aSUp/L60be3b0ojb PsEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dmarc-filter :dkim-signature:dkim-signature; bh=YusPpRZpbXRnXuAOKVDzZD0shOrj1DA9Ydy2bDuxG4s=; b=Xsv1kVKzhhUCSmtJ5h5AotX+O+EGlwW7h/Cekx00ZgPVVZPIlto8bTfEF74TziJ68R aeP1yeRN+ipRiLa32CKH4dPYbf4RRpThpsGJqZhodk8Cj53Y7Zw7CXqh/9rSnxDxQVLr 2VzI/JGbeVEFPUEJurjwzUOfPmMy3HyYkDP6nUm0Z3KdyC4FVLnGOniAYjpxGPZnqPyh eYRmGT3nMO8MbLDx4Sq/pCfxSuRLMiJmsMzUzb7QIGSYn/+tTZDZX2u/Y7lVuZq8lKJ6 JcqAZHL1qF7aZ9rPx1RO77f6kEVSpu97AJUSLnxef6tQ5dzGzOCUYk6bJiPC9aRQlEt8 B9zg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=pIPCR5zO; dkim=pass header.i=@codeaurora.org header.s=default header.b=HAw5tfTc; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t8-v6si1627739plo.319.2018.09.05.04.26.43; Wed, 05 Sep 2018 04:26:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=pIPCR5zO; dkim=pass header.i=@codeaurora.org header.s=default header.b=HAw5tfTc; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727698AbeIEPzW (ORCPT + 99 others); Wed, 5 Sep 2018 11:55:22 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:54780 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725868AbeIEPzU (ORCPT ); Wed, 5 Sep 2018 11:55:20 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 7C3926081A; Wed, 5 Sep 2018 11:25:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1536146732; bh=r4wET2phV7PBOYKGIZGI3mCMwfu3Myseg3F8erW5388=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=pIPCR5zOMwCVUlVOMfxMuJSerj/GINu4y3WiluM6lWjf1vMzMh6x0Q/XRmeVgJniO QzCbhU3A4c+cjR257jWD80WA2daYXYrhlREA/oJWqDuIdYEW/JauvqBuf1XRxnn5tr hx2eQbBNcU+Q3Qt6VcoSz7nXvxXMfgRBslF40ujU= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from [10.79.41.39] (blr-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.18.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: vivek.gautam@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 73A3A602AE; Wed, 5 Sep 2018 11:25:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1536146731; bh=r4wET2phV7PBOYKGIZGI3mCMwfu3Myseg3F8erW5388=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=HAw5tfTc/18jqb2/ejEKXOdMSqwlAXyuBxYPHi2n3wJ8MGQEgOxBhI2d2c59jeeul hlh98ajryG5HAfV9MRXuBF4OHXHKEQoHMSZYBwxFr+WzODVgwBoQRHWMgkSRDPc1lH 1s7cBvP/nyx7wctiy0b/HSH6uEqZA7HzY3yBfVIQ= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 73A3A602AE Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=vivek.gautam@codeaurora.org Subject: Re: [PATCH 0/5] Qcom smmu-500 TLB invalidation errata for sdm845 To: Rob Clark Cc: Will Deacon , "list@263.net:IOMMU DRIVERS" , Joerg Roedel , joro@8bytes.org, Andy Gross , Robin Murphy , Bjorn Andersson , "list@263.net:IOMMU DRIVERS" , Joerg Roedel , iommu@lists.linux-foundation.org, Mark Rutland , David Brown , Tomasz Figa , Stephen Boyd , Linux Kernel Mailing List , linux-arm-msm , "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" References: <20180814105528.20592-1-vivek.gautam@codeaurora.org> <20180814114009.GF28664@arm.com> <3f74124c-b09f-a92d-117d-a747d33a4561@codeaurora.org> From: Vivek Gautam Message-ID: <3ac669af-a68e-874f-4c3e-91a2e9f676af@codeaurora.org> Date: Wed, 5 Sep 2018 16:55:22 +0530 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 9/5/2018 3:34 PM, Rob Clark wrote: > On Wed, Sep 5, 2018 at 5:22 AM Vivek Gautam wrote: >> >> On 8/14/2018 5:54 PM, Vivek Gautam wrote: >>> Hi Will, >>> >>> >>> On 8/14/2018 5:10 PM, Will Deacon wrote: >>>> Hi Vivek, >>>> >>>> On Tue, Aug 14, 2018 at 04:25:23PM +0530, Vivek Gautam wrote: >>>>> Qcom's implementation of arm,mmu-500 on sdm845 has a >>>>> functional/performance >>>>> errata [1] because of which the TCU cache look ups are stalled during >>>>> invalidation cycle. This is mitigated by serializing all the >>>>> invalidation >>>>> requests coming to the smmu. >>>> How does this implementation differ from the one supported by >>>> qcom_iommu.c? >>>> I notice you're adding firmware hooks here, which we avoided by >>>> having the >>>> extra driver. Please help me understand which devices exist, how they >>>> differ, and which drivers are intended to support them! >>> IIRC, the qcom_iommu driver was intended to support the static context >>> bank - SID >>> mapping, and is very specific to the smmu-v2 version present on >>> msm8916 soc. >>> However, this is the qcom's mmu-500 implementation specific errata. >>> qcom_iommu >>> will not be able to support mmu-500 configurations. >>> Rob Clark can add more. >>> Let you know what you suggest. >> Rob, can you please comment about how qcom-smmu driver has different >> implementation >> from arm-smmu driver? > sorry, I missed this thread earlier. But yeah, as you mentioned, the > purpose for qcom_iommu.c was to deal with the static context/SID > mapping. > > (I guess it is all just software, and we could make qcom_iommu.c > support dynamic mapping as well, but I think then it starts to > duplicate most of arm_smmu.c, so that doesn't seem like the right > direction) Thanks Rob for the response. I will wait for Will's response on how would he like this support be implemented. Best regards Vivek > > BR, > -R > >> Will, in case we would want to use arm-smmu driver, what would you >> suggest for >> having the firmware hooks? >> Thanks. >> >> Best regards >> Vivek