[PATCH v5 15/15] coco: host: arm64: Enable PCI TSM connect callbacks

Aneesh Kumar K.V (Arm) aneesh.kumar at kernel.org
Thu Sep 10 07:05:08 PDT 2026


The previous patches build up the Arm CCA host device-assignment flow: RMM
pdev creation and teardown, device communication, public-key setup, peer
stream coordination, RMM stream connect/disconnect, and support for both
endpoint and RC endpoint stream types.

Now that the connect and disconnect paths contain the complete setup and
teardown sequence, register them in pci_tsm_ops and drop the __maybe_unused
annotations.

Signed-off-by: Aneesh Kumar K.V (Arm) <aneesh.kumar at kernel.org>
---
 drivers/virt/coco/arm-cca-host/main.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/virt/coco/arm-cca-host/main.c b/drivers/virt/coco/arm-cca-host/main.c
index b7b0cc0a016c..e8afd54c23f6 100644
--- a/drivers/virt/coco/arm-cca-host/main.c
+++ b/drivers/virt/coco/arm-cca-host/main.c
@@ -295,7 +295,7 @@ static inline bool cca_pdev_need_sel_ide_streams(struct pci_dev *pdev)
 	return pci_pcie_type(pdev) == PCI_EXP_TYPE_ENDPOINT;
 }
 
-static int __maybe_unused cca_tsm_connect(struct pci_dev *pdev)
+static int cca_tsm_connect(struct pci_dev *pdev)
 {
 	struct pci_dev *rp = pcie_find_root_port(pdev);
 	struct cca_host_pf0_ep_dsc *pf0_ep_dsc;
@@ -385,7 +385,7 @@ static int __maybe_unused cca_tsm_connect(struct pci_dev *pdev)
 	return ret;
 }
 
-static void __maybe_unused cca_tsm_disconnect(struct pci_dev *pdev)
+static void cca_tsm_disconnect(struct pci_dev *pdev)
 {
 	struct pci_ide *ide;
 	struct cca_host_pf0_ep_dsc *pf0_ep_dsc;
@@ -414,6 +414,8 @@ static void __maybe_unused cca_tsm_disconnect(struct pci_dev *pdev)
 static struct pci_tsm_ops cca_link_pci_ops = {
 	.probe = cca_tsm_pci_probe,
 	.remove = cca_tsm_pci_remove,
+	.connect = cca_tsm_connect,
+	.disconnect = cca_tsm_disconnect,
 };
 
 static void cca_link_tsm_remove(void *tsm_dev)
-- 
2.43.0




More information about the linux-arm-kernel mailing list