From patchwork Tue Oct 15 03:14:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan (OSS)" X-Patchwork-Id: 13835689 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 DA113D18140 for ; Tue, 15 Oct 2024 03:07:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Cc:To: Content-Transfer-Encoding:Content-Type:Message-Id:Date:Subject:From:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=yEbcsazzLqwUbZ1m46RZkmjzRa29zyq4Wn07SvqtIdw=; b=dhKw2dpOGpTg7mMOWbmopklYSV VGJg+Y/JcrMYuaHzaEcRirJMzCxj7m0fH2S/ZF6ILjFYDx5vK0tmaPIcIqLsezMQQipbcxLHAJDV9 1DfNHJ5U4/FKTqAUx4IJ9oXO8B8AxSzeZbTcE2FgnYleQwmHTpoCwIde+23yvk/JtONvuVXe7YguG G4O+/4A+H2BQvK/AyaJG+1X61PK7hs3/KJskO3bXZxMAKY17NXqWZUo/IIT07zZgV86BRRlSr6usA unAGVsSkZpYwnscaedwjejWJKFZM9uK6erW0klbo812jEOBdndVIouCzoBG7qui34c2x5Kpx5K8IO LtSvYrUQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t0XuO-00000006xFz-0izo; Tue, 15 Oct 2024 03:07:40 +0000 Received: from mail-db8eur05on20609.outbound.protection.outlook.com ([2a01:111:f403:2614::609] helo=EUR05-DB8-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t0Xsx-00000006x5F-2X8i for linux-arm-kernel@lists.infradead.org; Tue, 15 Oct 2024 03:06:12 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=XByIXhY9v/CZmH46gtZX9jajjuQKnszMwbXEv7KsPNiOTVLCYiKWm5dBs1EP87n76GK0GGEM905YVMtDUBvolLK/UNRUyIGoy4NlKikVBkfpexWFtxg49VkzRnqkYy4OaY4BYWAs0F8FDMJriw0G6rtYEVBDD86LneeyTGYivPTqfoXBuLzfnpmC0gH6F3rYzysArD3lnYaWijIi47leWZVRR8yLTLIlXjvfvEPD2Z1qOsceiWgdxWOA7RR3+othXu70iYhr9whP0coREnSjSDGP9EltRzJRGPy9ImsLgH7AwzOscOOGleMtNcErsQDNgXBdsXvWUIvd/ci++UT7AA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=yEbcsazzLqwUbZ1m46RZkmjzRa29zyq4Wn07SvqtIdw=; b=NmSnCTgWSOpfFsKejFJ8op7RPEfpabORhZxvdt+s4WVrNjtbJ5RIhHHbt+P+Ufplrgbrl9RkinDWBFtQMv/+9QKaAHHgEJFT8weG+8oSLI9mDme1jjJPqA1Wsj2Wc/yYYDIMKUlJZ8VP6c/HUXxBQeW8pmrNSSJOolAKnjvO3vDKho1Os/52e11sBBYra4cvh49wA7xJbZDNoiexDMfkQds7pZaZBkNVpOdLO1Ver17nyIH3pkdmc/qZsf1D2fPTkL5RdVXExrYMefLqbT8mP0Tr6tMxZFuaV0lBGmMDvfl+nCTyJJ9WQSg4GSJtXfeJOho605FgSVHQ+WVrjVOd8g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector1-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=yEbcsazzLqwUbZ1m46RZkmjzRa29zyq4Wn07SvqtIdw=; b=ew3QvEW2DWgBNfGz/lglxGNSyq3M3liWs4soA9FTm0uaI5P01njou+cbOjiTKE1QTqb7TXsfUv47jEZQb565xP+XGIuLV1KeAJo8nOuHjhITgtH2vPBNlTdBzi2OV1/SVplY7MGEMHv5NLf7AjcLPbFCNQa6pkjqL6RO8Dabbvse1qnZ6OMxnytudaItNkT8rDVaYRiKwCkwk+P004lCu6oYPt2GLPMH84V3fVveISC9BTBmD1ui+L8/Ve1jzWwAmJl1zKUcG9NrTmEm17rN8PcTa5tKomkpgNtByk3VpL173YSjGl454gBDFzLenRN5t0xQQqS7MGTbsHaq6KXk5Q== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from PAXPR04MB8459.eurprd04.prod.outlook.com (2603:10a6:102:1da::15) by AS8PR04MB9173.eurprd04.prod.outlook.com (2603:10a6:20b:448::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8048.27; Tue, 15 Oct 2024 03:06:04 +0000 Received: from PAXPR04MB8459.eurprd04.prod.outlook.com ([fe80::165a:30a2:5835:9630]) by PAXPR04MB8459.eurprd04.prod.outlook.com ([fe80::165a:30a2:5835:9630%5]) with mapi id 15.20.8048.020; Tue, 15 Oct 2024 03:06:04 +0000 From: "Peng Fan (OSS)" Subject: [PATCH RFC 0/2] iommu/arm-smmu-v3: bypass streamid zero on i.MX95 Date: Tue, 15 Oct 2024 11:14:41 +0800 Message-Id: <20241015-smmuv3-v1-0-e4b9ed1b5501@nxp.com> X-B4-Tracking: v=1; b=H4sIACHeDWcC/6tWKk4tykwtVrJSqFYqSi3LLM7MzwNyDHUUlJIzE vPSU3UzU4B8JSMDIxNDA0MT3eLc3NIyY11DI4MkI5OkZBMzU0sloOKCotS0zAqwQdFKQW7OSrG 1tQDx/lQtXQAAAA== X-Change-ID: 20241014-smmuv3-120b24bc4659 To: Will Deacon , Robin Murphy , Joerg Roedel , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Joy Zou , linux-arm-kernel@lists.infradead.org, iommu@lists.linux.dev, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Peng Fan , Jason Gunthorpe X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1728962092; l=980; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=yVoN1mzuYlVdHMfLZqf0oQQyfsNjmBG5zsG5zFYvhQE=; b=cHlqGRGtC17rbnhGdR7j7VfslwfGZV2SteeQrC3thpShtBPxVc3KOtzJ0ASSn0cdpABRHt6+o 6GBFv2UdGwlCG7e4nfVRF4qUByEolWlBEddWa6AXi9d0ppdMXbVFZ+a X-Developer-Key: i=peng.fan@nxp.com; a=ed25519; pk=I4sJg7atIT1g63H7bb5lDRGR2gJW14RKDD0wFL8TT1g= X-ClientProxiedBy: SI1PR02CA0026.apcprd02.prod.outlook.com (2603:1096:4:1f4::11) To PAXPR04MB8459.eurprd04.prod.outlook.com (2603:10a6:102:1da::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB8459:EE_|AS8PR04MB9173:EE_ X-MS-Office365-Filtering-Correlation-Id: a0aee22c-555c-41fc-d486-08dcecc64e3b X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|7416014|1800799024|366016|52116014|376014|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?xfoT4y/05cReWP0nx71q+7er3IQP9od?= =?utf-8?q?nIYcqNJmcpi+wSlIDu0VcAXiH+hcdRKcsdixtK6Bzw+HNy0f3DYY1nrpcnRPO39Ej?= =?utf-8?q?iK/OIFTJgQu8xo+Pl5gE1RpH1RiZ0V8SLrJF0gpAbYwFJ7eiW3WCYAXgkUUm6bK/a?= =?utf-8?q?62pV97BCIvu859vhXxe9Eoqxx/h3krl2+938sqSgZm85M+34mMTn+F6x+6nkHgV8g?= =?utf-8?q?qMfLLO8wGqNYYpX4yN4gUIIvWxouXj88BiEvgMk3vjE9/7sZ46jmhT4nKNDPLFGD5?= =?utf-8?q?dM1XGeQDqXSP6S//zPMrJW1Dfrq69zv7CizUNHdX087HV908r/yMcNqGTaUUL7uhY?= =?utf-8?q?67dYmpcLO/BWgM5C/X8orfX/Um7hZzCgOD2uJjNDSCJZhl7pfX3A928NLjXxElNTT?= =?utf-8?q?KMuTtNhFZryT7JjetjiXxRgJf9BYzcOKqSgiMlpSc4lnqDXOsGC2jTbGk5wupp1jg?= =?utf-8?q?betlP2oHXn3kFZEisF5AXqcrV6xZDjjJqXBVNrdqlWfSOFOjTPQOgxf4hiXC+1Sod?= =?utf-8?q?aQEyH1+mXeLnFKSRL0Qy2iDRgNTF+Zn1MkQ50Xwt7wBAh/fcNYSMYbbHmV9g8D7DF?= =?utf-8?q?aDBJMZnmrKiOVZqlx5JwL1Tw7l7tAKons1oq4YCEihnadiueilfwQFgOmpy9emBpD?= =?utf-8?q?AJ+31v1MS9wITh2Y/yqci8HmWxYF8ll47pteh/mUWFQ6uHsTZ5+AVfSS1p21TXgMR?= =?utf-8?q?O82Z6LpduSL5y3GVlF/ZrJkoNj9+FBecqthM3vqOIOUKk+Fxr6eiIJRKVqKsuVcJA?= =?utf-8?q?8udPj/JL50n3xPLrtk+jzXKxfoceeQta3TjVcUIu6SeNrv0xa8+7XpLH5Vv7qXxM6?= =?utf-8?q?2sajMMfvYdVni7FJCgIetexglAUVfOQh/oMyr7OHlxh7SuTZnPwu2tgPUFOEeKTn+?= =?utf-8?q?lgYHyZse+S5Av/EITo0FNR4LX7csxW+meuYkWGQWiAUKHKQhoFrVsEflSwArqjZGD?= =?utf-8?q?De/4X70X3djN4UARJO+6SWuoXXZN4J0a3VhL76XZ4PO+tWJWoXjfel1ODHRHSWRSG?= =?utf-8?q?Dlzaz3H7AtouJZDX9jHVcnwlYB5SN0tS69O3/027TTGKImW6Frcyyr4e+HpeNMz2M?= =?utf-8?q?U9LTXwxE95gsr1lHf+s53hpODLt2VQT/aoUrI/vYwVcSaNWmp4D9klYl+aQDLk6kB?= =?utf-8?q?/FH0p6pPlDSIdqwoC2tYwMv/gVJ9ThdK/5anzfu3LdO82fj5Eb715rOebGuKUQQDV?= =?utf-8?q?qyg6Sz2otTqaVqBZ/9FzAdQvxSo+BSD4Cl/J1Fr3j3LiRt77SAlFZBqO1RSpz0H5D?= =?utf-8?q?S7Yj8kc64KzP3P/WuKWdWxeswoIHwlGVpOg=3D=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB8459.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(7416014)(1800799024)(366016)(52116014)(376014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?f9jqG6sIXvyg+xzg0FLWbAnM9K4i?= =?utf-8?q?1D9lZMpG9rNlp6Sz6Bl+lBTaQ6z/xWoffg5hCchIhwNA8ya6Kn1IFSdk5/0802qSp?= =?utf-8?q?/kO3IRnv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gU2nzTGEtL7hKP2+VBh1i8rvkcnoFaHwgujeb6j4g80EGm?= =?utf-8?q?Vl5HB+4zXO00ypJEbNO4+Hz0Odd5PNnJDb6o4Sd4C+xMndUCIqIxBZPKQQEEoiMQo?= =?utf-8?q?ZKp5XU7D3PHXtxGk7IarbocOPUiIgneDwC+5t96+QTv7/LGJjtl9CQyyAabIh4yDL?= =?utf-8?q?qDUR5fUEVDS8k0yfSsVU65+mKdfmWzvE4eHNJ6Hwccw3cSK/zU+0hZ0QNmbQu6q0e?= =?utf-8?q?B5OukJl5Fxv3uwDf9qE2m6LHAumTTfeGe+e8AoCqAOfBn4V0zsHZ1zXShRpyzaDHI?= =?utf-8?q?58yjv21iSqqj6Yvm5h+bZBKqsuMbAS+Uii+Y3L66iYefUulDXRds7xJK3Bs5NYsyU?= =?utf-8?q?EznwGLIMXhUwRHktuORyg0/VrwdQcyFqpHJmkaT2W+Hn1xW442KyA5PMqRF/yNQK5?= =?utf-8?q?P4HjF5Xe7yZ7+raR5vxEpodAb8SmhxgjMn4wVemzUyYvoF2P4EyyNWXTOjcidPI68?= =?utf-8?q?T9G1Yzt9SbElkr3mh6A0CLGUhTVXj7VXKqfbJhOJ5quJex+aJmyvYiupGB2pn3KzQ?= =?utf-8?q?WPMeM/IXntew?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: a0aee22c-555c-41fc-d486-08dcecc64e3b X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB8459.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Oct 2024 03:06:04.3022 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: NvqDWOTzmdEbRd/exj+LUQNjEPd5kDveoTr72+61gj4QdvFv8FPtcwVafEOjgPLCDQE0hGim5ICSWGHDhKxBVg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB9173 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241014_200611_695087_634AB986 X-CRM114-Status: UNSURE ( 7.65 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org i.MX95 eDMA3 connects to DSU ACP, supporting dma coherent memory to memory operations. However TBU is in the path between eDMA3 and ACP, need to bypass the default SID 0 to make eDMA3 work properly. I was also thinking to introduce "bypass-sids = <0xA 0xB 0xC ...>" to make this reusable for others, but not sure. I could switch to "bypass-sids" if you prefer. Signed-off-by: Peng Fan --- Peng Fan (2): dt-bindings: iommu: arm,smmu-v3: introduce nxp,imx95-bypass-sid-zero iommu/arm-smmu-v3: Bypass SID0 for NXP i.MX95 .../devicetree/bindings/iommu/arm,smmu-v3.yaml | 4 ++++ drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 19 ++++++++++++++++--- drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h | 1 + 3 files changed, 21 insertions(+), 3 deletions(-) --- base-commit: d61a00525464bfc5fe92c6ad713350988e492b88 change-id: 20241014-smmuv3-120b24bc4659 Best regards,