Message ID | 2-v6-228e7adf25eb+4155-smmuv3_newapi_p2_jgg@nvidia.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org> 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 AA549C54E67 for <linux-arm-kernel@archiver.kernel.org>; Wed, 27 Mar 2024 19:18:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=RgKyCIMl2fbkdIr+GD6MKaYYYsDw4FEE2i6XlpfEzyY=; b=gKJFa1kXWVlJht M/g8u3oEVvbZNbGPgAgk+b4yrejuzUIqp8M6xf1GEJHQAW4ihTQ/Z0LGO/z9osISZP9XFEYG96Ex5 74A16kuhzKF6pLcXG0p3qRaJi/KDiIqeuujYouApmt2jUriSDVhXolfYyV3h5xdBDeDVa0wAyLjU+ D9E6ivXBJ8hSvFd1dW6rZQkzFE2+TFkuoROQgl0AETIs+oYj12c3TLP7/IsozQt7tDcvkyKflm6Pv Kl8WYP0BTcoVmfmIFdpv1aa0q31LYGoPrhlp+fjZxa2LsqUWc907L7yj8Oyda0alPQ0KySOMgxtVV dSrMI3ukgWYgzTbLgeug==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rpYn0-0000000AkvH-3shB; Wed, 27 Mar 2024 19:18:22 +0000 Received: from mail-dm6nam10on20604.outbound.protection.outlook.com ([2a01:111:f400:7e88::604] helo=NAM10-DM6-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rpXhQ-0000000ATY9-1Co8 for linux-arm-kernel@lists.infradead.org; Wed, 27 Mar 2024 18:08:33 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HNv3lPqx801rlxjKGeym4/WsB0BhwzVyfHXFdmr9fkz7CtQSk6GPu3yHSLnwPlNKHo2ESXI0wcMFPFW37JeZ0vgYdhReKHH9TMwtsDyPJiOqs9ePdWjTzm2HUYRp15glaF3DvPDt7NlTIitD8fSxyI9hXWcqd1DAaTHvFyBppnj4x17C/IDPZF1yMnX8/JcKlEoSHgqSzzN7ZeSrKaXhNa20rM1sgPh6TXGC0IhjDokx1AFPB+uwkZISlk0HJILeC7A3/xcbtz/0l6awVhFKcQWohBOK0z8c0mgkIslDCPgSy15nGPz998cEXk74vf7/9aXD3EO01jJn9OOI8xIlVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=+q+NyN7EmQpLSiCvfUmAP8PFcDmU7QJ/E6ybS8LRe0Y=; b=cBEB1kUkN9PV3ytrRnjaTeLQaMzkNuam5ci89VvfiTU0Oxmihc1gQNEinai0bKbpk+RR/NV/BLnPPFfxxXH25dV6urNawmKRyLARQwO9ODvw+I5ahQ7zE8RXdNs/Z00Xw7Om0doQyN3mF84QCiuCVbEByldd6SvXwyCqPSdSGaZfnrwfs6BGuVNyUqXedCiYazp4dGiU1y3iC7grIPJsxUXWG3gMyELWsgaizy2qsORB1/p9SMs9QFcdP3kgoFkJdE0mQNz6VOauaPDrg+VuAFhFJgRB2KBPWtdzchJl5C2Bg0yh2UpmKUnvsVUQkMM+oB5rtx8z8T9z0P8XkS/fSg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=+q+NyN7EmQpLSiCvfUmAP8PFcDmU7QJ/E6ybS8LRe0Y=; b=M/OwlqHpkLPW2P0wz12nvrltXy17GVo5Eb1onmJ8vaF6Ds1JiAjv0SxByET0zvDuuoVKYrvLj8HWQn//227qzQhRgWcAaoAMlS2QPRIouqgj7Mz0m2C7T4cS/XHyoPI1BQ6K0W7WurN6xHw3dRW2h+CbsYoWC15NCqtUIUDZ8XRcsNjO/rP+8ELzTj6tQd6PziBe7Puo0smm/waaFSU90kHRnOuo9jvim7bqZKV/8FOZJPEBZ4UHWEXht08Ghs4MmHSME80A3ZBHpgZdJc9Pnsyw2CUbmGZ5rQNmqHE0UA50aBTT4W+c9rLoNrcHnICbsOS+dIoZjpFRRWRZHGP6sA== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; Received: from DM6PR12MB3849.namprd12.prod.outlook.com (2603:10b6:5:1c7::26) by CH0PR12MB8487.namprd12.prod.outlook.com (2603:10b6:610:18c::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.32; Wed, 27 Mar 2024 18:08:19 +0000 Received: from DM6PR12MB3849.namprd12.prod.outlook.com ([fe80::6aec:dbca:a593:a222]) by DM6PR12MB3849.namprd12.prod.outlook.com ([fe80::6aec:dbca:a593:a222%5]) with mapi id 15.20.7409.031; Wed, 27 Mar 2024 18:08:19 +0000 From: Jason Gunthorpe <jgg@nvidia.com> To: iommu@lists.linux.dev, Joerg Roedel <joro@8bytes.org>, linux-arm-kernel@lists.infradead.org, Robin Murphy <robin.murphy@arm.com>, Will Deacon <will@kernel.org> Cc: Lu Baolu <baolu.lu@linux.intel.com>, Eric Auger <eric.auger@redhat.com>, Jean-Philippe Brucker <jean-philippe@linaro.org>, Joerg Roedel <jroedel@suse.de>, Kevin Tian <kevin.tian@intel.com>, kernel test robot <lkp@intel.com>, Moritz Fischer <mdf@kernel.org>, Moritz Fischer <moritzf@google.com>, Michael Shavit <mshavit@google.com>, Nicolin Chen <nicolinc@nvidia.com>, patches@lists.linux.dev, Shameer Kolothum <shameerali.kolothum.thodi@huawei.com>, Mostafa Saleh <smostafa@google.com>, Tony Zhu <tony.zhu@intel.com>, Yi Liu <yi.l.liu@intel.com>, Zhangfei Gao <zhangfei.gao@linaro.org> Subject: [PATCH v6 02/29] iommu/arm-smmu-v3: Add cpu_to_le64() around STRTAB_STE_0_V Date: Wed, 27 Mar 2024 15:07:48 -0300 Message-ID: <2-v6-228e7adf25eb+4155-smmuv3_newapi_p2_jgg@nvidia.com> In-Reply-To: <0-v6-228e7adf25eb+4155-smmuv3_newapi_p2_jgg@nvidia.com> References: X-ClientProxiedBy: BL1PR13CA0310.namprd13.prod.outlook.com (2603:10b6:208:2c1::15) To DM6PR12MB3849.namprd12.prod.outlook.com (2603:10b6:5:1c7::26) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6PR12MB3849:EE_|CH0PR12MB8487:EE_ X-MS-Office365-Filtering-Correlation-Id: 8d84f27a-1e5d-4ebc-b2a0-08dc4e88e0da X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ldJs1LAGHsSeN/dvAUkTEVWTxZD/e2trYP9Fa3lATVbVhf9jEpye3rBHSsgMCBm0npf6tZ9x9OlA+tCDhB1jh7VzIOVx18AtzUVTlq7EkgyrE+vbZ0mKlJBgxGE/dQj50WQDTRzAcxzzKshetP5SkkueBdEKKF5MVr37iN7AsDnIoVcuThilzo2HLk/CBk1EDrekh/txaQtne6VTgQ0QCEC/x3BPl8EynFXB03OW7uqJ20EFzwUZAUlBPL9rfDERIv6UpyP+2YlXfPNOlBp5HwT4PHeeBaWYrGN8NhocXGLlWut92ySxRAYUcr1W5xX8ctfkI6bRGI9CqGMJfs+H5vOlcIKi8ooq/UxBY4CELoNqN+yRU6KbxhljhipIRQzrC9nGbqO5YnocMQTgr7Aunge1BXT2MnzWgN5VezI3F/90IV9bZ6QpsTThlpPFQyUsL7gNZQquHHvma9ZdZBuK3PhVqSEuV4bwA9pPttFF7Jy30Tmjh3gJJGBvNFgHuGMHRsJf1VwRhoVidrWD9PdvZTapEorVaHWh+7U/lWJeo885CQZ9IfoXTGDH0Fteh83veQRq8P2rLdj8N3DEy1ZUKbHSJctk4fWTgiNbuSfVCzzS5ksG8SbKIoS/VcfYxE8uJA8Wzt8PHhEb7izbi/I82+dSwmFZqv9Dg3nHjCN/7Mg= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR12MB3849.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(376005)(366007)(1800799015)(7416005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: zLUWM2e3hImP+aEQHZYo2t8EjOiE4g7T+GJcCRkDg8SzeRU60dNw4DRlIRvUAtSn0yR3PzMvGbBZ9Fu9YUkHgTSh/8E2TUjD5B6AfKzcjjpJXJMRqRC29qqWjOAWeVOXYgd0xCeawvBghKdrY3oJHTBsApWGJTq5ZaQG2PlIxCA7kut2vQOfDD58mDTdchCzCwhTHWmm5Ujv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usgATTGOACRTWbbWZW/X2IGLHpQ3ORv2Q+QFJZmazniWYvL1SUh6QqyImHjlaSKLGa503ldGz6ynPId8oQLwQKM1q4Dxbk5LV1Ri0Zxj/bKhyffUR2++0eK7R5/cifY13/qjDbC2WwuNf+Y5/ze/eXcq35isfI2aGAiNa43PfAiTGFvgNH1S00A1O1Rd4OLgKVYfZl+IPstjuOoNY8O05RSNV40/6r3TO4vnVu486D/VAejXgMGnb7kyCRR48M/oJY7JA67RONDRMWT9HUEtagaXLM+FS6JZv7t/mSD6WdPRSI+8GZJguax/ X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8d84f27a-1e5d-4ebc-b2a0-08dc4e88e0da X-MS-Exchange-CrossTenant-AuthSource: DM6PR12MB3849.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Mar 2024 18:08:17.6065 (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: 2cG8P9oMYKn7mnF4I6nuFVY02/qOpQxaZyta7v0U34JQqaAHbD0GB5bercgU8hAF X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR12MB8487 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240327_110832_371088_7B0A4042 X-CRM114-Status: UNSURE ( 8.54 ) 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: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
Update SMMUv3 to the modern iommu API (part 2/3)
|
expand
|
diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c index 5ed036225e69bb..fa3f3e7d9b0cba 100644 --- a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c +++ b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c @@ -1139,7 +1139,8 @@ static void arm_smmu_write_ste(struct arm_smmu_master *master, u32 sid, * requires a breaking update, zero the V bit, write all qwords * but 0, then set qword 0 */ - unused_update.data[0] = entry->data[0] & (~STRTAB_STE_0_V); + unused_update.data[0] = entry->data[0] & + cpu_to_le64(~STRTAB_STE_0_V); entry_set(smmu, sid, entry, &unused_update, 0, 1); entry_set(smmu, sid, entry, target, 1, num_entry_qwords - 1); entry_set(smmu, sid, entry, target, 0, 1);
STRTAB_STE_0_V is a CPU value, it needs conversion for sparse to be clean. The missing annotation was a mistake introduced by splitting the ops out from the STE writer. Fixes: 7da51af9125c ("iommu/arm-smmu-v3: Make STE programming independent of the callers") Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202403011441.5WqGrYjp-lkp@intel.com/ Signed-off-by: Jason Gunthorpe <jgg@nvidia.com> --- drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)