From patchwork Thu Aug 29 22:34:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolin Chen X-Patchwork-Id: 13784002 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 AC49BCA0EC7 for ; Thu, 29 Aug 2024 22:44:39 +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=6Mhq3CecHinKMUbkh0GhnuXYEuTQ+kWywBHUHzQu1Lo=; b=gwtayXmUKto1F+iXMDArYsnAdp orgVTISdF3DTqy5XgrJHGvVCgFjCkh9Gd7HSQkxFyUM24b9S763kM3LZqHAVQ80QTHbUGR+n7E+43 tTyZsPqlO+1QitEcnjwZYOg1ad2HoPWjR2iJBTN5A7SR8gckI7bTNPxi2DzkfnpXWHuvY4eMND9Sc mKpAS/FtSEWLpCsga/6yha6Zgn1gcXxaGRuO2m9ywGPUvzep65eBlC5Kl0VRRHnBzYZWDRsyIr7X4 H5iWrF/cq0nDNpRYEdEE+8iXf3Y/kcgZ4vic1553U59k/EP7A+fHMFaWsk5Cs69qiyTA4T09Y2fNl HHhYi5gg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sjnsV-00000003uVO-0WzQ; Thu, 29 Aug 2024 22:44:31 +0000 Received: from mail-mw2nam12on20601.outbound.protection.outlook.com ([2a01:111:f403:200a::601] helo=NAM12-MW2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sjnjZ-00000003spV-3YGT for linux-arm-kernel@lists.infradead.org; Thu, 29 Aug 2024 22:35:19 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=yCo81Luk9OrR+T37GQjxfsX9Lt0fYfEDw8RmrmvfKtNpO73sP6u5aojNfz+/MAUr1dx15/HnsxYBk93o+oSpdWca70fuDyXGFKKFydF3ej1DMe+bWMOwyYcKK19Uy7KW0VN0uX0ynSkeEtZiv4vabFaReenXapKFRON88bXrlDWiJp/AsglPZ+dwwoyrgDor5l8oj+z0+kVVymQtCqQ+RXf66cYY6tC69JKeBmh/B8sNIP16ogmOvgy2NlwaELTqCdYWtdAHjX5o5XNF5+ZemfDPv73FH3QROLhtVYVfeBt9HrW1HpXYOtHZd5OYO4Mepa1Gi73QUTD5iw5tKOs8Xg== 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=6Mhq3CecHinKMUbkh0GhnuXYEuTQ+kWywBHUHzQu1Lo=; b=uvcMOlgIVAlahCgVOt3K501MvVURIb0y+JfZYnpfNFh98cBKa8Zr1Hg3vnA3zVU8z6dzM3rFJOthe4PSaDK0lfyPRkbJaFS26xRrKBw9IJKoKxK/dhFeqFKJwj1iqDLyoy9Ogw7Z4ittLlfk/VGM8oAf4GEAAsD//lfsgefM56VA8OJkc23C3YfFdQETzbjM60DAO3o98xT2Tci1NEe4FehbnTrVpE6DamNleMx6zQGcHQoWKm/1bZLztI4e6K3aZ0Lvr2Edws/UVPQY6Jm2dcmdGgVuJihbL/D6OvXLDvyrRRYkRRn8SJ3oSD2JY6nLTwL4lYAy9zgfPrMXNm8/Xg== 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=6Mhq3CecHinKMUbkh0GhnuXYEuTQ+kWywBHUHzQu1Lo=; b=NTWUnn2aN1ORDRYR+xO8Xj6ecv8h4jv9eyj8U2SVqMXPZ6NmE7Q3P1pHQz7pphSKOTOVDYCxS/XSnaxp9QlMlQmiKfhz0X3BZKNy98T8XiFT+dcahQlwQuQbbgWK0kPSf1Owl1hkWcFmmPQs7D28LeJjMvkVPmgQx7GtJraE5M+Oq9JLUphpXD0AnvyilmcydK7J0t0e23PqEawsKnugZ/yvNBuANn6EaRzphoU4N2iiIpLCvRwJ/ut9Xn+jlvNsmg1pt/t4IfOBfe+IhobaQVFdTSvvsjnLaM8slcf++VyJWZ9PDlnHUFAvCjveGSYVX34DP87HEbKBv1AsUw99MA== Received: from CH2PR12CA0011.namprd12.prod.outlook.com (2603:10b6:610:57::21) by IA1PR12MB6625.namprd12.prod.outlook.com (2603:10b6:208:3a3::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7897.27; Thu, 29 Aug 2024 22:35:01 +0000 Received: from CH3PEPF00000009.namprd04.prod.outlook.com (2603:10b6:610:57:cafe::32) by CH2PR12CA0011.outlook.office365.com (2603:10b6:610:57::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7897.28 via Frontend Transport; Thu, 29 Aug 2024 22:34:59 +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 CH3PEPF00000009.mail.protection.outlook.com (10.167.244.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7918.13 via Frontend Transport; Thu, 29 Aug 2024 22:34:59 +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, 29 Aug 2024 15:34:47 -0700 Received: from rnnvmail202.nvidia.com (10.129.68.7) 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, 29 Aug 2024 15:34:47 -0700 Received: from Asurada-Nvidia.nvidia.com (10.127.8.13) by mail.nvidia.com (10.129.68.7) with Microsoft SMTP Server id 15.2.1544.4 via Frontend Transport; Thu, 29 Aug 2024 15:34:46 -0700 From: Nicolin Chen To: CC: , , , , , , , , , Subject: [PATCH v14 04/10] iommu/arm-smmu-v3: Make symbols public for CONFIG_TEGRA241_CMDQV Date: Thu, 29 Aug 2024 15:34:33 -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: CH3PEPF00000009:EE_|IA1PR12MB6625:EE_ X-MS-Office365-Filtering-Correlation-Id: 7d40c392-0c5e-4b74-dc54-08dcc87ad0d9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|36860700013|376014|82310400026|1800799024; X-Microsoft-Antispam-Message-Info: McyFWzE7cv1GiUv0L2E7qciaPgh4boemlfJsnVqOhyJeAsv8mfgV9SbqGfZfQcE2eBuD26YLrhVE0nholWyd+4VXaM6G1BWCeZjyQUt5BA2MYzeB6+9DzF7LHfEQiw6e+GK+pSUuFNkg9pMhhZAqCzQ1PnqKQhQHyn4SGr+PcsvThvPRy1hZjRzaTlFwcmWlU3dyrGXGyyJM4JVdD2AxBI/R7H1/XBeHcMjVogSMCVb1wo1NoR+yZ0AnFkPKrY4wDtwLRBmZ1aevXqANoBTdzvAKw/DYgDlyWfVH6gEEeeroSKwsKLPD+7Q313CsnumTaL1AoSJdIJlAhRfJ+x8Enpl3CGWcP7bWOphA7Y0ByZ0ZSnkYTF7Ssrizml+JupA0RVSLSSOFiV2biw3OGWURtfjwwFyHUuZPp+jgUbeUGEfBm9KBWAru1ZB5JQR7RmP317BpQZ1ks3gtxdo+RvIvcyQD65tAyP3QrCSvoRoVLKG6pZy+okeRcrJt49nrmEaN3fw92bLxupA9efnIwOhq+ZVR/HREWHrhZB9pLQuSfvgGroAWerp/QC/6dW+LBHNFT0PuUzrMFJxp76wr/X11dX/PW9Nl8D6Tj2EExeKRH3ykWzGxmaMDalWEkDf6JFO2dvQUp2mU5+WDXqJyMuP/C4326lpOHZK57X3owVZTxdfh8Tn/zx4CEx8mqP+KujxsahewDlDlxzJXYhYr+olAWqojW5he8vrtSk2WjczXAi80lzULfUA+spm67yZjLKALI57XMNkABOXeDvoIYJMsdZujn84DfRWwtHV7TC91yTF2utBfZzBCeXoP+6vnzuxa18sG+1xKVF11X+aruFrQxQJyS0p0ZCAw7p6rwZOGHkrHr1dgPWDx1HGx6UdAQyWQWDahlyqdSCZ2+Emqf2Xs3cfONSBb+n1U+DTqFlFtzcqdeepXXsZI5jhkE0+1i/zrWbpK8aoZE13GYpj/0saORnHsGisxOiO2TYdd8IBAhzblxjnEOivjKN/YVXnXdYppwSC8Xd0WkXHAkJWRB9jPYbgfs60k+1m07rHu+C5IDIe72xyjggJyW0m3wut696sJ5I88MAgfDFXbCWKAIeKWrUVCLyTmevmDKCen0AQ+RT0WsntSgSNllJ0aaFjS3UaEPE4qlDLNq1mivf1hN4QQ0RRmtMjB1D0QwA9tiGGmpqJDvQSHoOW5Uj7PjYH5NJeOKWAHYBBH/hGRGJFk+UYrwDk0UTuHn0ETs97kVyH900cYGbJO9iF9FufEt4E37CEX4kQo9b+KpuzDYYG13YeZ5aH5yZtRxRmxXrtbcTGA+nnsmmB3EcJmiavTYhd1F0kOC76quEp1BD1P7u8X3WsrcrLD1QfNx/QccJtXuO4fxp2mrer/4XeStAZ82o16MBWOlBWSyyQPzliSK8u8oV6vqKSn0o+nLkaRe7+lPEU9Yqy/7VbpxEDRa2oJhLkUTZYC 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)(376014)(82310400026)(1800799024);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Aug 2024 22:34:59.3553 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7d40c392-0c5e-4b74-dc54-08dcc87ad0d9 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: CH3PEPF00000009.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB6625 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240829_153517_909373_B89A2130 X-CRM114-Status: GOOD ( 12.04 ) 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 22578d1aa268..061a61f4ff0a 100644 --- a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c +++ b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c @@ -371,8 +371,8 @@ static void arm_smmu_cmdq_build_sync_cmd(u64 *cmd, struct arm_smmu_device *smmu, arm_smmu_cmdq_build_cmd(cmd, &ent); } -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", @@ -3521,12 +3521,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; @@ -3564,8 +3562,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 ba24f9efc5c9..50efc804f91c 100644 --- a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h +++ b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h @@ -816,6 +816,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);