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: 1972995 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=Nvidia.com header.i=@Nvidia.com header.a=rsa-sha256 header.s=selector2 header.b=iFf7Pomx; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2604:1380:45e3:2400::1; helo=sv.mirrors.kernel.org; envelope-from=linux-tegra+bounces-3284-incoming=patchwork.ozlabs.org@vger.kernel.org; receiver=patchwork.ozlabs.org) Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [IPv6:2604:1380:45e3:2400::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WlNpc4ttSz1yfB for ; Fri, 16 Aug 2024 10:56:08 +1000 (AEST) 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 6BC45282B1D for ; Fri, 16 Aug 2024 00:56:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 197A8BA33; Fri, 16 Aug 2024 00:56:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="iFf7Pomx" X-Original-To: linux-tegra@vger.kernel.org Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2064.outbound.protection.outlook.com [40.107.92.64]) (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 4B9FF3BB30; Fri, 16 Aug 2024 00:56:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.92.64 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723769766; cv=fail; b=sVnACwItP8uCmzFZusUd2wBznmKP+5SQdDUiBH3MW6P/h9lEBbjPOSIwedYSfTZ4U2GGE7SSQbW0+vd5ixmqJZQJqUZxLeUxtVdFjnCoLF5XB58xRsn48y7T/rS2zQFSH3A4dk+AYMxvxWm1n9DPSNis7+UNaKASu8gXgxGIAYY= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723769766; c=relaxed/simple; bh=05h5kmXHey6y+aGU2U4EsCITU6D1QD6cGbX2bcb4Ui4=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Nxdbsv+Eig7Loxsn9MLWLvmtEY97snux1hA6R/xjiNvxYQdGfNbuhQ7f4iQECKmDzG1PmyD4eJawQxZIm238qnvGH/gZyFZIGAukBEF8QA/fCGNxfIbCTJ3itxZk8yLBD7jDtkMQGMhtJgFEtiM+pJnQivmLsc0I2/wr2PD2+Ig= 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=iFf7Pomx; arc=fail smtp.client-ip=40.107.92.64 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=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: Precedence: bulk X-Mailing-List: linux-tegra@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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+TQmW4li1yU8Ji8W0oldU0U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LtLq4tn55M8kDP9HTZB8A466L2nRENgNfdemdEqgGrAnlxn7pqadyzUKLrwXCQEk3QsIDeGbTTHC78LnkrigXsZ5lnig5LrpbDWsOIdGAfTaL7DywJawHExM1lZbEJe8uERrkigAbk8OKepkQ3B7cS74V8QTpohLPWJ11VOY5JkJw9occUD7+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 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);