From patchwork Fri Aug 16 00:55:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolin Chen X-Patchwork-Id: 13765318 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 6D96EC52D7D for ; Fri, 16 Aug 2024 00:57:00 +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:Content-Type: Content-Transfer-Encoding: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=IPDubkbMqgbcv/zjTjwGcmhEwYLX+bEDSLRIn9Ad+Dk=; b=xnK+pa8uytXvQQR+76oz1pV16G 3aFNi3X+pSvZ3nv62O3+civV8Eiybx/fdABhnDf2gKSVwLA5tpr3Y76zIFw+SKBszdEklkbEndxqU xYFma9m2if5vkLY4x7jNhr6Yuytbrh5of1GbnFtIYskjZClXa2EZmb/rCIrDtW9wvmNj63DkeDbtX z7JCCJZaE6FucsOqmFPIZw1aX/92NkUSrZBBCmrX8Twhr4fdQ8KNZfkhM/uk0gB4E/5h2+ULgXz14 zqRS/7ob65ebCFb50YkBMGn10WlOZrHgNAteOluRiYL2B3xp+6ckn57YaiP0areKvKGfZb0bXIuPU lDfjQsBA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1selGr-0000000BQdA-2eke; Fri, 16 Aug 2024 00:56:49 +0000 Received: from mail-dm6nam10on2062c.outbound.protection.outlook.com ([2a01:111:f400:7e88::62c] helo=NAM10-DM6-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1selGA-0000000BQPE-2PwI for linux-arm-kernel@lists.infradead.org; Fri, 16 Aug 2024 00:56:08 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=O9ajcrALUgmyN7nXs1+RIErMl6NYciMiJdLMMuoqUTbZh5SE44jaFwZnUPj0fCbXGbaYn3plWNCBU9wbrbDtZn1kl0bWQ0n8YzeVUGGdaoTW6752zIL+z9LAVEAYdq5Co4OIJ9eu1FTR/ByexcU+aNu6LS6dACoinenFYPPBxjr8oXvFUJJ3mzDDyELJRgzKO0tlo9zMQVm9elxVloITfA5c7hIB217wOT04puKxbxb+tjVtGXI7TQnqt2BnJuB0A5JzWx8zHjYtyJUYK8lPOKExqrQxUPTWSPw8ITx29QY0N5i1AP2GB982Je6VPgu1nbP+84MzSg1p/rE4XIPeYQ== 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=IPDubkbMqgbcv/zjTjwGcmhEwYLX+bEDSLRIn9Ad+Dk=; b=TZ19KBHGKtI7alyNh+b7QdCxYxYcMU9Pk98QhzhxVe2N46a49/TgtihPCWbMNnrD1XIRHpwszOOyCoOtgPM+a/s6YtWEPyefmuedcVwBCcBjf6hxE2Tvyaa9wCe5qTKvofQ+7Qe8c4bX2V+fh+aTpiOfu6wa3sZNCa3lgHbTbevYt1KDr6nXgOnwUYFwOnVuY9EzCJbwiID3WF7Pxc2cuDN7712gNCBdt385YO++DZB4FL1jTM41e8AXbl8F8u7Xs0iUPzbTMfOJ/W+sFAMm0b1hmhotZjpnsTtMHnYXMF7LdjCyu5rUpUh1FX5lA9hwQGmTc0qXOoRGrGDFWkbVVA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=kernel.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) 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=IPDubkbMqgbcv/zjTjwGcmhEwYLX+bEDSLRIn9Ad+Dk=; b=iFf7PomxhYpohDz5jxnM6iJLjInaKc9kBSEH9X7pV6Fvk9NSuAV57iLi590+ho5YoPi8W+RauhVEKcmUh1ZF8NRp7ome5wbOlN95iyi4R3UK6kBN45cqp+kZD4ZkRoGfhBGKpcijZ2cGpY0iIFz3MdLRmxxKPg009yyNYuXDK/MlFmZ/t/f2dnKmZs99BDxn24HuYyznx0uWg2J1j+XrUer/GJKiD3Q2NaBbdOcNT8tE+t7dqgaQhxfDERj0KY7CD5ovr9c7YkzDcbn+3vtBIqwJquE6MUO0rq68sJWVpM+DjrSkAdMdUXm8suRBpoFv3kKX5+wMJKRr/DqKxx8Iww== Received: from BN9PR03CA0093.namprd03.prod.outlook.com (2603:10b6:408:fd::8) by CH2PR12MB4117.namprd12.prod.outlook.com (2603:10b6:610:ae::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7875.19; Fri, 16 Aug 2024 00:56:01 +0000 Received: from BL6PEPF00020E62.namprd04.prod.outlook.com (2603:10b6:408:fd:cafe::e9) by BN9PR03CA0093.outlook.office365.com (2603:10b6:408:fd::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7828.33 via Frontend Transport; Fri, 16 Aug 2024 00:56:01 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by BL6PEPF00020E62.mail.protection.outlook.com (10.167.249.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7849.8 via Frontend Transport; Fri, 16 Aug 2024 00:56:00 +0000 Received: from rnnvmail204.nvidia.com (10.129.68.6) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Thu, 15 Aug 2024 17:55:43 -0700 Received: from rnnvmail204.nvidia.com (10.129.68.6) by rnnvmail204.nvidia.com (10.129.68.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Thu, 15 Aug 2024 17:55:43 -0700 Received: from Asurada-Nvidia.nvidia.com (10.127.8.12) by mail.nvidia.com (10.129.68.6) with Microsoft SMTP Server id 15.2.1544.4 via Frontend Transport; Thu, 15 Aug 2024 17:55:42 -0700 From: Nicolin Chen To: CC: , , , , , , , , , Subject: [PATCH v12 05/10] iommu/arm-smmu-v3: Make symbols public for CONFIG_TEGRA241_CMDQV Date: Thu, 15 Aug 2024 17:55:26 -0700 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL6PEPF00020E62:EE_|CH2PR12MB4117:EE_ X-MS-Office365-Filtering-Correlation-Id: 4d7a2103-95c7-48da-bac6-08dcbd8e3294 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|36860700013|1800799024|82310400026|376014; X-Microsoft-Antispam-Message-Info: nZ2P4vV+TQmW4li1yU8Ji8W0oldU0Uh9/KapmqBzdL6G4oCGdDKPUtvOQxBnO4K9SO3vRAKP3JmbTEUTxYS5Zx+Xp2NVRF2+ZiduYs9+5x4Fy453zMC72f3MIWEtejweNO2AAWu0JJRM3On0gAUbLjdenZ6IdASwMXWjYGcBYQh6nG7IwkyWtBIQ1Ejn6rSTHxaPfnGYanFU453XA47WQNyCyknwAiCF1vVvphiKBOew4gMaivsIGZNxKngX9zVCRa+wkgcG3ivqdHXuUbljgkdSG5m0Dez0ugagFSzyR+Axz/5a/kAgTTSiY6AXnrBHCQFF5GqihTJrhh8d68ZHCEHIiJC8dBw0riC9Ay2v1KKYydiAmg5L6rBFdGibEuKKove7mW+Or1An8hhlF7qs+khHh40fALTmOZ+Jo6QKf4GEWZOwPYPiSHsT0RhG+jEcRZIA+e9D2NVnjKZi8aOFISkc1lifv3aJSr08oMXRmKdxekiAbtVd3V8wGSpY7yQyIP3QbS17VaJZYy40stCEZDgYeWVP5tZLR7g3Lbb0BSQATxsijuW15uZajq695hchePfG/lpFcDITV2jqBePyBerWoNwZ6A8ZK8FriCgeu5IFN2oJqT8SYXyisgkQ/aMEyjh2TFz25k+lAlTmzaPuhVPreVRZx/yBYRwuumBcU/eiySIuWd9wF/dtPXMrurlptany4vXGKUZ3obH5ABzOw4vHfn+9v1n8JJ0i3QA9iJH54YjEH2GVWiJP4ptHi2fevxgYFLLIhcObfHpam4/e4n/e9Gnu8t/BM5/Fdg1iUkEQ47qLpS9Mm5Saf80jlhAxEFZEH1sG9fC8/DE7ZMxdCHHHf+Avmiyz8MFE8J9A5KkF9QQR+rzTora2rOFrBExWGTIA5cQMhC9QlD/3xVaZKF9aGAALHaUVGAx2Q3xsC94WTxKnBH+qREsRgNiT2RXQlgoEbkWJ0WUTgWZa3yWh8NTP9kUXwnbN2FWgrao56kWeXJGTXp5dw6P0JindrKzDeOZq3JM7VJizAGl0uk+E5gj/jQcgVy2nbvEcwAegR0qr2eelV0UznhuvEYeJq98yIyJF9FjiyQKCCQA5/dOxfma0rLtLq4tn55M8kDP9HTZB8A466L2nRENgNfdemdEqgGrAnlxn7pqadyzUKLrwXCQEk3QsIDeGbTTHC78LnkrigXsZ5lnig5LrpbDWsOIdGAfTaL7DywJawHExM1lZbEJe8uERrkigAbk8OKepkQ3B7cS74V8QTpohLPWJ11VOY5JkJw9occUD7+4ncucpnfn2bL4IpCCIT5/J6DaO/xAn5GY5r5YCQ6xdVT6Zy6XBYve1L7pTKcQVyHZbJPqzfLOWiUKbeZWgFeqPis7pMOQLhadmeOQ3mhu00jzbW9Kde143h9EYgjdRa7S3bNyZYDsaCypwmIDJBzdkvcpNuLfeifBGwZXnCHq3rd2JsUsA X-Forefront-Antispam-Report: CIP:216.228.117.161;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc6edge2.nvidia.com;CAT:NONE;SFS:(13230040)(36860700013)(1800799024)(82310400026)(376014);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Aug 2024 00:56:00.9350 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4d7a2103-95c7-48da-bac6-08dcbd8e3294 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.117.161];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BL6PEPF00020E62.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR12MB4117 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240815_175606_642971_BF00AFE7 X-CRM114-Status: GOOD ( 11.48 ) 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 The symbols __arm_smmu_cmdq_skip_err(), arm_smmu_init_one_queue(), and arm_smmu_cmdq_init() need to be used by the tegra241-cmdqv compilation unit in a following patch. Remove the static and put prototypes in the header. Reviewed-by: Jason Gunthorpe Signed-off-by: Nicolin Chen --- drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 18 ++++++++---------- drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h | 9 +++++++++ 2 files changed, 17 insertions(+), 10 deletions(-) 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 e664c40b14ae..df1149095860 100644 --- a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c +++ b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c @@ -365,8 +365,8 @@ static void arm_smmu_cmdq_build_sync_cmd(u64 *cmd, struct arm_smmu_device *smmu, CMDQ_SYNC_1_MSIADDR_MASK; } -static void __arm_smmu_cmdq_skip_err(struct arm_smmu_device *smmu, - struct arm_smmu_cmdq *cmdq) +void __arm_smmu_cmdq_skip_err(struct arm_smmu_device *smmu, + struct arm_smmu_cmdq *cmdq) { static const char * const cerror_str[] = { [CMDQ_ERR_CERROR_NONE_IDX] = "No error", @@ -3512,12 +3512,10 @@ static struct iommu_dirty_ops arm_smmu_dirty_ops = { }; /* Probing and initialisation functions */ -static int arm_smmu_init_one_queue(struct arm_smmu_device *smmu, - struct arm_smmu_queue *q, - void __iomem *page, - unsigned long prod_off, - unsigned long cons_off, - size_t dwords, const char *name) +int arm_smmu_init_one_queue(struct arm_smmu_device *smmu, + struct arm_smmu_queue *q, void __iomem *page, + unsigned long prod_off, unsigned long cons_off, + size_t dwords, const char *name) { size_t qsz; @@ -3555,8 +3553,8 @@ static int arm_smmu_init_one_queue(struct arm_smmu_device *smmu, return 0; } -static int arm_smmu_cmdq_init(struct arm_smmu_device *smmu, - struct arm_smmu_cmdq *cmdq) +int arm_smmu_cmdq_init(struct arm_smmu_device *smmu, + struct arm_smmu_cmdq *cmdq) { unsigned int nents = 1 << cmdq->q.llq.max_n_shift; diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h index 6c5739f6b90f..6c5dc2f10a33 100644 --- a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h +++ b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h @@ -813,6 +813,15 @@ void arm_smmu_tlb_inv_range_asid(unsigned long iova, size_t size, int asid, int arm_smmu_atc_inv_domain(struct arm_smmu_domain *smmu_domain, unsigned long iova, size_t size); +void __arm_smmu_cmdq_skip_err(struct arm_smmu_device *smmu, + struct arm_smmu_cmdq *cmdq); +int arm_smmu_init_one_queue(struct arm_smmu_device *smmu, + struct arm_smmu_queue *q, void __iomem *page, + unsigned long prod_off, unsigned long cons_off, + size_t dwords, const char *name); +int arm_smmu_cmdq_init(struct arm_smmu_device *smmu, + struct arm_smmu_cmdq *cmdq); + #ifdef CONFIG_ARM_SMMU_V3_SVA bool arm_smmu_sva_supported(struct arm_smmu_device *smmu); bool arm_smmu_master_sva_supported(struct arm_smmu_master *master);