Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Revert "PCI/TSM: Report active IDE streams"

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>

-47
-10
Documentation/ABI/testing/sysfs-class-tsm
··· 7 7 signals when the PCI layer is able to support establishment of 8 8 link encryption and other device-security features coordinated 9 9 through a platform tsm. 10 - 11 - What: /sys/class/tsm/tsmN/streamH.R.E 12 - Contact: linux-pci@vger.kernel.org 13 - Description: 14 - (RO) When a host bridge has established a secure connection via 15 - the platform TSM, symlink appears. The primary function of this 16 - is have a system global review of TSM resource consumption 17 - across host bridges. The link points to the endpoint PCI device 18 - and matches the same link published by the host bridge. See 19 - Documentation/ABI/testing/sysfs-devices-pci-host-bridge.
-4
drivers/pci/ide.c
··· 11 11 #include <linux/pci_regs.h> 12 12 #include <linux/slab.h> 13 13 #include <linux/sysfs.h> 14 - #include <linux/tsm.h> 15 14 16 15 #include "pci.h" 17 16 ··· 371 372 372 373 if (ide->partner[PCI_IDE_EP].enable) 373 374 pci_ide_stream_disable(pdev, ide); 374 - 375 - if (ide->tsm_dev) 376 - tsm_ide_stream_unregister(ide); 377 375 378 376 if (ide->partner[PCI_IDE_RP].setup) 379 377 pci_ide_stream_teardown(rp, ide);
-28
drivers/virt/coco/tsm-core.c
··· 4 4 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt 5 5 6 6 #include <linux/tsm.h> 7 - #include <linux/pci.h> 8 7 #include <linux/rwsem.h> 9 8 #include <linux/device.h> 10 9 #include <linux/module.h> 11 10 #include <linux/cleanup.h> 12 11 #include <linux/pci-tsm.h> 13 - #include <linux/pci-ide.h> 14 12 15 13 static struct class *tsm_class; 16 14 static DECLARE_RWSEM(tsm_rwsem); ··· 105 107 device_unregister(&tsm_dev->dev); 106 108 } 107 109 EXPORT_SYMBOL_GPL(tsm_unregister); 108 - 109 - /* must be invoked between tsm_register / tsm_unregister */ 110 - int tsm_ide_stream_register(struct pci_ide *ide) 111 - { 112 - struct pci_dev *pdev = ide->pdev; 113 - struct pci_tsm *tsm = pdev->tsm; 114 - struct tsm_dev *tsm_dev = tsm->tsm_dev; 115 - int rc; 116 - 117 - rc = sysfs_create_link(&tsm_dev->dev.kobj, &pdev->dev.kobj, ide->name); 118 - if (rc) 119 - return rc; 120 - 121 - ide->tsm_dev = tsm_dev; 122 - return 0; 123 - } 124 - EXPORT_SYMBOL_GPL(tsm_ide_stream_register); 125 - 126 - void tsm_ide_stream_unregister(struct pci_ide *ide) 127 - { 128 - struct tsm_dev *tsm_dev = ide->tsm_dev; 129 - 130 - ide->tsm_dev = NULL; 131 - sysfs_remove_link(&tsm_dev->dev.kobj, ide->name); 132 - } 133 - EXPORT_SYMBOL_GPL(tsm_ide_stream_unregister); 134 110 135 111 static void tsm_release(struct device *dev) 136 112 {
-2
include/linux/pci-ide.h
··· 82 82 * @host_bridge_stream: allocated from host bridge @ide_stream_ida pool 83 83 * @stream_id: unique Stream ID (within Partner Port pairing) 84 84 * @name: name of the established Selective IDE Stream in sysfs 85 - * @tsm_dev: For TSM established IDE, the TSM device context 86 85 * 87 86 * Negative @stream_id values indicate "uninitialized" on the 88 87 * expectation that with TSM established IDE the TSM owns the stream_id ··· 93 94 u8 host_bridge_stream; 94 95 int stream_id; 95 96 const char *name; 96 - struct tsm_dev *tsm_dev; 97 97 }; 98 98 99 99 /*
-3
include/linux/tsm.h
··· 123 123 struct tsm_dev *tsm_register(struct device *parent, struct pci_tsm_ops *ops); 124 124 void tsm_unregister(struct tsm_dev *tsm_dev); 125 125 struct tsm_dev *find_tsm_dev(int id); 126 - struct pci_ide; 127 - int tsm_ide_stream_register(struct pci_ide *ide); 128 - void tsm_ide_stream_unregister(struct pci_ide *ide); 129 126 #endif /* __TSM_H */