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=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no 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 B6AE4C4727E for ; Mon, 21 Sep 2020 21:53:30 +0000 (UTC) Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (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 E014F23A61 for ; Mon, 21 Sep 2020 21:53:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E014F23A61 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=iommu-bounces@lists.linux-foundation.org Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 574BD834E1; Mon, 21 Sep 2020 21:53:29 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id lva96wUC-tDf; Mon, 21 Sep 2020 21:53:28 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by fraxinus.osuosl.org (Postfix) with ESMTP id B27568128F; Mon, 21 Sep 2020 21:53:28 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 8CD38C0889; Mon, 21 Sep 2020 21:53:28 +0000 (UTC) Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by lists.linuxfoundation.org (Postfix) with ESMTP id 3394DC0051 for ; Mon, 21 Sep 2020 21:53:27 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 2F68185886 for ; Mon, 21 Sep 2020 21:53:27 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id g9Mj6GP2EEiE for ; Mon, 21 Sep 2020 21:53:26 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by fraxinus.osuosl.org (Postfix) with ESMTP id 54695857BF for ; Mon, 21 Sep 2020 21:53:26 +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 99CAC147A; Mon, 21 Sep 2020 14:53:25 -0700 (PDT) Received: from [10.57.50.108] (unknown [10.57.50.108]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id CBDDA3F73B; Mon, 21 Sep 2020 14:53:23 -0700 (PDT) Subject: Re: [PATCH 1/3] iommu/io-pgtable-arm: Support coherency for Mali LPAE To: Will Deacon References: <20200921175717.GF3141@willie-the-truck> From: Robin Murphy Message-ID: <71cc6c53-7bd1-da1a-05fa-8172510b33d8@arm.com> Date: Mon, 21 Sep 2020 22:53:23 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:78.0) Gecko/20100101 Thunderbird/78.2.2 MIME-Version: 1.0 In-Reply-To: <20200921175717.GF3141@willie-the-truck> Content-Language: en-GB Cc: robh@kernel.org, tomeu.vizoso@collabora.com, narmstrong@baylibre.com, khilman@baylibre.com, dri-devel@lists.freedesktop.org, steven.price@arm.com, iommu@lists.linux-foundation.org, alyssa.rosenzweig@collabora.com, linux-amlogic@lists.infradead.org, linux-arm-kernel@lists.infradead.org, jbrunet@baylibre.com 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 2020-09-21 18:57, Will Deacon wrote: > On Wed, Sep 16, 2020 at 12:51:05AM +0100, Robin Murphy wrote: >> Midgard GPUs have ACE-Lite master interfaces which allows systems to >> integrate them in an I/O-coherent manner. It seems that from the GPU's >> viewpoint, the rest of the system is its outer shareable domain, and so >> even when snoop signals are wired up, they are only emitted for outer >> shareable accesses. As such, setting the TTBR_SHARE_OUTER bit does >> indeed get coherent pagetable walks working nicely for the coherent >> T620 in the Arm Juno SoC. > > I can't help but think some of this commentary deserves to be in the code > as well. Sure, if you want. > Do you know if this sort of thing is done for other SoCs too, or is this > just a Juno quirk? Yup, this is a "Midgard working as designed" thing. Juno is the coherent example I have to hand, but off the top of my head I believe some of the Exynos SoCs can also use their GPUs coherently if a switch is flipped in the interconnect to change routing between the CCI and a direct-to-RAM path; I expect there are probably further Midgard examples that I'm not aware of. Then there are definitely coherent Bifrost GPUs like the Amlogic S922/A311 that prompted me to revive this patch, which we currently drive in "Legacy" mode and thus behave the same way as Midgard (Bifrost's "AArch64" mode realigns Ish and Osh with the rest of the system, and instead invents a new "Internal Shareable" value in between Nsh and Ish to represent the shareability between cores within the GPU for which Midgard hijacked Ish). Robin. _______________________________________________ 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=-6.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no 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 07073C4727C for ; Mon, 21 Sep 2020 21:55:40 +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 8FB1C20709 for ; Mon, 21 Sep 2020 21:55:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="1iDV1NUk" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8FB1C20709 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com 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-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=wpKKrgjgIro1hTMghnw5MZNg+y+9K4lGo8qMtqK11rA=; b=1iDV1NUkH00U/Mzh4tOHuyFh+ UiY5P4KTKai8klLxr+kURTzyKnLRDoe12SPP8o6r1xwa+rT5SswApQxX071em0i6wUOKgoMw6yGpX 3hBLq3HqJjnV2G7DbPy6W238pcZw7SmBm+PUPptglRSNjoFIW+xHMTJtxy+rAeXZB1+f4+YrETpJR 5bijQd9oxnjdpgCaD6ABkD4zX64lyFCr94ECStApS7BCvhLqPZSm472cYpku2BAdtxnrwUmESxMNj 2mIyasFARo8LxCAm23Lw53032Hvx33fnMTbERyrw46uA5f0d1e2EaVkGAVsXUnlTPenQKXXH8CNfQ 4pEPHkjYw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kKTkf-0005Zh-LP; Mon, 21 Sep 2020 21:53:37 +0000 Received: from foss.arm.com ([217.140.110.172]) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kKTkb-0005Y7-M2; Mon, 21 Sep 2020 21:53:34 +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 99CAC147A; Mon, 21 Sep 2020 14:53:25 -0700 (PDT) Received: from [10.57.50.108] (unknown [10.57.50.108]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id CBDDA3F73B; Mon, 21 Sep 2020 14:53:23 -0700 (PDT) Subject: Re: [PATCH 1/3] iommu/io-pgtable-arm: Support coherency for Mali LPAE To: Will Deacon References: <20200921175717.GF3141@willie-the-truck> From: Robin Murphy Message-ID: <71cc6c53-7bd1-da1a-05fa-8172510b33d8@arm.com> Date: Mon, 21 Sep 2020 22:53:23 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:78.0) Gecko/20100101 Thunderbird/78.2.2 MIME-Version: 1.0 In-Reply-To: <20200921175717.GF3141@willie-the-truck> Content-Language: en-GB X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200921_175334_114410_1CBE0B98 X-CRM114-Status: GOOD ( 19.06 ) 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: robh@kernel.org, tomeu.vizoso@collabora.com, narmstrong@baylibre.com, khilman@baylibre.com, dri-devel@lists.freedesktop.org, steven.price@arm.com, iommu@lists.linux-foundation.org, alyssa.rosenzweig@collabora.com, linux-amlogic@lists.infradead.org, linux-arm-kernel@lists.infradead.org, jbrunet@baylibre.com 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 2020-09-21 18:57, Will Deacon wrote: > On Wed, Sep 16, 2020 at 12:51:05AM +0100, Robin Murphy wrote: >> Midgard GPUs have ACE-Lite master interfaces which allows systems to >> integrate them in an I/O-coherent manner. It seems that from the GPU's >> viewpoint, the rest of the system is its outer shareable domain, and so >> even when snoop signals are wired up, they are only emitted for outer >> shareable accesses. As such, setting the TTBR_SHARE_OUTER bit does >> indeed get coherent pagetable walks working nicely for the coherent >> T620 in the Arm Juno SoC. > > I can't help but think some of this commentary deserves to be in the code > as well. Sure, if you want. > Do you know if this sort of thing is done for other SoCs too, or is this > just a Juno quirk? Yup, this is a "Midgard working as designed" thing. Juno is the coherent example I have to hand, but off the top of my head I believe some of the Exynos SoCs can also use their GPUs coherently if a switch is flipped in the interconnect to change routing between the CCI and a direct-to-RAM path; I expect there are probably further Midgard examples that I'm not aware of. Then there are definitely coherent Bifrost GPUs like the Amlogic S922/A311 that prompted me to revive this patch, which we currently drive in "Legacy" mode and thus behave the same way as Midgard (Bifrost's "AArch64" mode realigns Ish and Osh with the rest of the system, and instead invents a new "Internal Shareable" value in between Nsh and Ish to represent the shareability between cores within the GPU for which Midgard hijacked Ish). Robin. _______________________________________________ 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=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no 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 ACF31C4727D for ; Mon, 21 Sep 2020 21:53:30 +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 4B0E423A62 for ; Mon, 21 Sep 2020 21:53:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4B0E423A62 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com 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 058786E598; Mon, 21 Sep 2020 21:53:29 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by gabe.freedesktop.org (Postfix) with ESMTP id 84CD66E598 for ; Mon, 21 Sep 2020 21:53:26 +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 99CAC147A; Mon, 21 Sep 2020 14:53:25 -0700 (PDT) Received: from [10.57.50.108] (unknown [10.57.50.108]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id CBDDA3F73B; Mon, 21 Sep 2020 14:53:23 -0700 (PDT) Subject: Re: [PATCH 1/3] iommu/io-pgtable-arm: Support coherency for Mali LPAE To: Will Deacon References: <20200921175717.GF3141@willie-the-truck> From: Robin Murphy Message-ID: <71cc6c53-7bd1-da1a-05fa-8172510b33d8@arm.com> Date: Mon, 21 Sep 2020 22:53:23 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:78.0) Gecko/20100101 Thunderbird/78.2.2 MIME-Version: 1.0 In-Reply-To: <20200921175717.GF3141@willie-the-truck> Content-Language: en-GB 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: tomeu.vizoso@collabora.com, narmstrong@baylibre.com, khilman@baylibre.com, dri-devel@lists.freedesktop.org, steven.price@arm.com, iommu@lists.linux-foundation.org, alyssa.rosenzweig@collabora.com, linux-amlogic@lists.infradead.org, linux-arm-kernel@lists.infradead.org, jbrunet@baylibre.com Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On 2020-09-21 18:57, Will Deacon wrote: > On Wed, Sep 16, 2020 at 12:51:05AM +0100, Robin Murphy wrote: >> Midgard GPUs have ACE-Lite master interfaces which allows systems to >> integrate them in an I/O-coherent manner. It seems that from the GPU's >> viewpoint, the rest of the system is its outer shareable domain, and so >> even when snoop signals are wired up, they are only emitted for outer >> shareable accesses. As such, setting the TTBR_SHARE_OUTER bit does >> indeed get coherent pagetable walks working nicely for the coherent >> T620 in the Arm Juno SoC. > > I can't help but think some of this commentary deserves to be in the code > as well. Sure, if you want. > Do you know if this sort of thing is done for other SoCs too, or is this > just a Juno quirk? Yup, this is a "Midgard working as designed" thing. Juno is the coherent example I have to hand, but off the top of my head I believe some of the Exynos SoCs can also use their GPUs coherently if a switch is flipped in the interconnect to change routing between the CCI and a direct-to-RAM path; I expect there are probably further Midgard examples that I'm not aware of. Then there are definitely coherent Bifrost GPUs like the Amlogic S922/A311 that prompted me to revive this patch, which we currently drive in "Legacy" mode and thus behave the same way as Midgard (Bifrost's "AArch64" mode realigns Ish and Osh with the rest of the system, and instead invents a new "Internal Shareable" value in between Nsh and Ish to represent the shareability between cores within the GPU for which Midgard hijacked Ish). Robin. _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel 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=-6.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no 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 10CECC4727D for ; Mon, 21 Sep 2020 21:53:51 +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 3668C23A60 for ; Mon, 21 Sep 2020 21:53:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="iTCje3Q0" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3668C23A60 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-amlogic-bounces+linux-amlogic=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-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=hvYRCycpzGyvU/FTo7wn00fLFEheM9PMUqFiIj4xyb4=; b=iTCje3Q0fEeT9kfaZ3iPR9WV1 wNAOOAWHZZJa6pYjyNDlDaP5sRp/RP53gJldQj8nCq4IB9StVrloeH+P4k0wC1J8U5wUuvlqiEq9i LFQ+hHvnav4ujKAMJXC2C0GhrsIsDNQvL6KGP7oW7zeqYQltgGvUsOj98XfqJs3h8471Zk/Hv4fpO lXeagl2Rv8RU0EhrDJOQZqV+IhR9u2m1RoSRw4sDdKlwq8ZKHcWQ7Pt8MiDn17NqIvGBGZrB0OZSD 5UetaROkgLdN5S+Y/4dZ+0N0M9vgy8ByPEFJCJcIwn29Tka3p6IJfjqjGho18VYXFQMKU81FbMskC qKlOieceQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kKTkd-0005Z6-Sx; Mon, 21 Sep 2020 21:53:35 +0000 Received: from foss.arm.com ([217.140.110.172]) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kKTkb-0005Y7-M2; Mon, 21 Sep 2020 21:53:34 +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 99CAC147A; Mon, 21 Sep 2020 14:53:25 -0700 (PDT) Received: from [10.57.50.108] (unknown [10.57.50.108]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id CBDDA3F73B; Mon, 21 Sep 2020 14:53:23 -0700 (PDT) Subject: Re: [PATCH 1/3] iommu/io-pgtable-arm: Support coherency for Mali LPAE To: Will Deacon References: <20200921175717.GF3141@willie-the-truck> From: Robin Murphy Message-ID: <71cc6c53-7bd1-da1a-05fa-8172510b33d8@arm.com> Date: Mon, 21 Sep 2020 22:53:23 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:78.0) Gecko/20100101 Thunderbird/78.2.2 MIME-Version: 1.0 In-Reply-To: <20200921175717.GF3141@willie-the-truck> Content-Language: en-GB X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200921_175334_114410_1CBE0B98 X-CRM114-Status: GOOD ( 19.06 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: robh@kernel.org, tomeu.vizoso@collabora.com, narmstrong@baylibre.com, khilman@baylibre.com, dri-devel@lists.freedesktop.org, steven.price@arm.com, iommu@lists.linux-foundation.org, alyssa.rosenzweig@collabora.com, linux-amlogic@lists.infradead.org, linux-arm-kernel@lists.infradead.org, jbrunet@baylibre.com Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org On 2020-09-21 18:57, Will Deacon wrote: > On Wed, Sep 16, 2020 at 12:51:05AM +0100, Robin Murphy wrote: >> Midgard GPUs have ACE-Lite master interfaces which allows systems to >> integrate them in an I/O-coherent manner. It seems that from the GPU's >> viewpoint, the rest of the system is its outer shareable domain, and so >> even when snoop signals are wired up, they are only emitted for outer >> shareable accesses. As such, setting the TTBR_SHARE_OUTER bit does >> indeed get coherent pagetable walks working nicely for the coherent >> T620 in the Arm Juno SoC. > > I can't help but think some of this commentary deserves to be in the code > as well. Sure, if you want. > Do you know if this sort of thing is done for other SoCs too, or is this > just a Juno quirk? Yup, this is a "Midgard working as designed" thing. Juno is the coherent example I have to hand, but off the top of my head I believe some of the Exynos SoCs can also use their GPUs coherently if a switch is flipped in the interconnect to change routing between the CCI and a direct-to-RAM path; I expect there are probably further Midgard examples that I'm not aware of. Then there are definitely coherent Bifrost GPUs like the Amlogic S922/A311 that prompted me to revive this patch, which we currently drive in "Legacy" mode and thus behave the same way as Midgard (Bifrost's "AArch64" mode realigns Ish and Osh with the rest of the system, and instead invents a new "Internal Shareable" value in between Nsh and Ish to represent the shareability between cores within the GPU for which Midgard hijacked Ish). Robin. _______________________________________________ linux-amlogic mailing list linux-amlogic@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-amlogic