Message ID | 20230103010903.11181-1-samuel@sholland.org |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp4380910wrt; Mon, 2 Jan 2023 17:11:05 -0800 (PST) X-Google-Smtp-Source: AMrXdXt8UxqvUce78pk/paGQYOtka42IqNv4SWccDoUg9Uoc017G/X4ClPnXPQwFszyrufaMftK8 X-Received: by 2002:a17:906:b150:b0:7c1:2931:2263 with SMTP id bt16-20020a170906b15000b007c129312263mr38369452ejb.71.1672708265095; Mon, 02 Jan 2023 17:11:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672708265; cv=none; d=google.com; s=arc-20160816; b=MG3LSZsvdwASurt24iHkcZyEzWUDsWXeAsqsDZjcbepkZla+GGOtwfA14VPRBVueLO BBEyvFEIci2l+M/rhv3IsqdhUzYdliz9mVNZA3YKkBvaCRHMyOJtXTiesWWBNWZGuKUM 1EF98PbIPIzgoe/3Vv4MPiCY9b9QwNug2f7aFjoqvGD1/KZzf2I73M9ah4DgIBJPYJWr r4OoRzzrimftM33ixCea/R+z54Tg2YaVuBm9FSGSTD+NXdqXHLHz2RzHYRmUw70fE8ea 1s581flSnGMBRQCLDTNxqznKxvGz/3BzS5Yg6X5rNc1I2jL9fGj+lsKCyapnpluRFetk hAKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:feedback-id:dkim-signature :dkim-signature; bh=frVBfqgdXyytW4RDcsNsr65XWbIE8IRHvES+ci0D9gk=; b=OR7tS4JiKr/487EatJ/yVijq9ozZxJPlrrmVGT2q/baeEzIXC6BDgHnA24nav0H93V kAw1vO1lWNGCNmk17Qtmw4zegg8QRRFO+aEcmzucafruBTyfeqpTqWun7gRsUhxFuulu ul2CN2x48U/zGpsXIGF+WFkCgI+Ds+DPLDuLUwk8Gh7BczY6ebIIX7EwcMQRzh+xLwxX O9TaXx2gJMOQeU99s8isk0z/AuX37x2SrDjf5/3NoHQBg11jLY++LloiCmSN0FHu/8l0 BAleNlCQys5wxU1aNYR4Dx9YDhnkBGETv5gU6LEw714MqRpbMuDzZFtft++ryRJ/yqsl R3pg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sholland.org header.s=fm3 header.b=TbcNQ6hM; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=H3+bytyQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sholland.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s3-20020a17090699c300b0084c439a1da6si21986028ejn.137.2023.01.02.17.10.41; Mon, 02 Jan 2023 17:11:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@sholland.org header.s=fm3 header.b=TbcNQ6hM; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=H3+bytyQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sholland.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236513AbjACBJZ (ORCPT <rfc822;tmhikaru@gmail.com> + 99 others); Mon, 2 Jan 2023 20:09:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38696 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231634AbjACBJM (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 2 Jan 2023 20:09:12 -0500 Received: from wout1-smtp.messagingengine.com (wout1-smtp.messagingengine.com [64.147.123.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4636B6462; Mon, 2 Jan 2023 17:09:10 -0800 (PST) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id AA81E3200913; Mon, 2 Jan 2023 20:09:06 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Mon, 02 Jan 2023 20:09:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sholland.org; h= cc:cc:content-transfer-encoding:date:date:from:from:in-reply-to :message-id:mime-version:reply-to:sender:subject:subject:to:to; s=fm3; t=1672708146; x=1672794546; bh=frVBfqgdXyytW4RDcsNsr65XW bIE8IRHvES+ci0D9gk=; b=TbcNQ6hMRQ0js7MXzWW/XTV0UCtSym6MDqyCGKWSO iE7WvW/paXk/HtvkQrNJ+EZLKY4Hg1kkZWdSxz9B/d5mHOwksUHco4JI9bYrM9gx ZbV3TNjMXQBOBm5fbpgh8yHaEiMf68RUmzzgo5JUZ55WV9QsVQ6h5TqAwM7/8Duu ynMjxXhPrR835PmjojpXfa9J1Llpq5oNpvuiucEziWK+KWeuy0rZgvF3QL6KnHtd DhX7hOnxwmPdxs1q/fFadcXmgswt9Z/QPcTxnp8CzCG1O9NSd9nx3YmYXQuYs789 6LQtmv5Dk7+9MRFIZ6F2fZbygb6/hckbWtgXD4jPv2+KQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :feedback-id:feedback-id:from:from:in-reply-to:message-id :mime-version:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1672708146; x=1672794546; bh=frVBfqgdXyytW4RDcsNsr65XWbIE8IRHvES +ci0D9gk=; b=H3+bytyQighzU75PalWI9Uc+ZVdCAoTS6wDS8ONekmGfvArKteG TMI9UR4hR96V7sfddq3/5F+oVALiAHomElZVGya+iWwwLURlBqedHJA2SVo5CRxp NZA0YUIO83QOs3Vvz4giBtjYEefQhZNMuNFlw195uYPnpLk+nuAsXehVcuXUzQcG ruiETmgIYumrwadvP3H/akBRjGVc7Un+YiIsj4bxY+O7FkhAMbwnjM17eOP2scIO ON3nhv+Rb3DvrifbDrCgwghVgepDEXFaJKd9gtynabHKzyW4vptYUU8hxYg1sCbs +CBb0Bpr0Vf4R1/LUMyGsBvNKyZRDzhcQZw== X-ME-Sender: <xms:MYCzY4chcK9aPrGiDc1M6mQiBBdnDtnZXWRKRP2CJaDNSsAcVLSM_Q> <xme:MYCzY6OsR7PQkCisJKesEcpLkRmvSewtJCU1uOp_stMnxIdduJJjp4HfdRmLoqmeF 30nZB-uqSTPMIn1nA> X-ME-Received: <xmr:MYCzY5hLQzJBIdYZdcCZPHefBzzHwa9CMZkkzD5FtLkkNm8XXjXV6fnaVKgVIi9ivoFCwjy4ZCUXveoe6pOvSmEChuM3hVrB5w0LlTHhxJ_Ad-WBn0K5luLo7z_b4MPH-mVN2g> X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrjeefgdeffecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvfevufffkffoggfgsedtkeertdertddtnecuhfhrohhmpefurghmuhgvlhcu jfholhhlrghnugcuoehsrghmuhgvlhesshhhohhllhgrnhgurdhorhhgqeenucggtffrrg htthgvrhhnpeekheffteehtdetfffgfeetteejvdefleeuvedufffguedtjedvheelvddv fffhveenucffohhmrghinhepkhgvrhhnvghlrdhorhhgnecuvehluhhsthgvrhfuihiivg eptdenucfrrghrrghmpehmrghilhhfrhhomhepshgrmhhuvghlsehshhholhhlrghnugdr ohhrgh X-ME-Proxy: <xmx:MYCzY98rlaFHqgdsIqR3G8SSgmIiglY_3ViHRAo64It5XsSPmPIMHQ> <xmx:MYCzY0vMxeEKicSGbfapf2P2Ln_w1um7HeZBkD5Du4q5Tq5gIzWfuQ> <xmx:MYCzY0H6zbYfBGIYiSUWZGxFcm79aJheVR7WSSdy9Q9E4KP-0TRW6Q> <xmx:MoCzY1E4x_YztRQAtpqcWYWn0PgyP3tq8L-y7cn0diLfiMZ9bwPVeA> Feedback-ID: i0ad843c9:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 2 Jan 2023 20:09:04 -0500 (EST) From: Samuel Holland <samuel@sholland.org> To: Joerg Roedel <joro@8bytes.org>, Will Deacon <will@kernel.org>, Robin Murphy <robin.murphy@arm.com>, Chen-Yu Tsai <wens@csie.org>, Jernej Skrabec <jernej.skrabec@gmail.com>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Rob Herring <robh+dt@kernel.org> Cc: iommu@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Maxime Ripard <mripard@kernel.org>, Samuel Holland <samuel@sholland.org> Subject: [PATCH v2 0/6] iommu/sun50i: Allwinner D1 support Date: Mon, 2 Jan 2023 19:08:57 -0600 Message-Id: <20230103010903.11181-1-samuel@sholland.org> X-Mailer: git-send-email 2.37.4 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1753961742065266308?= X-GMAIL-MSGID: =?utf-8?q?1753961742065266308?= |
Series |
iommu/sun50i: Allwinner D1 support
|
|
Message
Samuel Holland
Jan. 3, 2023, 1:08 a.m. UTC
D1 is a RISC-V SoC from Allwinner's sunxi family. This series adds IOMMU binding and driver support. The RISC-V architecture code still needs some small updates to use an IOMMU for DMA[1][2]. I will send those separately. [1]: https://lore.kernel.org/linux-riscv/20220428010401.11323-1-samuel@sholland.org/ [2]: https://lore.kernel.org/linux-riscv/7b09e989-0aa1-a557-485e-572f69caf881@arm.com/ Changes in v2: - Disallow the 'resets' property for the D1 variant - Set bypass based on attached devices instead of using a fixed value Samuel Holland (6): dt-bindings: iommu: sun50i: Add compatible for Allwinner D1 iommu/sun50i: Track masters attached to the domain iommu/sun50i: Keep the bypass register up to date iommu/sun50i: Support variants without an external reset iommu/sun50i: Add support for the D1 variant riscv: dts: allwinner: d1: Add the IOMMU node .../iommu/allwinner,sun50i-h6-iommu.yaml | 20 +++++- .../boot/dts/allwinner/sunxi-d1s-t113.dtsi | 10 +++ drivers/iommu/sun50i-iommu.c | 68 ++++++++++++++----- 3 files changed, 79 insertions(+), 19 deletions(-)
Comments
Hi Samuel, On Mon, Jan 02, 2023 at 07:08:57PM -0600, Samuel Holland wrote: > Samuel Holland (6): > dt-bindings: iommu: sun50i: Add compatible for Allwinner D1 > iommu/sun50i: Track masters attached to the domain > iommu/sun50i: Keep the bypass register up to date > iommu/sun50i: Support variants without an external reset > iommu/sun50i: Add support for the D1 variant > riscv: dts: allwinner: d1: Add the IOMMU node There is a conflict between these patches and changes in the IOMMU core branch. With those merged in there is a compile warning about sun50i_iommu_detach_domain() being unused. Fixing that requires removing of 3-4 functions, which I am not sure is the right solution. I pushed the arm/allwinner branch out to the iommu tree (with the core branch merged in) and exluded it from next for now. Can you please have a look and fix this up in a way that does not break the driver? Once this is fixed I will include the arm/allwinner branch into my next branch again. Thanks, Joerg
Hi Samuel, On Fri, Jan 20, 2023 at 04:11:30PM +0100, Joerg Roedel wrote: > Once this is fixed I will include the arm/allwinner branch into my next > branch again. Since there was no reply to this I nuked the patches from the IOMMU tree. If this is still relevant please resubmit them after the next merge window. Regards, Joerg
Hi Joerg, On 2/3/23 04:21, Joerg Roedel wrote: > On Fri, Jan 20, 2023 at 04:11:30PM +0100, Joerg Roedel wrote: >> There is a conflict between these patches and changes in the IOMMU >> core branch. With those merged in there is a compile warning about >> sun50i_iommu_detach_domain() being unused. Fixing that requires >> removing of 3-4 functions, which I am not sure is the right >> solution. >> >> Once this is fixed I will include the arm/allwinner branch into my >> next branch again. > > Since there was no reply to this I nuked the patches from the IOMMU > tree. If this is still relevant please resubmit them after the next > merge window. I am not sure what the right solution is here either, and I have not had the chance to look at it again. With my limited understanding of how the default domain logic works, and the fact that the IOMMU driver only supports one domain, it seems the driver should keep that domain enabled permanently, regardless of which devices are attached. So my patch 2 would be wrong. I will investigate and send a v3 after the merge window. Regards, Samuel