7bd1d4093c
A System Trace Module (STM) is a device exporting data in System Trace Protocol (STP) format as defined by MIPI STP standards. Examples of such devices are Intel(R) Trace Hub and Coresight STM. This abstraction provides a unified interface for software trace sources to send their data over an STM device to a debug host. In order to do that, such a trace source needs to be assigned a pair of master/channel identifiers that all the data from this source will be tagged with. The STP decoder on the debug host side will use these master/channel tags to distinguish different trace streams from one another inside one STP stream. This abstraction provides a configfs-based policy management mechanism for dynamic allocation of these master/channel pairs based on trace source-supplied string identifier. It has the flexibility of being defined at runtime and at the same time (provided that the policy definition is aligned with the decoding end) consistency. For userspace trace sources, this abstraction provides write()-based and mmap()-based (if the underlying stm device allows this) output mechanism. For kernel-side trace sources, we provide "stm_source" device class that can be connected to an stm device at run time. Cc: linux-api@vger.kernel.org Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org> Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
49 lines
1.5 KiB
Plaintext
49 lines
1.5 KiB
Plaintext
What: /config/stp-policy
|
|
Date: June 2015
|
|
KernelVersion: 4.3
|
|
Description:
|
|
This group contains policies mandating Master/Channel allocation
|
|
for software sources wishing to send trace data over an STM
|
|
device.
|
|
|
|
What: /config/stp-policy/<device>.<policy>
|
|
Date: June 2015
|
|
KernelVersion: 4.3
|
|
Description:
|
|
This group is the root of a policy; its name is a concatenation
|
|
of an stm device name to which this policy applies and an
|
|
arbitrary string. If <device> part doesn't match an existing
|
|
stm device, mkdir will fail with ENODEV; if that device already
|
|
has a policy assigned to it, mkdir will fail with EBUSY.
|
|
|
|
What: /config/stp-policy/<device>.<policy>/device
|
|
Date: June 2015
|
|
KernelVersion: 4.3
|
|
Description:
|
|
STM device to which this policy applies, read only. Same as the
|
|
<device> component of its parent directory.
|
|
|
|
What: /config/stp-policy/<device>.<policy>/<node>
|
|
Date: June 2015
|
|
KernelVersion: 4.3
|
|
Description:
|
|
Policy node is a string identifier that software clients will
|
|
use to request a master/channel to be allocated and assigned to
|
|
them.
|
|
|
|
What: /config/stp-policy/<device>.<policy>/<node>/masters
|
|
Date: June 2015
|
|
KernelVersion: 4.3
|
|
Description:
|
|
Range of masters from which to allocate for users of this node.
|
|
Write two numbers: the first master and the last master number.
|
|
|
|
What: /config/stp-policy/<device>.<policy>/<node>/channels
|
|
Date: June 2015
|
|
KernelVersion: 4.3
|
|
Description:
|
|
Range of channels from which to allocate for users of this node.
|
|
Write two numbers: the first channel and the last channel
|
|
number.
|
|
|