{"id":2231892,"url":"http://patchwork.ozlabs.org/api/1.1/patches/2231892/?format=json","web_url":"http://patchwork.ozlabs.org/project/linux-tegra/patch/3-v1-b7dc0a0d4aa0+3723d-smmu_no_cmdq_ent_jgg@nvidia.com/","project":{"id":21,"url":"http://patchwork.ozlabs.org/api/1.1/projects/21/?format=json","name":"Linux Tegra Development","link_name":"linux-tegra","list_id":"linux-tegra.vger.kernel.org","list_email":"linux-tegra@vger.kernel.org","web_url":null,"scm_url":null,"webscm_url":null},"msgid":"<3-v1-b7dc0a0d4aa0+3723d-smmu_no_cmdq_ent_jgg@nvidia.com>","date":"2026-05-01T14:29:12","name":"[3/9] iommu/arm-smmu-v3: Use the HW arm_smmu_cmd in cmdq submission functions","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"e193cfa6e29592ad8627d723eb60f1de3b62ad44","submitter":{"id":79424,"url":"http://patchwork.ozlabs.org/api/1.1/people/79424/?format=json","name":"Jason Gunthorpe","email":"jgg@nvidia.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/linux-tegra/patch/3-v1-b7dc0a0d4aa0+3723d-smmu_no_cmdq_ent_jgg@nvidia.com/mbox/","series":[{"id":502465,"url":"http://patchwork.ozlabs.org/api/1.1/series/502465/?format=json","web_url":"http://patchwork.ozlabs.org/project/linux-tegra/list/?series=502465","date":"2026-05-01T14:29:09","name":"Remove SMMUv3 struct arm_smmu_cmdq_ent","version":1,"mbox":"http://patchwork.ozlabs.org/series/502465/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2231892/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2231892/checks/","tags":{},"headers":{"Return-Path":"\n <linux-tegra+bounces-14138-incoming=patchwork.ozlabs.org@vger.kernel.org>","X-Original-To":["incoming@patchwork.ozlabs.org","linux-tegra@vger.kernel.org"],"Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=Nvidia.com header.i=@Nvidia.com header.a=rsa-sha256\n header.s=selector2 header.b=LYyIDXyj;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c04:e001:36c::12fc:5321; helo=tor.lore.kernel.org;\n envelope-from=linux-tegra+bounces-14138-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)","smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com\n header.b=\"LYyIDXyj\"","smtp.subspace.kernel.org;\n arc=fail smtp.client-ip=52.101.52.21","smtp.subspace.kernel.org;\n dmarc=pass (p=reject dis=none) header.from=nvidia.com","smtp.subspace.kernel.org;\n spf=fail smtp.mailfrom=nvidia.com","dkim=none (message not signed)\n header.d=none;dmarc=none action=none header.from=nvidia.com;"],"Received":["from tor.lore.kernel.org (tor.lore.kernel.org\n [IPv6:2600:3c04:e001:36c::12fc:5321])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g6YMv3SH8z1yHZ\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 02 May 2026 00:29:47 +1000 (AEST)","from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby tor.lore.kernel.org (Postfix) with ESMTP id 10CD0301682B\n\tfor <incoming@patchwork.ozlabs.org>; Fri,  1 May 2026 14:29:37 +0000 (UTC)","from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 2EB8B3CA4B3;\n\tFri,  1 May 2026 14:29:36 +0000 (UTC)","from BL2PR02CU003.outbound.protection.outlook.com\n (mail-eastusazon11011021.outbound.protection.outlook.com [52.101.52.21])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id D696F3CBE73\n\tfor <linux-tegra@vger.kernel.org>; Fri,  1 May 2026 14:29:33 +0000 (UTC)","from LV8PR12MB9620.namprd12.prod.outlook.com (2603:10b6:408:2a1::19)\n by SA1PR12MB8096.namprd12.prod.outlook.com (2603:10b6:806:326::22) with\n Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9870.23; Fri, 1 May\n 2026 14:29:24 +0000","from LV8PR12MB9620.namprd12.prod.outlook.com\n ([fe80::299d:f5e0:3550:1528]) by LV8PR12MB9620.namprd12.prod.outlook.com\n ([fe80::299d:f5e0:3550:1528%5]) with mapi id 15.20.9870.022; Fri, 1 May 2026\n 14:29:24 +0000"],"ARC-Seal":["i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1777645776; cv=fail;\n b=XP1ie5nPv8oStPiDyTKkxDPxw8Vm2B2XAl+StN1wl/DQh/RO7Qv/Hshb1yVwvLxJ6DAJOUZk1FXyHnwP/y8/DEs/mkfoZfOdAckbDCOSnHcB3BjoBElrF0SNS7edc+G/oqYnr6Yjhxucmg3Bv+HJUtJE/FT0JGcEJznt4fD7FgY=","i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;\n b=ZhqGHtR/iu5gqfQ0cePp3TOPK+edAzuZIlbfeJA+3mmzzqnD0YrDeyTB/eY0TvBsAb/CeIyiML80Dqa73HJhfEjv0sUIrWIcwFFb21U968+GZUgFTKGwKgZMVrcJb/99LLOYahilztdHfIDo/mDkmJNrRb1Ppy4aFZoM16Ib5OwMgtf4SrOoHzhdaT2ol1/YpZGiObLcmr/zqidnLiGuH+ivZJfvS0TIr9tfOYyEen//EcWpNJiOpnxEt6Bta8IjNq/Q7iSXkWfBcyxcR3//B1rYjPruO+my/kn57XGCpLs0dOK4xG2wLdX83XM1h4S9XEuAb+ipaiLC9MgqbvAxZg=="],"ARC-Message-Signature":["i=2; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1777645776; c=relaxed/simple;\n\tbh=gn5HlVZyX8VnUehFG6bidDI9KSXqrhbDohKVMmme42o=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t Content-Type:MIME-Version;\n b=hEtCnUz7OGLcLVAikABRP2UxIw2IHBA5PWyz4XeOShUVN540ptEIP/hpZMagKvaG7V0uI4D2/YZcyVXoLV+ZqRu4Q1G4fh1psKOnydvdwNG+tNwx1LT0XgSDQb7ShqQIYSr8KkmQUldZsWtaB+U8ts1/yZEYeeJzy6K9QzBcJfQ=","i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;\n s=arcselector10001;\n 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;\n bh=q5+RRk8gmuwu1ShgI4kGOGgWDuE1ikupDWuNgYtX+XU=;\n b=Wy0lERPPToHklsdjI+qJ63TIF4VDczlgkLM/jJEz8NYcaOkbeNcTXw6OYo2522U5aNj7hz2sVYlxPheA2vUgl7jJGL2TCX9UQVurd5JhwxKR50WqdCtCQL9NFdfHTvcPMB8oJjIUxu9RPobO0DFQIQp6SjOnbr9Ak4ot8f9DcWl8CzYBQ6KCV+TOHTvjPCDtvIhj/In1tvNcd6eIwusb8LEcTciqeYRk5Wg28zN3xStUe6koIRLKLSZlgJbHOljdWm06stxRd0D9kI8pmZwnoUjALLmNQobZmvINYBRpniUmgDoSvqCecvKDX0R832WwsHKTaJ/uZvyZ1q16ZSP9zg=="],"ARC-Authentication-Results":["i=2; smtp.subspace.kernel.org;\n dmarc=pass (p=reject dis=none) header.from=nvidia.com;\n spf=fail smtp.mailfrom=nvidia.com;\n dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com\n header.b=LYyIDXyj; arc=fail smtp.client-ip=52.101.52.21","i=1; mx.microsoft.com 1; spf=pass\n smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com;\n dkim=pass header.d=nvidia.com; arc=none"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com;\n s=selector2;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=q5+RRk8gmuwu1ShgI4kGOGgWDuE1ikupDWuNgYtX+XU=;\n b=LYyIDXyjWJCWU+iDIStI1YdD0WeBJY4gxtC5AqDyLCPQ63T33ZmqzfHSFpsljayDbeqIhcCCWjW878jHEHpTZA+cEAgA2YEELhfc4wMdsL55KbqRa1YLTqahNzgMs+OSggwA+tf6PpMlsH2kxzpLjxvaRFt5+j2msVpapcDYxR/kYkWeMqn9ectKcgEBZsKsksH42O2yIXHBRnEtQE8vw13ZQjJahLo/UtMxnAXnCN9TB5674DEMC9cbDYGBALQDF+PLffi8UrFDT8NNUmf9TJ/tWxBkIfeUMnNmDBaxkIUhiO4rhjcLzsqg1Xmrwccf66y3CU3ujzkCXt0nMZsrrA==","From":"Jason Gunthorpe <jgg@nvidia.com>","To":"iommu@lists.linux.dev,\n\tJonathan Hunter <jonathanh@nvidia.com>,\n\tJoerg Roedel <joro@8bytes.org>,\n\tlinux-arm-kernel@lists.infradead.org,\n\tlinux-tegra@vger.kernel.org,\n\tRobin Murphy <robin.murphy@arm.com>,\n\tThierry Reding <thierry.reding@kernel.org>,\n\tKrishna Reddy <vdumpa@nvidia.com>,\n\tWill Deacon <will@kernel.org>","Cc":"David Matlack <dmatlack@google.com>,\n\tPasha Tatashin <pasha.tatashin@soleen.com>,\n\tpatches@lists.linux.dev,\n\tSamiullah Khawaja <skhawaja@google.com>,\n\tMostafa Saleh <smostafa@google.com>","Subject":"[PATCH 3/9] iommu/arm-smmu-v3: Use the HW arm_smmu_cmd in cmdq\n submission functions","Date":"Fri,  1 May 2026 11:29:12 -0300","Message-ID":"<3-v1-b7dc0a0d4aa0+3723d-smmu_no_cmdq_ent_jgg@nvidia.com>","In-Reply-To":"<0-v1-b7dc0a0d4aa0+3723d-smmu_no_cmdq_ent_jgg@nvidia.com>","References":"","Content-Transfer-Encoding":"8bit","Content-Type":"text/plain","X-ClientProxiedBy":"BL1P221CA0031.NAMP221.PROD.OUTLOOK.COM\n (2603:10b6:208:5b5::10) To LV8PR12MB9620.namprd12.prod.outlook.com\n (2603:10b6:408:2a1::19)","Precedence":"bulk","X-Mailing-List":"linux-tegra@vger.kernel.org","List-Id":"<linux-tegra.vger.kernel.org>","List-Subscribe":"<mailto:linux-tegra+subscribe@vger.kernel.org>","List-Unsubscribe":"<mailto:linux-tegra+unsubscribe@vger.kernel.org>","MIME-Version":"1.0","X-MS-PublicTrafficType":"Email","X-MS-TrafficTypeDiagnostic":"LV8PR12MB9620:EE_|SA1PR12MB8096:EE_","X-MS-Office365-Filtering-Correlation-Id":"a9393881-be6b-4a36-9bb6-08dea78e091d","X-MS-Exchange-SenderADCheck":"1","X-MS-Exchange-AntiSpam-Relay":"0","X-Microsoft-Antispam":"\n\tBCL:0;ARA:13230040|376014|7416014|366016|1800799024|56012099003|18002099003|22082099003;","X-Microsoft-Antispam-Message-Info":"\n\tJPGcawhZqA/o5fEvE3NFl/lAP4oZDAa5vlQbkDEG9GiuHYlQdcBZVVy64NQsY11LhGkkhJsMgO1SEgcmRWj3EMWEn02hbKkYaDB4nitc+++tT8YuDZ306s7GIeu9osDdl1IESiEx/4DyKbMjJzUlmFOFw9ivHsM22eRosbr+/m/Y7eOCgzrIAzCAmarMlRF7lvQ6AnhCD/YcDXnBv+293efs2LoKxIh9nSeq2QTZt98n4ZCi1L6zNDkd8TOc5zrD57eLxBQzWCIqEBCCk01GG6ro+gJXOuYKxYscF//X8GK3S366ih7hdhLrW4b4dgUPZVL9wwl6QJmdgMtczHdXI4sa1R4S+XEhJbeZLkXqAMnYii3selFBfhNJxQfo2M91rYn90IBCI/Z9otm3w7BM/qTnB6pLX/vUgFvY7qi3/zs3T71VviCXQERcRfFw4sHSVejZMORniPnlAZ+1S6x27WTd0zrJEZB3JNP+tJJDTwCa3V9cmkStr4Ne9wnO1YZGw6CQrd7FcK06mWzOlaWOdGNYl/g33x46LCzMSQdih9zj3h+2l8nLF6UdChR/ybj5VIRRGFaabq22B4rQu3MBoCrsFPBnivy266EJeWvGom4zTVLPcSfaJewtA3XCh2encr9a92PCJhQfsucTDQjQq84/G2YllTCAxGx5QYVmczQRUFu0hRgoPL1VomvK0NaV","X-Forefront-Antispam-Report":"\n\tCIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:LV8PR12MB9620.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(7416014)(366016)(1800799024)(56012099003)(18002099003)(22082099003);DIR:OUT;SFP:1101;","X-MS-Exchange-AntiSpam-MessageData-ChunkCount":"1","X-MS-Exchange-AntiSpam-MessageData-0":"\n ygzql0HaWyBLCYxoxeWDq8HSOoc7ho4/XiLQRpv0LJUJ+QqJuxbvXwiopfd8skXiEHgbhwYAZoA1/91N8JfpNYBLK7Sj4vfuP+1BVx5DPRil/+yPsvW4KA4Tf0op3qlzydnG3cOmdoNcPWGDFHxuSXiFdpRx06w06vwlHm+Sko6/QPFUaiNnc5VBQTg/e8W8gqt6mIa/+NUgj5QgFsl63FJxjiy07n9pht7+GyPkPonNsVChexfp/p98cmuRDTNIkupxGf7Znz/HvZs6JeVwgJx7FDgoVt5j+kcaGdjA08fxYBAcmQk5uSJ/6FaV+MOV+07nIhlR6ZQ0xdrF6kCWKGxcQv7rPkE1NFFRfTCa5Zstpgc3P5BIW5qF+tzDJGoDb3nCx1BVqVAz2CwW0VDbudiWv8bsH2wwgpn/GQZ0lymPtd8GVl8cGr/CPIZcWORWVrYVpDAHnIHeoa5Yhjz4zoBK/UjSnMs8NpeG5oTSyyXiXvVZvRCo7C9IBTxxi2IdPGaNvKWs/Pn1gZzFnHPH0qFGQevPhEGV3M0K4QXmZAMW2g1fE7pk2BeuHIn7bY39bhV+S0AwONzTOzHVfSdzf9idevMLmjBvbGfZMMX6lsbRnfrrUXCSs1xFJAxGw6C7wm59/ksTLStu+q23MyenxbiuIbBlhjFUdh2KYI+uqJg5HJMwWWaaA13TiL7Cyiw9PmzKN1I7uuKMKsteQPyw6axcmHnoy9yYJhVj9ujDWt3IG8epTkV8Hit0pZoYVI7PmGkQrrVbsApmmb3WUVZeuVbuEW3q//MtHgxXec4zea7vOzoR9y9VTdY4qPfKfQ2hj8nFMRSihJ0SGpQe1jy95p6eZV3Z6uEVyGEsSdfb5llaZdDAh6zWrvaXDk462VwwFzrmi/0aFd9uunx5h/JGR9c2C5dXkq8k7VlFew2J2DPjKD2SpvkpDKo9GVXTkoE7b66dVulZwQ6TWkeKpsDiwaosmhXXLOOeinHTyYw+2DIfg3DaZeqa73dk8THQtRri9YFrZSyYCe1rL57qhw0NZ6HaN7V/taLgwSz5u5ux9DGFJMOpOGoOP0BXKFQ5VjAQMuBMlc9uVN0KpFPqjVfYtc7PPt+3dl2bv/ggWJ4KcrEopDqODltvgSOXVVovSQJj8RVcwrDKT40Pmmq7RS1izpAkn3Eb/xhnT/PpxiEy7dSjIasynJoTJcgSJyJStAb7IP2PI16fhgmb7PAH0lUsSiCdhPvH/DCbmL7KiPfmjy/uIIYnwGPo8dRGEhirHu/Uu1UdEplhwLYYXU2t7wvgm7PpwSOnhLTFs+vyu95S9MvowH5Dso/oD0S8W3uVpOSii2rjpZBgFdZJ6cgwuHcxJkRKCJVHvQa/vAh1u9PBLgx3ZVgdQtDBCyKo70GA6FU/3l5ZPSU5CFZJbECkj193JXXZFq77dky6QfgYr7jyDR6j8Ha+4i1LFgbX5ipN9+sEv2OvfFt2szX7BLvIue7Gwd3px9QTRvR+N3+PUDyhNvt1okV1fVBzDv/Tl9fWkneqRuL3xvmKMcEbKEM/qhsCCGiY6vRi4oRzUs05PKzvKq1lOKeuq/RutfU+z43NOJByQfL/FudMkY9Rn1fXqOuuj9xJCbVrs2AB5Wc4LwWjZgIHQeWr8JxvLd2sQIJgqy0xQ2komjO4gz0anTv1Bq5uLXnBTxKdsptvxFHSTcV5QyZRORnJucaLMHLvLkE/G49o","X-OriginatorOrg":"Nvidia.com","X-MS-Exchange-CrossTenant-Network-Message-Id":"\n a9393881-be6b-4a36-9bb6-08dea78e091d","X-MS-Exchange-CrossTenant-AuthSource":"LV8PR12MB9620.namprd12.prod.outlook.com","X-MS-Exchange-CrossTenant-AuthAs":"Internal","X-MS-Exchange-CrossTenant-OriginalArrivalTime":"01 May 2026 14:29:21.6304\n (UTC)","X-MS-Exchange-CrossTenant-FromEntityHeader":"Hosted","X-MS-Exchange-CrossTenant-Id":"43083d15-7273-40c1-b7db-39efd9ccc17a","X-MS-Exchange-CrossTenant-MailboxType":"HOSTED","X-MS-Exchange-CrossTenant-UserPrincipalName":"\n YBQiI7D0Bx/lyjrHnA8hUc1Q0lgp5HGl55hfU7LK2DWT+NMSISvE2EMWG4Gp+VJU","X-MS-Exchange-Transport-CrossTenantHeadersStamped":"SA1PR12MB8096"},"content":"Continue removing struct arm_smmu_cmdq_ent in favour of the HW based\nstruct arm_smmu_cmd. Switch the lower level issue commands to work on\nthe native struct by lifting arm_smmu_cmdq_build_cmd() into all the\ncallers.\n\nFollowing patches will revise each of the arm_smmu_cmdq_build_cmd()\ncall sites to replace it with the HW struct.\n\nSigned-off-by: Jason Gunthorpe <jgg@nvidia.com>\n---\n drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 53 ++++++++++++---------\n 1 file changed, 30 insertions(+), 23 deletions(-)","diff":"diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c\nindex 5cdeaec890592f..67d23e9c54804e 100644\n--- a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c\n+++ b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c\n@@ -921,31 +921,23 @@ int arm_smmu_cmdq_issue_cmdlist(struct arm_smmu_device *smmu,\n }\n \n static int __arm_smmu_cmdq_issue_cmd(struct arm_smmu_device *smmu,\n-\t\t\t\t     struct arm_smmu_cmdq_ent *ent,\n+\t\t\t\t     struct arm_smmu_cmd *cmd,\n \t\t\t\t     bool sync)\n {\n-\tstruct arm_smmu_cmd cmd;\n-\n-\tif (unlikely(arm_smmu_cmdq_build_cmd(cmd.data, ent))) {\n-\t\tdev_warn(smmu->dev, \"ignoring unknown CMDQ opcode 0x%x\\n\",\n-\t\t\t ent->opcode);\n-\t\treturn -EINVAL;\n-\t}\n-\n \treturn arm_smmu_cmdq_issue_cmdlist(\n-\t\tsmmu, arm_smmu_get_cmdq(smmu, &cmd), cmd.data, 1, sync);\n+\t\tsmmu, arm_smmu_get_cmdq(smmu, cmd), cmd->data, 1, sync);\n }\n \n static int arm_smmu_cmdq_issue_cmd(struct arm_smmu_device *smmu,\n-\t\t\t\t   struct arm_smmu_cmdq_ent *ent)\n+\t\t\t\t   struct arm_smmu_cmd *cmd)\n {\n-\treturn __arm_smmu_cmdq_issue_cmd(smmu, ent, false);\n+\treturn __arm_smmu_cmdq_issue_cmd(smmu, cmd, false);\n }\n \n static int arm_smmu_cmdq_issue_cmd_with_sync(struct arm_smmu_device *smmu,\n-\t\t\t\t\t     struct arm_smmu_cmdq_ent *ent)\n+\t\t\t\t\t     struct arm_smmu_cmd *cmd)\n {\n-\treturn __arm_smmu_cmdq_issue_cmd(smmu, ent, true);\n+\treturn __arm_smmu_cmdq_issue_cmd(smmu, cmd, true);\n }\n \n static void arm_smmu_cmdq_batch_init_cmd(struct arm_smmu_device *smmu,\n@@ -1013,6 +1005,7 @@ static void arm_smmu_page_response(struct device *dev, struct iopf_fault *unused\n \tstruct arm_smmu_cmdq_ent cmd = {0};\n \tstruct arm_smmu_master *master = dev_iommu_priv_get(dev);\n \tint sid = master->streams[0].id;\n+\tstruct arm_smmu_cmd hw_cmd;\n \n \tif (WARN_ON(!master->stall_enabled))\n \t\treturn;\n@@ -1032,7 +1025,9 @@ static void arm_smmu_page_response(struct device *dev, struct iopf_fault *unused\n \t\tbreak;\n \t}\n \n-\tarm_smmu_cmdq_issue_cmd(master->smmu, &cmd);\n+\tarm_smmu_cmdq_build_cmd(hw_cmd.data, &cmd);\n+\tarm_smmu_cmdq_issue_cmd(master->smmu, &hw_cmd);\n+\n \t/*\n \t * Don't send a SYNC, it doesn't do anything for RESUME or PRI_RESP.\n \t * RESUME consumption guarantees that the stalled transaction will be\n@@ -1861,14 +1856,16 @@ static void arm_smmu_ste_writer_sync_entry(struct arm_smmu_entry_writer *writer)\n {\n \tstruct arm_smmu_ste_writer *ste_writer =\n \t\tcontainer_of(writer, struct arm_smmu_ste_writer, writer);\n-\tstruct arm_smmu_cmdq_ent cmd = {\n+\tstruct arm_smmu_cmdq_ent ent = {\n \t\t.opcode\t= CMDQ_OP_CFGI_STE,\n \t\t.cfgi\t= {\n \t\t\t.sid\t= ste_writer->sid,\n \t\t\t.leaf\t= true,\n \t\t},\n \t};\n+\tstruct arm_smmu_cmd cmd;\n \n+\tarm_smmu_cmdq_build_cmd(cmd.data, &ent);\n \tarm_smmu_cmdq_issue_cmd_with_sync(writer->master->smmu, &cmd);\n }\n \n@@ -1896,11 +1893,13 @@ static void arm_smmu_write_ste(struct arm_smmu_master *master, u32 sid,\n \t/* It's likely that we'll want to use the new STE soon */\n \tif (!(smmu->options & ARM_SMMU_OPT_SKIP_PREFETCH)) {\n \t\tstruct arm_smmu_cmdq_ent\n-\t\t\tprefetch_cmd = { .opcode = CMDQ_OP_PREFETCH_CFG,\n+\t\t\tprefetch_ent = { .opcode = CMDQ_OP_PREFETCH_CFG,\n \t\t\t\t\t .prefetch = {\n \t\t\t\t\t\t .sid = sid,\n \t\t\t\t\t } };\n+\t\tstruct arm_smmu_cmd prefetch_cmd;\n \n+\t\tarm_smmu_cmdq_build_cmd(prefetch_cmd.data, &prefetch_ent);\n \t\tarm_smmu_cmdq_issue_cmd(smmu, &prefetch_cmd);\n \t}\n }\n@@ -2328,7 +2327,7 @@ static void arm_smmu_handle_ppr(struct arm_smmu_device *smmu, u64 *evt)\n \t\t evt[1] & PRIQ_1_ADDR_MASK);\n \n \tif (last) {\n-\t\tstruct arm_smmu_cmdq_ent cmd = {\n+\t\tstruct arm_smmu_cmdq_ent ent = {\n \t\t\t.opcode\t\t\t= CMDQ_OP_PRI_RESP,\n \t\t\t.substream_valid\t= ssv,\n \t\t\t.pri\t\t\t= {\n@@ -2338,7 +2337,9 @@ static void arm_smmu_handle_ppr(struct arm_smmu_device *smmu, u64 *evt)\n \t\t\t\t.resp\t= PRI_RESP_DENY,\n \t\t\t},\n \t\t};\n+\t\tstruct arm_smmu_cmd cmd;\n \n+\t\tarm_smmu_cmdq_build_cmd(cmd.data, &ent);\n \t\tarm_smmu_cmdq_issue_cmd(smmu, &cmd);\n \t}\n }\n@@ -3446,6 +3447,7 @@ arm_smmu_install_new_domain_invs(struct arm_smmu_attach_state *state)\n static void arm_smmu_inv_flush_iotlb_tag(struct arm_smmu_inv *inv)\n {\n \tstruct arm_smmu_cmdq_ent cmd = {};\n+\tstruct arm_smmu_cmd hw_cmd;\n \n \tswitch (inv->type) {\n \tcase INV_TYPE_S1_ASID:\n@@ -3460,7 +3462,8 @@ static void arm_smmu_inv_flush_iotlb_tag(struct arm_smmu_inv *inv)\n \t}\n \n \tcmd.opcode = inv->nsize_opcode;\n-\tarm_smmu_cmdq_issue_cmd_with_sync(inv->smmu, &cmd);\n+\tarm_smmu_cmdq_build_cmd(hw_cmd.data, &cmd);\n+\tarm_smmu_cmdq_issue_cmd_with_sync(inv->smmu, &hw_cmd);\n }\n \n /* Should be installed after arm_smmu_install_ste_for_dev() */\n@@ -4823,7 +4826,8 @@ static int arm_smmu_device_reset(struct arm_smmu_device *smmu)\n {\n \tint ret;\n \tu32 reg, enables;\n-\tstruct arm_smmu_cmdq_ent cmd;\n+\tstruct arm_smmu_cmdq_ent ent;\n+\tstruct arm_smmu_cmd cmd;\n \n \t/* Clear CR0 and sync (disables SMMU and queue processing) */\n \treg = readl_relaxed(smmu->base + ARM_SMMU_CR0);\n@@ -4870,16 +4874,19 @@ static int arm_smmu_device_reset(struct arm_smmu_device *smmu)\n \t}\n \n \t/* Invalidate any cached configuration */\n-\tcmd.opcode = CMDQ_OP_CFGI_ALL;\n+\tent.opcode = CMDQ_OP_CFGI_ALL;\n+\tarm_smmu_cmdq_build_cmd(cmd.data, &ent);\n \tarm_smmu_cmdq_issue_cmd_with_sync(smmu, &cmd);\n \n \t/* Invalidate any stale TLB entries */\n \tif (smmu->features & ARM_SMMU_FEAT_HYP) {\n-\t\tcmd.opcode = CMDQ_OP_TLBI_EL2_ALL;\n+\t\tent.opcode = CMDQ_OP_TLBI_EL2_ALL;\n+\t\tarm_smmu_cmdq_build_cmd(cmd.data, &ent);\n \t\tarm_smmu_cmdq_issue_cmd_with_sync(smmu, &cmd);\n \t}\n \n-\tcmd.opcode = CMDQ_OP_TLBI_NSNH_ALL;\n+\tent.opcode = CMDQ_OP_TLBI_NSNH_ALL;\n+\tarm_smmu_cmdq_build_cmd(cmd.data, &ent);\n \tarm_smmu_cmdq_issue_cmd_with_sync(smmu, &cmd);\n \n \t/* Event queue */\n","prefixes":["3/9"]}