From patchwork Wed Dec 11 23:39:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Bowman, Terry" X-Patchwork-Id: 13904507 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2042.outbound.protection.outlook.com [40.107.93.42]) (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 53D641FF5F6; Wed, 11 Dec 2024 23:42:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.93.42 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733960537; cv=fail; b=SIDaNhEVcaicwgaCUgxrO8UQkcd11OBrdQcypnh+P2AAG2hVa0ri2YFaqkENynlNGe+JVOQJ5roHGbSfg7fAPD7rZEWZfZ765xy+vWn2RuhsS1NP5eUEwFeStPelIFDzYe/DrCA9BDhT34HqKkonLQe4u47eg4hWURy/9nS75e4= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733960537; c=relaxed/simple; bh=39GJQqT4d69UwG7+2o8u98MflRWCc3eZEHSAHjeKQ8E=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=m7S2VegbDKLocNWUbLp4g3TO6iWY1LWPRZGbZn3TnGkvhV84gqwGC4Bnl3LsrEjJ0k55Y/3cQ13AeLTGTy6PVMA/queFZ/QwGFFhlDsyiIuGroPCbClFAdgKdF/zPngJEzT8vDXdCQusQp8n8fR/iS88dEodvBKoXtPOzfWXn44= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=guc3UBN2; arc=fail smtp.client-ip=40.107.93.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="guc3UBN2" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=mfgW0JM0jGD9bk2Gf3U+UGXAf8XjXPrrkHru5tXVWRAsDnjH1dDOjz09xUvmtgt37An6ptUWbUzrxsg1VZc5ySbMcUW+RH9Srp3mhLX4oqgfgt8q6FeTEcsm08/wJGQUOPgAzQtLi1uoP37VFvK7/G21HozsSQenRsdhWFfYmQPcw7DHKaAHNbTlRIIn0IqRY9NR3X3PV049FOrlv8riNFOTsvuVb1brJeItBfWwMyxdbuUfgee+sMXOSsHN4Y/f4miUOaD+boacyjxdujf+qUiJ2yl3g37edCfkMeE5Pk2jLEAK99d1Cedf/RqmZkW0N2Kte9gE6L1+KaTq7b5V3g== 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=e7hYzg+A3U8mzpynyVVyB2FoHSrp21VftyBBfDlR+JM=; b=K0OfZFPfU44rA2hbzxbkpvCkBBX1QQLCUAts9JDGrukYtvqukUVu6DAJCDCKYLrU/UibUomusPQhv7lY9i2yZUepftZ/0MxsUKQtOA831cjqWwd8jggn4bPv5G42gUwyVHasAWaz4ZdBQ9j4f5rN9rljuwe9LBnMwyEGLXHd69nq5vwZw2nGf9s2SIIJHkJh1LD6zaQU2q0w1mbHizCkat8pmNmerG+NgS/unsKThyTaaHGgSv7wMohPAUVRKahpFlcENsatAV0+4uI8YRx4zXMxPGh0zoJxIbrD+FEhSxkq7eLuCqFMhBGCyiT4snQGll9eUJY0vViASUgi8GdpjQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=e7hYzg+A3U8mzpynyVVyB2FoHSrp21VftyBBfDlR+JM=; b=guc3UBN2gJ46FGAv4XgNDRFQ7r6jN5BNhp3onPo/+7g0yF/PUZhvWLo2NF8zqnaHxzJN766rbfI/Gzflqy92aHn8PMt3gTNK0A3JYFuKGZV5rrTNd2bchAIVXIKvJqBGDh40BDqwChYR3c2dxJBW8Dvy1f++BX2r14+5UBaK1Ic= Received: from BLAPR03CA0046.namprd03.prod.outlook.com (2603:10b6:208:32d::21) by PH0PR12MB7011.namprd12.prod.outlook.com (2603:10b6:510:21c::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8230.19; Wed, 11 Dec 2024 23:42:11 +0000 Received: from BN2PEPF0000449E.namprd02.prod.outlook.com (2603:10b6:208:32d:cafe::b6) by BLAPR03CA0046.outlook.office365.com (2603:10b6:208:32d::21) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8230.15 via Frontend Transport; Wed, 11 Dec 2024 23:42:10 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by BN2PEPF0000449E.mail.protection.outlook.com (10.167.243.149) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8251.15 via Frontend Transport; Wed, 11 Dec 2024 23:42:10 +0000 Received: from ethanolx7ea3host.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Wed, 11 Dec 2024 17:42:09 -0600 From: Terry Bowman To: , , , , , , , , , , , , , , , , , , , , , Subject: [PATCH v4 11/15] cxl/pci: Change find_cxl_port() to non-static Date: Wed, 11 Dec 2024 17:39:58 -0600 Message-ID: <20241211234002.3728674-12-terry.bowman@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241211234002.3728674-1-terry.bowman@amd.com> References: <20241211234002.3728674-1-terry.bowman@amd.com> Precedence: bulk X-Mailing-List: linux-cxl@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN2PEPF0000449E:EE_|PH0PR12MB7011:EE_ X-MS-Office365-Filtering-Correlation-Id: b5af011a-c664-4b1d-c438-08dd1a3d6e70 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|36860700013|7416014|376014|82310400026|921020; X-Microsoft-Antispam-Message-Info: 0qQPLvHauvgFi8qYIfs3v2MomZiQ98cujpg6Bu2gIB8u91OchPsVla6NsjvGSCPQ5xCA7e1XRYtm96x6rNi4ZW+dN+SdFJw1YCoXjAdlsGP2a2F1W13oq4rsTf+2hKgmq4KaXvGpTJuo4/Y3jq7PCDMovVnLrcmilHXyZXLfsKZbw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rGeA6FyiedwyWGXE/L08Fnj3jty+P0suBiqBg/FYx7+k9CwlXtFKA0e+mAqXBxbThOLymsOrr0ktloee4qLbRvWqbfOvhHWmq0+jYbGzKmdOpZZeV4gi6yZ50rse2PUUIcM7nquW21vgz/2LjmYvwUfsS27f765Qzbf0Ds2QP0dXS1nj99ghbXM7aC5dgur2CEA0r+O6lkuSBJMt0nzai39DeVqYPfuOlGJk20/ku1ZwO/NX0Nw== X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(1800799024)(36860700013)(7416014)(376014)(82310400026)(921020);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Dec 2024 23:42:10.4064 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b5af011a-c664-4b1d-c438-08dd1a3d6e70 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BN2PEPF0000449E.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR12MB7011 CXL PCIe Port protocol error support will be added in the future. This requires searching for a CXL PCIe Port device in the CXL topology as provided by find_cxl_port(). But, find_cxl_port() is defined static and as a result is not callable outside of this source file. Update the find_cxl_port() declaration to be non-static. Signed-off-by: Terry Bowman Reviewed-by: Jonathan Cameron --- drivers/cxl/core/core.h | 3 +++ drivers/cxl/core/port.c | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/cxl/core/core.h b/drivers/cxl/core/core.h index 0c62b4069ba0..d81e5ee25f58 100644 --- a/drivers/cxl/core/core.h +++ b/drivers/cxl/core/core.h @@ -110,4 +110,7 @@ bool cxl_need_node_perf_attrs_update(int nid); int cxl_port_get_switch_dport_bandwidth(struct cxl_port *port, struct access_coordinate *c); +struct cxl_port *find_cxl_port(struct device *dport_dev, + struct cxl_dport **dport); + #endif /* __CXL_CORE_H__ */ diff --git a/drivers/cxl/core/port.c b/drivers/cxl/core/port.c index af92c67bc954..1c4daf9fd2f3 100644 --- a/drivers/cxl/core/port.c +++ b/drivers/cxl/core/port.c @@ -1342,8 +1342,8 @@ static struct cxl_port *__find_cxl_port(struct cxl_find_port_ctx *ctx) return NULL; } -static struct cxl_port *find_cxl_port(struct device *dport_dev, - struct cxl_dport **dport) +struct cxl_port *find_cxl_port(struct device *dport_dev, + struct cxl_dport **dport) { struct cxl_find_port_ctx ctx = { .dport_dev = dport_dev,