Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp2071348lqa; Tue, 30 Apr 2024 07:30:02 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXqYjRo8gjFAXncZqKmFJjbad+0n3rhHV8rwu6TCUGnsrzCf18ZuhaNdTd0/zJBWHhMktfVOBRFwNb19ZW2iZJXFdIx82J1jVNrPg3JAg== X-Google-Smtp-Source: AGHT+IGNLk0i2NmE7dCky9fJw1T2Z1Pb84lArgPmUVbWz25tDuE7w8RTmIO8lFCv8nfh2XepydYj X-Received: by 2002:a17:906:b00d:b0:a55:5ee3:3c80 with SMTP id v13-20020a170906b00d00b00a555ee33c80mr7606540ejy.29.1714487402460; Tue, 30 Apr 2024 07:30:02 -0700 (PDT) Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id e20-20020a1709062c1400b00a58953bb1f2si7600468ejh.500.2024.04.30.07.30.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Apr 2024 07:30:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-164131-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=Ju4OgisT; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-164131-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-164131-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 0C7BB1F225CF for ; Tue, 30 Apr 2024 14:30:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 946A6176FA4; Tue, 30 Apr 2024 14:24:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="Ju4OgisT" Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2040.outbound.protection.outlook.com [40.107.220.40]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E0C1113D28D; Tue, 30 Apr 2024 14:24:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.220.40 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714487055; cv=fail; b=m7d17fOCKoPzA3GjTmejlri+6Ixza1mWA05GxZHLPYaU1d2wiQRt9KxIIgGEfVgyjJdOfhAXb7cq60NxqLPZzYYVhujyRu5D7KyjRhwJtOT67vbcobYn6DZIKaOowFMqJz956cwTOspak5cI4agXDml+XqbuSHj2xhfRVgQuorI= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714487055; c=relaxed/simple; bh=nqFbfCUGHbjD1L31jVCevtYz9Z+SuGThjZSx3uZfuOs=; h=Date:From:To:Cc:Subject:Message-ID:References:Content-Type: Content-Disposition:In-Reply-To:MIME-Version; b=g6kT/S9hDzsCdPSiV5ivvHissEAszqMwcxxVd344ozFhNGSF83lQSLs1sX9gcLUspr3mUKB4+qNpNlI4GXJCApCybGSEX24Nv1fNy6KJqA9ejMbWGs9LT4+BLCqKgb7udqlgNmUuhgYshNoGnlxwPpFfM2Q6RY1ZL6MFELEF6gk= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com; spf=fail smtp.mailfrom=nvidia.com; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b=Ju4OgisT; arc=fail smtp.client-ip=40.107.220.40 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nvidia.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=do9TpCyA5l0Pvdfr0Th7SiwJEbhUqPnozfguG6aH79O9fkbDzXLuUuA5MAvw82TvDwgXi637jxvkOtONTu4Zx3yoH/skmN7gIiGFW2lfrkCGqKFi//lYiSypcofkrPHlKjm1P5wcVECilxaYEBupAMcAfFaePYdaDfg44eYUk9GaQR7yr0be13arfEayuzr1Usgk2IyczG6qib8CPMFmHf7HVqAxG1hzu2Kra6JtcoFcJPIg0tll39UCYZGx8WBsDbjLd4cFbJdFs5CVwdL/j9cM8iYqFBWVXIL0MREGqmcdLPq6SkfI4MrdOO36g373ejXDG215c0VIyP7+L+l32w== 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=ZwMmx7eIf0T/g1faPgBeMBmMMCe1tyr3fvZVEXOVia4=; b=M5XF48ZQE85Z9hsOL8tYujX2THBDMYRlINdlBIGuiGQK8/kqDqFFINid/hJuVKyhRo4vYvRHWeN4VCukEboX1RoPvMIHIxjrtjH8pTYEdMqDIE1tsX0hvbVB+frQcn8Hu+YZj/+2yZJy3NRg1rQKe5XcyYSUOgNDdyAu4QtQhl+d8fHI9thiwNDHLoL7NDjCdTeZSd4dCjSN57CG3xIoLed+fGoRHND6ReI6bCHceMYmTAAkUoXcm+1OwsZMepZYCQjIUpM0aKN9jaA4MQcDCCYHlBrkkxl+EtlHT052D90k1tw+5ZSBUsQAofHxor8Ro4n9D4w6bwip8nftLAMrCw== 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=ZwMmx7eIf0T/g1faPgBeMBmMMCe1tyr3fvZVEXOVia4=; b=Ju4OgisTm6Q4+vKdiw2MBHaq/ZIotAmMVK8rZzXZxSb0nxyJowch1HsqnH3RPrw4DxJcwnnRIXhhuA7ZvhKcjNlR3cpVmsBzEFgtwNxTdZUg/tW3gLEUDvxV4FNopOtFvdEDaxU9VQBJ7N7fWLXG7sPhyp6lUFw3YP2X0UQGG5TVwoFY03xvwicACtznwJ4zpLtbDhXD46G+Jw2ALlef9ALFjm0KxO5Sxnb5Ws/t08H16QzFKzCsU+HDunMc3Z3EDGeO87fMMUrjST1vdByDtGF717jzgLJ/87HSs2IUDlS8eq/MEp1zrqNbA533sjRP+6Sn/B5HQSYvjDm003znfw== 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 CH3PR12MB7690.namprd12.prod.outlook.com (2603:10b6:610:14e::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7519.34; Tue, 30 Apr 2024 14:24:11 +0000 Received: from DM6PR12MB3849.namprd12.prod.outlook.com ([fe80::c296:774b:a5fc:965e]) by DM6PR12MB3849.namprd12.prod.outlook.com ([fe80::c296:774b:a5fc:965e%3]) with mapi id 15.20.7519.031; Tue, 30 Apr 2024 14:24:11 +0000 Date: Tue, 30 Apr 2024 11:24:08 -0300 From: Jason Gunthorpe To: Nicolin Chen Cc: will@kernel.org, robin.murphy@arm.com, joro@8bytes.org, thierry.reding@gmail.com, vdumpa@nvidia.com, jonathanh@nvidia.com, linux-kernel@vger.kernel.org, iommu@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-tegra@vger.kernel.org Subject: Re: [PATCH v6 3/6] iommu/arm-smmu-v3: Make arm_smmu_cmdq_init reusable Message-ID: <20240430142408.GR941030@nvidia.com> References: <47a2ec844ec42694872d3c3b1a09f1b870712f78.1714451595.git.nicolinc@nvidia.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <47a2ec844ec42694872d3c3b1a09f1b870712f78.1714451595.git.nicolinc@nvidia.com> X-ClientProxiedBy: BYAPR01CA0061.prod.exchangelabs.com (2603:10b6:a03:94::38) To DM6PR12MB3849.namprd12.prod.outlook.com (2603:10b6:5:1c7::26) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6PR12MB3849:EE_|CH3PR12MB7690:EE_ X-MS-Office365-Filtering-Correlation-Id: 66b57e2a-a8ce-4b07-1e72-08dc6921341a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|366007|376005|1800799015; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?r/7jYVNRDNXRUMedzyu9hkNF9idfOP90WAFPGwxJRSUvzBQOdGSzVxJcBlDl?= =?us-ascii?Q?3skVRHR9J9wT3q822YD5Vjq7ckSvciBqbKCBI5cS9OD1/j6ssFwWAAbTMfOp?= =?us-ascii?Q?SKNa5oAYZ67By6sYBS1Capt0SLS+bkRrFEvyA8Ej0qta1/NsGo3UCh/JH2gF?= =?us-ascii?Q?2BY9Db64I+7XfQ+FSURBiWYoa8xnY37SWJVeYjcTetG0EwovViNNpFxul8P0?= =?us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mGSdVge6chuPHl3dlwbOGi?= =?us-ascii?Q?B6NEncbj3+d0TZPfgIERW2oX8c2ArCjer13fVdcP0vMcdyHNoIbbZtZFxIu0?= =?us-ascii?Q?b4kE7aFyMhr2apmr6tdH/54oTlj1XNLttb1YXqRgnDHe6UuaQ4Po2o1Rlk7v?= =?us-ascii?Q?Kj/2ciiCdp14Rd4u/ypnPtbcS7CWzMRDARsFJGIGfQ=3D=3D?= 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)(366007)(376005)(1800799015);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?/U/FhejZM/e8VW260Yd5rTmxPeNfggGGqHltVx2EwyFXivSpEwt9TRcAi9z0?= =?us-ascii?Q?EAS747uEgCQVwTa/w1MqQ4VN2NVTe6nKsXe9cEZB0qrvIkIrx/ZHbQ6n4Zkr?= =?us-ascii?Q?MM3Vz/Jr8rf+yeHmlZ/CIHLp5t2o4GiEO/6KPaivZo2/P3bIIALEEOUBOOHN?= =?us-ascii?Q?O1ZxyJUp3fib/6T5khX7rMWqVWk9IwTLv8zJexkgr1ImdmYwiXin6grXXNe0?= =?us-ascii?Q?lxctHEfe0D11ZfLdAKGtM1jD82SVBVwtBUdx5zXh5WxfggJIJ8emYkO48gPN?= =?us-ascii?Q?NAMTKaZsH2X0iXlO7iSJc3kIs9MUTLfiIQ8pVyIe76u0IZ6cLezel4sAUvxu?= =?us-ascii?Q?ZPlrtOU1uUaq+iYIDcGyPK+Ea+trnywnUNBRrVqZgjvzqeNiSdVPvEJ9KKRg?= =?us-ascii?Q?QxswrFQoShFZDA44Kwoe9MttfEXBdzn9S5JrJ4W1HBa+1oA7chNh83x/ZJJ6?= =?us-ascii?Q?qPhlrRMZP3ypvZV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uk+?= =?us-ascii?Q?AWjCD/dF23oH9jb9OIfi8GNf1gNuHuKwn6bTn4CeUhr1EwsZ2tyLkvytRueV?= =?us-ascii?Q?j402gcSnxa4j2asxe+SKA5EtJFYdmieM3YKk4QbbS0uW6taWextYATUx7GCg?= =?us-ascii?Q?aIbZj8c8p2FWLkmZ+nxFOXnzhf66zhtbJSHWSSj/LIDSn3+9sJJfxy9q7/X6?= =?us-ascii?Q?dgjGJ7VaPCj7+UqtQgUqrbegFSbIb5j0wurKM0qT?= X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: 66b57e2a-a8ce-4b07-1e72-08dc6921341a X-MS-Exchange-CrossTenant-AuthSource: DM6PR12MB3849.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Apr 2024 14:24:10.9864 (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: JuEL8XiIL3LtTtq5p14MGqzWdGj4clQFMxPCNtgQO49CcBjqOGiZ7Mza2sJolzDS X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR12MB7690 On Mon, Apr 29, 2024 at 09:43:46PM -0700, Nicolin Chen wrote: > The CMDQV extension in NVIDIA Tegra241 SoC resues the arm_smmu_cmdq > structure while the queue location isn't same as smmu->cmdq. > > Add a cmdq argument to arm_smmu_cmdq_init() function and shares its > define in the header for CMDQV driver to use. > > Signed-off-by: Nicolin Chen > --- > drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 6 +++--- > drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h | 3 +++ > 2 files changed, 6 insertions(+), 3 deletions(-) I would squash this patch and the next together: iommu/arm-smm-v3: Make symbols public The symbols arm_smmu_cmdq_init() and __arm_smmu_cmdq_skip_err() need to be used by the tegra241-cmdqv.c compilation unit in the next patch. Remove the static and put prototypes in the header. But the code is fine Reviewed-by: Jason Gunthorpe Jason