diff options
author | Alexander Shishkin <alexander.shishkin@linux.intel.com> | 2016-05-03 13:33:37 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-05-03 17:59:30 -0400 |
commit | 8e996a2874bbbed30e8dfe881453825fc6b7654e (patch) | |
tree | 3dd50be8cc4462eba2b1a87dc682258cfd986043 /drivers/hwtracing/stm | |
parent | 6327a454a8ab0dcab24a647367d216c1b84020c6 (diff) |
stm class: Support devices that override software assigned masters
Some STM devices adjust software assigned master numbers depending on
the trace source and its runtime state and whatnot. This patch adds
a sysfs attribute to inform the trace-side software that master numbers
assigned to software sources will not match those in the STP stream,
so that, for example, master/channel allocation policy can be adjusted
accordingly.
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/hwtracing/stm')
-rw-r--r-- | drivers/hwtracing/stm/core.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/hwtracing/stm/core.c b/drivers/hwtracing/stm/core.c index 2591442e2c5b..ff31108b066f 100644 --- a/drivers/hwtracing/stm/core.c +++ b/drivers/hwtracing/stm/core.c | |||
@@ -67,9 +67,24 @@ static ssize_t channels_show(struct device *dev, | |||
67 | 67 | ||
68 | static DEVICE_ATTR_RO(channels); | 68 | static DEVICE_ATTR_RO(channels); |
69 | 69 | ||
70 | static ssize_t hw_override_show(struct device *dev, | ||
71 | struct device_attribute *attr, | ||
72 | char *buf) | ||
73 | { | ||
74 | struct stm_device *stm = to_stm_device(dev); | ||
75 | int ret; | ||
76 | |||
77 | ret = sprintf(buf, "%u\n", stm->data->hw_override); | ||
78 | |||
79 | return ret; | ||
80 | } | ||
81 | |||
82 | static DEVICE_ATTR_RO(hw_override); | ||
83 | |||
70 | static struct attribute *stm_attrs[] = { | 84 | static struct attribute *stm_attrs[] = { |
71 | &dev_attr_masters.attr, | 85 | &dev_attr_masters.attr, |
72 | &dev_attr_channels.attr, | 86 | &dev_attr_channels.attr, |
87 | &dev_attr_hw_override.attr, | ||
73 | NULL, | 88 | NULL, |
74 | }; | 89 | }; |
75 | 90 | ||