From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=210.61.82.184 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796459652; b=KpzFzGrtpAjrLBnVHs4tocnKvG+12JHFmoJUqTqR5794WIB3l7zEiqpRnYuyxsnMY1hU ax5SWC15ZBlD/3KWzj1aq+kocCN61fw4ogqi+7fRYNNvhiFZSzP4eGjPPEiSiDTeCD/H5 8k2mJJMt5rcIjKC/1Wm4xZ/LoMQ+pCncyC0++k6SiqJnQRpnWinRaU8IelQpbaNYhSj72 /gCcwA7RX8u8FPYibM8f4tx3VksCizalOoSmtbi5mZPqy0wcfvd7C4errQVfhBMw/lFYy Om9NnLlcB5sLSVuz8OjFZO+uP+shy/Up1tQSxr1DGZxsbNNiXv0h/ECq/yOJ+zqoEog== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796459652; h=DMARC-Filter:X-UUID:DKIM-Signature:X-CID-P-RULE:X-CID-O-INFO: X-CID-META:X-CID-BVR:X-CID-BAS:X-CID-FACTOR:X-CID-RHF:X-UUID:Received: Received:Received:From:To:CC:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:MIME-Version:Content-Type: Content-Transfer-Encoding:X-MTK; bh=VbXOBm3h1dAPIbx9o25Vl6YEr56Ew2PKjn7Gn3k7y9w=; b=4kp4ehqIC2lyg9s+W286dkNQcXj7ZCLHeL9JBmwG2Wo0w9oeRZkwzwofVHB7UmcNto6o 9ekKYx8j3X6OSZGZkzoxOmmYLS2qUjSbUgX4qpFuoxsMi03SGLdXN6OA+LkxTrRjJuFqs zQEkYJG1ryMu4lvYZnAZ22ax2CeMODIqJ0BuuXW9849pnfdIppHCwz3rQ0XNqyakCYi4F fFH4Jjr9UN10Np3w1OCB9IFfokROZd+fSTgh2VwtgaECC8OIf/PjWHiSJ2G+L6vCuKp/z FG4M31V3W/3zZget1BAo/IxlQdTdooE5JTHpg2SdD+VcnfGvr/2d8KGTQHRHPxWd7fw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=mediatek.com; spf=pass smtp.mailfrom=mediatek.com; dkim=pass header.d=mediatek.com header.i=@mediatek.com header.a=rsa-sha256 header.s=dk header.b=Wj3F1siX; arc=none smtp.remote-ip=210.61.82.184 Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 27D54606A6A4; Sat, 5 Dec 2026 08:34:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 27D54606A6A4 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=mediatek.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mediatek.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.a=rsa-sha256 header.s=dk header.b=Wj3F1siX X-UUID: a2123a10f08611f1a7aecdb2598be72c-20261205 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=VbXOBm3h1dAPIbx9o25Vl6YEr56Ew2PKjn7Gn3k7y9w=; b=Wj3F1siXLHTxLmUTQc3+1vmOL0sij9b11ZxdPRG+j5ImxJFZJ16J7LGpjV1Hl3RygbBlvaP7at4bxtWMDTesE+ZXSYwGiKvQDxap5T2IiVFueuAF/Sp4n1jKSdmttXa7/AqoyaKqZ/PWGvcDYXuJ9yoxMXi8kAk5vw/Pyb7N7X8=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.3.22,REQID:b1916084-3f9f-431a-a25c-758ac9578e37,IP:0,U RL:0,TC:0,Content:-25,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTIO N:release,TS:-25 X-CID-META: VersionHash:d36851b,CLOUDID:01027e1a-ae4c-4a2b-b1c4-72e411efd0c9,B ulkID:nil,BulkQuantity:0,SF:81|82|102|136|836|865|888|898,TC:-5,Content:0| 15|50|99,EDM:-3|-100,IP:nil,URL:0,File:130,RT:0,Bulk:nil,QS:nil,BEC:nil,CO L:0,OSI:0,OSA:0,AV:0,LES:1,SPR:NO,DKR:0,DKP:0,BRR:0,BRE:0,ARC:0 X-CID-BVR: 2,SSN|SDN X-CID-BAS: 2,SSN|SDN,0,_ X-CID-FACTOR: TF_CID_SPAM_SNR X-CID-RHF: D41D8CD98F00B204E9800998ECF8427E X-UUID: a2123a10f08611f1a7aecdb2598be72c-20261205 Received: from mtkmbs09n1.mediatek.inc [(172.21.101.35)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 661700762; Sat, 05 Dec 2026 16:34:06 +0800 Received: from mtkmbs13n1.mediatek.inc (172.21.101.193) by mtkmbs11n1.mediatek.inc (172.21.101.185) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.56; Sat, 5 Dec 2026 16:34:04 +0800 Received: from gcnsap21.gcn.mediatek.inc (10.17.81.22) by mtkmbs13n1.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.2562.56 via Frontend Transport; Sat, 5 Dec 2026 16:34:04 +0800 From: Chunfeng Yun To: Mika Westerberg CC: Andreas Noever , Konrad Dybcio , Sven Peter , Yehezkel Bernat , Matthias Brugger , Greg Kroah-Hartman , AngeloGioacchino Del Regno , , , , , Chunfeng Yun Subject: [PATCH v4 09/14] thunderbolt: Make PCIe NHI support opt-in Date: Sat, 5 Dec 2026 16:33:34 +0800 Message-ID: <20261205083342.4009278-10-chunfeng.yun@mediatek.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20261205083342.4009278-1-chunfeng.yun@mediatek.com> References: <20261205083342.4009278-1-chunfeng.yun@mediatek.com> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-MTK: N From: Konrad Dybcio Currently, the USB4/Thunderbolt subsystem directly depends on PCI, tightly bundling the core framework with the PCIe-attached Native Host Interface (NHI) driver (pci.c) and the Intel Connection Manager (icm.c) into a single module (thunderbolt.o). With support for platform/SoC-attached USB4 host controllers coming in (such as on ARM64 systems), the core USB4 framework should no longer have a hard dependency on PCI. Furthermore, embedded or SoC systems without PCIe-attached host routers should be able to omit PCIe NHI support to reduce kernel footprint. Decouple the PCIe NHI and ICM drivers from the core framework: 1. Kconfig & Makefile: - Remove "depends on PCI" from CONFIG_USB4. - Introduce CONFIG_USB4_PCI to build PCIe NHI and ICM support as a separate module (thunderbolt_pci.ko). 2. Driver Registration: - Make the core thunderbolt module standalone by converting tb_domain_init/exit() to postcore_initcall() and module_exit(). - Register the PCIe driver in thunderbolt_pci via module_pci_driver(). 3. Symbol Exports: - Export necessary APIs required by pci and platform drivers. Signed-off-by: Konrad Dybcio Signed-off-by: Chunfeng Yun --- v4: * split .select_cm() change into new patch 08/14 in the series * drop tb_bus_type, tb_switch_type, tb_domain_remove and nhi_shutdown exports * add tb_domain_complete_rpm, tb_to_switch, tb_switch_has_children and tb_nhi_remove exports v3: Added 'default USB4' to CONFIG_USB4_PCI in Kconfig; Exported tb_xdomain_remove symbol immediately after its definition; v2: cherry-pick the patch of Konrad to fix the issues of this series, and also do some changes: * Renamed CONFIG_USB4_PCIE and thunderbolt_pcie.ko to CONFIG_USB4_PCI and thunderbolt_pci.ko. * Updated exported NHI symbols to standard tb_ / tb_ring_ prefixes (e.g., ring_msix → tb_ring_msix, nhi_msi → tb_nhi_isr). * Eliminated exports for nhi_mailbox_* and nhi_interrupt_work by keeping them internal/static (handled by preparatory patches in v2). * Added missing trailing semicolon to module_pci_driver(nhi_driver);. * Expanded the commit message; * Fix cherry-pick conflict caused by .reset_interface(); --- drivers/thunderbolt/Kconfig | 12 +++++++++++- drivers/thunderbolt/Makefile | 7 +++++-- drivers/thunderbolt/ctl.c | 6 +++++- drivers/thunderbolt/domain.c | 13 +++++++++++-- drivers/thunderbolt/nhi.c | 4 ++++ drivers/thunderbolt/pci.c | 27 ++------------------------- drivers/thunderbolt/switch.c | 10 ++++++++++ drivers/thunderbolt/tb.h | 2 -- drivers/thunderbolt/tunnel.c | 1 + drivers/thunderbolt/xdomain.c | 5 +++++ 10 files changed, 54 insertions(+), 33 deletions(-) diff --git a/drivers/thunderbolt/Kconfig b/drivers/thunderbolt/Kconfig index 294b3227a545..80960555a364 100644 --- a/drivers/thunderbolt/Kconfig +++ b/drivers/thunderbolt/Kconfig @@ -1,7 +1,6 @@ # SPDX-License-Identifier: GPL-2.0-only menuconfig USB4 tristate "Unified support for USB4 and Thunderbolt" - depends on PCI select APPLE_PROPERTIES if EFI_STUB && X86 select CRC32 select CRYPTO_LIB_SHA256 @@ -18,6 +17,17 @@ menuconfig USB4 if USB4 +config USB4_PCI + tristate "Support for PCIe-attached USB4 and Thunderbolt controllers" + depends on PCI + default USB4 + help + Say Y here to add support for the USB4 and Thunderbolt host + routers attached over the PCIe bus, commonly found on x86 PCs. + + To compile this driver a module, choose M here. The module will be + called thunderbolt_pci. + config USB4_CONFIGFS def_tristate USB4 depends on CONFIGFS_FS && !(USB4=y && CONFIGFS_FS=m) diff --git a/drivers/thunderbolt/Makefile b/drivers/thunderbolt/Makefile index beb054c3126b..a563bf2b0345 100644 --- a/drivers/thunderbolt/Makefile +++ b/drivers/thunderbolt/Makefile @@ -1,10 +1,13 @@ # SPDX-License-Identifier: GPL-2.0-only ccflags-y := -I$(src) obj-${CONFIG_USB4} := thunderbolt.o -thunderbolt-objs := nhi.o ctl.o tb.o switch.o cap.o pci.o path.o tunnel.o eeprom.o -thunderbolt-objs += domain.o dma_port.o icm.o property.o xdomain.o lc.o tmu.o usb4.o +thunderbolt-objs := nhi.o ctl.o tb.o switch.o cap.o path.o tunnel.o eeprom.o +thunderbolt-objs += domain.o dma_port.o property.o xdomain.o lc.o tmu.o usb4.o thunderbolt-objs += usb4_port.o nvm.o retimer.o quirks.o clx.o +obj-${CONFIG_USB4_PCI} += thunderbolt_pci.o +thunderbolt_pci-y := pci.o icm.o + thunderbolt-${CONFIG_ACPI} += acpi.o thunderbolt-$(CONFIG_DEBUG_FS) += debugfs.o thunderbolt-$(CONFIG_USB4_CONFIGFS) += configfs.o diff --git a/drivers/thunderbolt/ctl.c b/drivers/thunderbolt/ctl.c index 965988b18608..96717a0a94b1 100644 --- a/drivers/thunderbolt/ctl.c +++ b/drivers/thunderbolt/ctl.c @@ -9,7 +9,6 @@ #include #include #include -#include #include #include @@ -96,6 +95,7 @@ struct tb_cfg_request *tb_cfg_request_alloc(void) return req; } +EXPORT_SYMBOL_GPL(tb_cfg_request_alloc); /** * tb_cfg_request_get() - Increase refcount of a request @@ -128,6 +128,7 @@ void tb_cfg_request_put(struct tb_cfg_request *req) kref_put(&req->kref, tb_cfg_request_destroy); mutex_unlock(&tb_cfg_request_lock); } +EXPORT_SYMBOL_GPL(tb_cfg_request_put); static int tb_cfg_request_enqueue(struct tb_ctl *ctl, struct tb_cfg_request *req) @@ -575,6 +576,7 @@ int tb_cfg_request(struct tb_ctl *ctl, struct tb_cfg_request *req, tb_cfg_request_dequeue(req); return ret; } +EXPORT_SYMBOL_GPL(tb_cfg_request); /** * tb_cfg_request_cancel() - Cancel a control request @@ -634,6 +636,7 @@ struct tb_cfg_result tb_cfg_request_sync(struct tb_ctl *ctl, return req->result; } +EXPORT_SYMBOL_GPL(tb_cfg_request_sync); /* public interface, alloc/start/stop/free */ @@ -1009,6 +1012,7 @@ struct tb_cfg_result tb_cfg_read_raw(struct tb_ctl *ctl, void *buffer, memcpy(buffer, &reply.data, 4 * length); return res; } +EXPORT_SYMBOL_GPL(tb_cfg_read_raw); /** * tb_cfg_write_raw() - write from buffer into config space diff --git a/drivers/thunderbolt/domain.c b/drivers/thunderbolt/domain.c index 075e0f8af1e8..6c01768a2d54 100644 --- a/drivers/thunderbolt/domain.c +++ b/drivers/thunderbolt/domain.c @@ -421,6 +421,7 @@ struct tb *tb_domain_alloc(struct tb_nhi *nhi, int timeout_msec, size_t privsize return NULL; } +EXPORT_SYMBOL_GPL(tb_domain_alloc); /** * tb_domain_add() - Add domain to the system @@ -880,6 +881,7 @@ int tb_domain_unregister_unplugged_xdomains(struct tb *tb) return ctx.n; } +EXPORT_SYMBOL_GPL(tb_domain_unregister_unplugged_xdomains); static int complete_rpm(struct device *dev, void *data) { @@ -904,8 +906,9 @@ void tb_domain_complete_rpm(struct tb *tb, struct tb_switch *sw) complete_rpm(&sw->dev, tb); bus_for_each_dev(&tb_bus_type, &sw->dev, tb, complete_rpm); } +EXPORT_SYMBOL_GPL(tb_domain_complete_rpm); -int tb_domain_init(void) +static int __init tb_domain_init(void) { int ret; @@ -931,7 +934,7 @@ int tb_domain_init(void) return ret; } -void tb_domain_exit(void) +static void __exit tb_domain_exit(void) { bus_unregister(&tb_bus_type); ida_destroy(&tb_domain_ida); @@ -941,3 +944,9 @@ void tb_domain_exit(void) tb_debugfs_exit(); tb_configfs_exit(); } + +postcore_initcall(tb_domain_init); +module_exit(tb_domain_exit); + +MODULE_DESCRIPTION("Thunderbolt/USB4 core driver"); +MODULE_LICENSE("GPL"); diff --git a/drivers/thunderbolt/nhi.c b/drivers/thunderbolt/nhi.c index 384493d80839..a2d5a5b13b9b 100644 --- a/drivers/thunderbolt/nhi.c +++ b/drivers/thunderbolt/nhi.c @@ -546,6 +546,7 @@ irqreturn_t tb_ring_msix(int irq, void *data) return IRQ_HANDLED; } +EXPORT_SYMBOL_GPL(tb_ring_msix); static int nhi_alloc_hop(struct tb_nhi *nhi, struct tb_ring *ring) { @@ -1341,6 +1342,7 @@ int tb_nhi_probe(struct tb_nhi *nhi) nhi_shutdown(nhi); return res; } +EXPORT_SYMBOL_GPL(tb_nhi_probe); /** * tb_nhi_remove() - Remove and release NHI instance and its domain @@ -1370,6 +1372,7 @@ void tb_nhi_remove(struct tb_nhi *nhi, bool reset) wait_for_completion(&nhi->domain_released); nhi_shutdown(nhi); } +EXPORT_SYMBOL_GPL(tb_nhi_remove); /* * The tunneled pci bridges are siblings of us. Use resume_noirq to reenable @@ -1392,3 +1395,4 @@ const struct dev_pm_ops tb_nhi_pm_ops = { .runtime_suspend = nhi_runtime_suspend, .runtime_resume = nhi_runtime_resume, }; +EXPORT_SYMBOL_GPL(tb_nhi_pm_ops); diff --git a/drivers/thunderbolt/pci.c b/drivers/thunderbolt/pci.c index 379677362b40..7e68831df449 100644 --- a/drivers/thunderbolt/pci.c +++ b/drivers/thunderbolt/pci.c @@ -690,7 +690,7 @@ static struct pci_device_id nhi_ids[] = { }; MODULE_DEVICE_TABLE(pci, nhi_ids); -MODULE_DESCRIPTION("Thunderbolt/USB4 core driver"); +MODULE_DESCRIPTION("PCIe-attached Thunderbolt/USB4 host interface driver"); MODULE_LICENSE("GPL"); static struct pci_driver nhi_driver = { @@ -701,27 +701,4 @@ static struct pci_driver nhi_driver = { .shutdown = nhi_pci_shutdown, .driver.pm = &tb_nhi_pm_ops, }; - -static int __init nhi_init(void) -{ - int ret; - - ret = tb_domain_init(); - if (ret) - return ret; - - ret = pci_register_driver(&nhi_driver); - if (ret) - tb_domain_exit(); - - return ret; -} - -static void __exit nhi_unload(void) -{ - pci_unregister_driver(&nhi_driver); - tb_domain_exit(); -} - -rootfs_initcall(nhi_init); -module_exit(nhi_unload); +module_pci_driver(nhi_driver); diff --git a/drivers/thunderbolt/switch.c b/drivers/thunderbolt/switch.c index 0388c20c574a..63ffc48738c9 100644 --- a/drivers/thunderbolt/switch.c +++ b/drivers/thunderbolt/switch.c @@ -2410,6 +2410,7 @@ struct tb_switch *tb_to_switch(const struct device *dev) return NULL; } +EXPORT_SYMBOL_GPL(tb_to_switch); static int tb_switch_get_generation(struct tb_switch *sw) { @@ -2585,6 +2586,7 @@ struct tb_switch *tb_switch_alloc(struct tb *tb, struct device *parent, return ERR_PTR(ret); } +EXPORT_SYMBOL_GPL(tb_switch_alloc); /** * tb_switch_alloc_safe_mode() - allocate a switch that is in safe mode @@ -2624,6 +2626,7 @@ tb_switch_alloc_safe_mode(struct tb *tb, struct device *parent, u64 route) return sw; } +EXPORT_SYMBOL_GPL(tb_switch_alloc_safe_mode); /** * tb_switch_configure() - Uploads configuration to the switch @@ -3452,6 +3455,7 @@ int tb_switch_add(struct tb_switch *sw) return ret; } +EXPORT_SYMBOL_GPL(tb_switch_add); /** * tb_switch_remove() - Remove and release a switch @@ -3497,6 +3501,7 @@ void tb_switch_remove(struct tb_switch *sw) dev_info(&sw->dev, "device disconnected\n"); device_unregister(&sw->dev); } +EXPORT_SYMBOL_GPL(tb_switch_remove); /** * tb_sw_set_unplugged() - set is_unplugged on switch and downstream switches @@ -3842,6 +3847,7 @@ struct tb_switch *tb_switch_find_by_link_depth(struct tb *tb, u8 link, u8 depth) return NULL; } +EXPORT_SYMBOL_GPL(tb_switch_find_by_link_depth); /** * tb_switch_find_by_uuid() - Find switch by UUID @@ -3868,6 +3874,7 @@ struct tb_switch *tb_switch_find_by_uuid(struct tb *tb, const uuid_t *uuid) return NULL; } +EXPORT_SYMBOL_GPL(tb_switch_find_by_uuid); /** * tb_switch_find_by_route() - Find switch by route string @@ -3897,6 +3904,7 @@ struct tb_switch *tb_switch_find_by_route(struct tb *tb, u64 route) return NULL; } +EXPORT_SYMBOL_GPL(tb_switch_find_by_route); /** * tb_switch_find_port() - return the first port of @type on @sw or NULL @@ -3917,6 +3925,7 @@ struct tb_port *tb_switch_find_port(struct tb_switch *sw, return NULL; } +EXPORT_SYMBOL_GPL(tb_switch_find_port); static int check_for_device(struct device *dev, void *data) { @@ -3936,6 +3945,7 @@ bool tb_switch_has_children(struct tb_switch *sw) ret = device_for_each_child(&sw->dev, NULL, check_for_device); return ret > 0; } +EXPORT_SYMBOL_GPL(tb_switch_has_children); /* * Can be used for read/write a specified PCIe bridge for any Thunderbolt 3 diff --git a/drivers/thunderbolt/tb.h b/drivers/thunderbolt/tb.h index d6c188922ca1..5516e0340610 100644 --- a/drivers/thunderbolt/tb.h +++ b/drivers/thunderbolt/tb.h @@ -768,8 +768,6 @@ extern const struct device_type tb_retimer_type; extern const struct device_type tb_switch_type; extern const struct device_type usb4_port_device_type; -int tb_domain_init(void); -void tb_domain_exit(void); int tb_xdomain_init(void); void tb_xdomain_exit(void); diff --git a/drivers/thunderbolt/tunnel.c b/drivers/thunderbolt/tunnel.c index 2b911372001c..c92f181f181d 100644 --- a/drivers/thunderbolt/tunnel.c +++ b/drivers/thunderbolt/tunnel.c @@ -274,6 +274,7 @@ void tb_tunnel_event(struct tb *tb, enum tb_tunnel_event event, kfree(envp[1]); kfree(envp[0]); } +EXPORT_SYMBOL_GPL(tb_tunnel_event); static inline void tb_tunnel_set_active(struct tb_tunnel *tunnel, bool active) { diff --git a/drivers/thunderbolt/xdomain.c b/drivers/thunderbolt/xdomain.c index b187a60663f5..8ebe6cc18f60 100644 --- a/drivers/thunderbolt/xdomain.c +++ b/drivers/thunderbolt/xdomain.c @@ -86,6 +86,7 @@ bool tb_is_xdomain_enabled(void) { return tb_xdomain_enabled && tb_acpi_is_xdomain_allowed(); } +EXPORT_SYMBOL_GPL(tb_is_xdomain_enabled); static bool tb_xdomain_match(const struct tb_cfg_request *req, const struct ctl_pkg *pkg) @@ -2196,6 +2197,7 @@ struct tb_xdomain *tb_xdomain_alloc(struct tb *tb, struct device *parent, return NULL; } +EXPORT_SYMBOL_GPL(tb_xdomain_alloc); /** * tb_xdomain_add() - Add XDomain to the bus @@ -2211,6 +2213,7 @@ void tb_xdomain_add(struct tb_xdomain *xd) /* Start exchanging properties with the other host */ start_handshake(xd); } +EXPORT_SYMBOL_GPL(tb_xdomain_add); static int unregister_service(struct device *dev, void *data) { @@ -2252,6 +2255,7 @@ void tb_xdomain_remove(struct tb_xdomain *xd) put_device(&xd->dev); } } +EXPORT_SYMBOL_GPL(tb_xdomain_remove); /** * tb_xdomain_unregister() - Unregister XDomain @@ -2593,6 +2597,7 @@ struct tb_xdomain *tb_xdomain_find_by_link_depth(struct tb *tb, u8 link, xd = switch_find_xdomain(tb->root_switch, &lookup); return tb_xdomain_get(xd); } +EXPORT_SYMBOL_GPL(tb_xdomain_find_by_link_depth); /** * tb_xdomain_find_by_route() - Find an XDomain by route string -- 2.45.2