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 Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 834BAC433EF for ; Tue, 3 May 2022 06:30:42 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 10BB381DA3; Tue, 3 May 2022 06:30:42 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hYpfSZ_XAN4n; Tue, 3 May 2022 06:30:41 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp1.osuosl.org (Postfix) with ESMTPS id F299681DAB; Tue, 3 May 2022 06:30:40 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 0058FC0086; Tue, 3 May 2022 06:30:40 +0000 (UTC) Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by lists.linuxfoundation.org (Postfix) with ESMTP id CC761C007A for ; Tue, 3 May 2022 06:30:37 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id A31F260FD7 for ; Tue, 3 May 2022 06:30:37 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id dXh3rTxjyB9N for ; Tue, 3 May 2022 06:30:36 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from soltyk.jannau.net (soltyk.jannau.net [144.76.91.90]) by smtp3.osuosl.org (Postfix) with ESMTPS id DF7A860FCC for ; Tue, 3 May 2022 06:30:35 +0000 (UTC) Received: from coburn.home.jannau.net (p579ad988.dip0.t-ipconnect.de [87.154.217.136]) by soltyk.jannau.net (Postfix) with ESMTPSA id 0605826E9B2; Tue, 3 May 2022 08:23:01 +0200 (CEST) From: Janne Grunau To: iommu@lists.linux-foundation.org Subject: [PATCH v2 0/4] iommu: M1 Pro/Max DART support Date: Tue, 3 May 2022 08:22:57 +0200 Message-Id: <20220503062301.20872-1-j@jannau.net> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Cc: devicetree@vger.kernel.org, Robin Murphy , Hector Martin , linux-kernel@vger.kernel.org, Rob Herring , linux-arm-kernel@lists.infradead.org, Will Deacon , Alyssa Rosenzweig , Mark Kettenis 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" Hej, I've taken over this series to add support for DART on M1 Pro/Max from Sven. Since v1 we have discovered further differences in the PTE format. It has four differences which makes it incompatible with the one in the M1: - the physical addresses are shifted left by 4 bits and and have 2 more bits inside the PTE entries - the read/write protection flags are at a different position - the subpage protection feature is now mandatory. For Linux we can just configure it to always allow access to the entire page. - BIT(1) tags "uncached" mappings (used for the display controller) The last difference is the most troublesome since it makes the PTE format incomaptible with iopte_type(). Handling this inside io-pgtable-arm.c seems manageable since DART supports just a single block size. It opens the question at which point we decide that DART uses its own io_pgtable_ops. There is second type of DART (t8110) present on M1 Pro/Max SoCs which uses the same PTE format as t6000. Janne Sven Peter (4): dt-bindings: iommu: dart: add t6000 compatible iommu/io-pgtable: Add DART subpage protection support iommu/io-pgtable: Add DART PTE support for t6000 iommu: dart: Support t6000 variant .../devicetree/bindings/iommu/apple,dart.yaml | 4 +- drivers/iommu/apple-dart.c | 24 +++++- drivers/iommu/io-pgtable-arm.c | 76 ++++++++++++++++++- drivers/iommu/io-pgtable.c | 1 + include/linux/io-pgtable.h | 3 + 5 files changed, 101 insertions(+), 7 deletions(-) base-commit: 3123109284176b1532874591f7c81f3837bbdc17 -- 2.35.1 _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu