]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
Revert "PCI/TSM: Report active IDE streams"
authorDan Williams <dan.j.williams@intel.com>
Fri, 23 Jan 2026 00:35:56 +0000 (16:35 -0800)
committerDan Williams <dan.j.williams@intel.com>
Fri, 23 Jan 2026 01:46:44 +0000 (17:46 -0800)
The proposed ABI failed to account for multiple host bridges with the same
stream name. The fix needs to namespace streams or otherwise link back to
the host bridge, but a change like that is too big for a fix. Given this
ABI never saw a released kernel, delete it for now and bring it back later
with this issue addressed.

Reported-by: Xu Yilun <yilun.xu@linux.intel.com>
Reported-by: Yi Lai <yi1.lai@intel.com>
Closes: http://lore.kernel.org/20251223085601.2607455-1-yilun.xu@linux.intel.com
Link: http://patch.msgid.link/6972c872acbb9_1d3310035@dwillia2-mobl4.notmuch
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Documentation/ABI/testing/sysfs-class-tsm
drivers/pci/ide.c
drivers/virt/coco/tsm-core.c
include/linux/pci-ide.h
include/linux/tsm.h

index 6fc1a5ac6da1af76e88e5be3edf1b7ce4830fe18..2949468deaf72c5c0eabbf70ab3b6ec7afb62b44 100644 (file)
@@ -7,13 +7,3 @@ Description:
                signals when the PCI layer is able to support establishment of
                link encryption and other device-security features coordinated
                through a platform tsm.
-
-What:          /sys/class/tsm/tsmN/streamH.R.E
-Contact:       linux-pci@vger.kernel.org
-Description:
-               (RO) When a host bridge has established a secure connection via
-               the platform TSM, symlink appears. The primary function of this
-               is have a system global review of TSM resource consumption
-               across host bridges. The link points to the endpoint PCI device
-               and matches the same link published by the host bridge. See
-               Documentation/ABI/testing/sysfs-devices-pci-host-bridge.
index f0ef474e1a0da7cba43422a259c5551639a56fb6..280941b05969dd4a90d61e689062a214e9133a8f 100644 (file)
@@ -11,7 +11,6 @@
 #include <linux/pci_regs.h>
 #include <linux/slab.h>
 #include <linux/sysfs.h>
-#include <linux/tsm.h>
 
 #include "pci.h"
 
@@ -373,9 +372,6 @@ void pci_ide_stream_release(struct pci_ide *ide)
        if (ide->partner[PCI_IDE_EP].enable)
                pci_ide_stream_disable(pdev, ide);
 
-       if (ide->tsm_dev)
-               tsm_ide_stream_unregister(ide);
-
        if (ide->partner[PCI_IDE_RP].setup)
                pci_ide_stream_teardown(rp, ide);
 
index f027876a2f198746ad79f90e099b36be0ae581dd..0e705f3067a17fcd4ad20bd09d0ae68d0162643c 100644 (file)
@@ -4,13 +4,11 @@
 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 
 #include <linux/tsm.h>
-#include <linux/pci.h>
 #include <linux/rwsem.h>
 #include <linux/device.h>
 #include <linux/module.h>
 #include <linux/cleanup.h>
 #include <linux/pci-tsm.h>
-#include <linux/pci-ide.h>
 
 static struct class *tsm_class;
 static DECLARE_RWSEM(tsm_rwsem);
@@ -108,32 +106,6 @@ void tsm_unregister(struct tsm_dev *tsm_dev)
 }
 EXPORT_SYMBOL_GPL(tsm_unregister);
 
-/* must be invoked between tsm_register / tsm_unregister */
-int tsm_ide_stream_register(struct pci_ide *ide)
-{
-       struct pci_dev *pdev = ide->pdev;
-       struct pci_tsm *tsm = pdev->tsm;
-       struct tsm_dev *tsm_dev = tsm->tsm_dev;
-       int rc;
-
-       rc = sysfs_create_link(&tsm_dev->dev.kobj, &pdev->dev.kobj, ide->name);
-       if (rc)
-               return rc;
-
-       ide->tsm_dev = tsm_dev;
-       return 0;
-}
-EXPORT_SYMBOL_GPL(tsm_ide_stream_register);
-
-void tsm_ide_stream_unregister(struct pci_ide *ide)
-{
-       struct tsm_dev *tsm_dev = ide->tsm_dev;
-
-       ide->tsm_dev = NULL;
-       sysfs_remove_link(&tsm_dev->dev.kobj, ide->name);
-}
-EXPORT_SYMBOL_GPL(tsm_ide_stream_unregister);
-
 static void tsm_release(struct device *dev)
 {
        struct tsm_dev *tsm_dev = container_of(dev, typeof(*tsm_dev), dev);
index 37a1ad9501b05d6638a6cf8a218bf8d31f6da53e..5d4d56ed088d1f30e8683abff0c41e08226ba5b9 100644 (file)
@@ -82,7 +82,6 @@ struct pci_ide_regs {
  * @host_bridge_stream: allocated from host bridge @ide_stream_ida pool
  * @stream_id: unique Stream ID (within Partner Port pairing)
  * @name: name of the established Selective IDE Stream in sysfs
- * @tsm_dev: For TSM established IDE, the TSM device context
  *
  * Negative @stream_id values indicate "uninitialized" on the
  * expectation that with TSM established IDE the TSM owns the stream_id
@@ -94,7 +93,6 @@ struct pci_ide {
        u8 host_bridge_stream;
        int stream_id;
        const char *name;
-       struct tsm_dev *tsm_dev;
 };
 
 /*
index a3b7ab668effffd4132bc03d9eec62c96f31f282..22e05b2aac69cf5f435510fb298c969b6776709d 100644 (file)
@@ -123,7 +123,4 @@ int tsm_report_unregister(const struct tsm_report_ops *ops);
 struct tsm_dev *tsm_register(struct device *parent, struct pci_tsm_ops *ops);
 void tsm_unregister(struct tsm_dev *tsm_dev);
 struct tsm_dev *find_tsm_dev(int id);
-struct pci_ide;
-int tsm_ide_stream_register(struct pci_ide *ide);
-void tsm_ide_stream_unregister(struct pci_ide *ide);
 #endif /* __TSM_H */