Skip to content

Commit 731bb31

Browse files
committed
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 <[email protected]> Reported-by: Yi Lai <[email protected]> Closes: http://lore.kernel.org/[email protected] Link: http://patch.msgid.link/[email protected] Signed-off-by: Dan Williams <[email protected]>
1 parent 24d479d commit 731bb31

5 files changed

Lines changed: 0 additions & 47 deletions

File tree

Documentation/ABI/testing/sysfs-class-tsm

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,3 @@ Description:
77
signals when the PCI layer is able to support establishment of
88
link encryption and other device-security features coordinated
99
through a platform tsm.
10-
11-
What: /sys/class/tsm/tsmN/streamH.R.E
12-
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.

drivers/pci/ide.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
#include <linux/pci_regs.h>
1212
#include <linux/slab.h>
1313
#include <linux/sysfs.h>
14-
#include <linux/tsm.h>
1514

1615
#include "pci.h"
1716

@@ -373,9 +372,6 @@ void pci_ide_stream_release(struct pci_ide *ide)
373372
if (ide->partner[PCI_IDE_EP].enable)
374373
pci_ide_stream_disable(pdev, ide);
375374

376-
if (ide->tsm_dev)
377-
tsm_ide_stream_unregister(ide);
378-
379375
if (ide->partner[PCI_IDE_RP].setup)
380376
pci_ide_stream_teardown(rp, ide);
381377

drivers/virt/coco/tsm-core.c

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,11 @@
44
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
55

66
#include <linux/tsm.h>
7-
#include <linux/pci.h>
87
#include <linux/rwsem.h>
98
#include <linux/device.h>
109
#include <linux/module.h>
1110
#include <linux/cleanup.h>
1211
#include <linux/pci-tsm.h>
13-
#include <linux/pci-ide.h>
1412

1513
static struct class *tsm_class;
1614
static DECLARE_RWSEM(tsm_rwsem);
@@ -108,32 +106,6 @@ void tsm_unregister(struct tsm_dev *tsm_dev)
108106
}
109107
EXPORT_SYMBOL_GPL(tsm_unregister);
110108

111-
/* must be invoked between tsm_register / tsm_unregister */
112-
int tsm_ide_stream_register(struct pci_ide *ide)
113-
{
114-
struct pci_dev *pdev = ide->pdev;
115-
struct pci_tsm *tsm = pdev->tsm;
116-
struct tsm_dev *tsm_dev = tsm->tsm_dev;
117-
int rc;
118-
119-
rc = sysfs_create_link(&tsm_dev->dev.kobj, &pdev->dev.kobj, ide->name);
120-
if (rc)
121-
return rc;
122-
123-
ide->tsm_dev = tsm_dev;
124-
return 0;
125-
}
126-
EXPORT_SYMBOL_GPL(tsm_ide_stream_register);
127-
128-
void tsm_ide_stream_unregister(struct pci_ide *ide)
129-
{
130-
struct tsm_dev *tsm_dev = ide->tsm_dev;
131-
132-
ide->tsm_dev = NULL;
133-
sysfs_remove_link(&tsm_dev->dev.kobj, ide->name);
134-
}
135-
EXPORT_SYMBOL_GPL(tsm_ide_stream_unregister);
136-
137109
static void tsm_release(struct device *dev)
138110
{
139111
struct tsm_dev *tsm_dev = container_of(dev, typeof(*tsm_dev), dev);

include/linux/pci-ide.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ struct pci_ide_regs {
8282
* @host_bridge_stream: allocated from host bridge @ide_stream_ida pool
8383
* @stream_id: unique Stream ID (within Partner Port pairing)
8484
* @name: name of the established Selective IDE Stream in sysfs
85-
* @tsm_dev: For TSM established IDE, the TSM device context
8685
*
8786
* Negative @stream_id values indicate "uninitialized" on the
8887
* expectation that with TSM established IDE the TSM owns the stream_id
@@ -94,7 +93,6 @@ struct pci_ide {
9493
u8 host_bridge_stream;
9594
int stream_id;
9695
const char *name;
97-
struct tsm_dev *tsm_dev;
9896
};
9997

10098
/*

include/linux/tsm.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,4 @@ int tsm_report_unregister(const struct tsm_report_ops *ops);
123123
struct tsm_dev *tsm_register(struct device *parent, struct pci_tsm_ops *ops);
124124
void tsm_unregister(struct tsm_dev *tsm_dev);
125125
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);
129126
#endif /* __TSM_H */

0 commit comments

Comments
 (0)