Skip to content

Commit b27a6a3

Browse files
virtuosogregkh
authored andcommitted
intel_th: Add Global Trace Hub driver
Global Trace Hub (GTH) is the central component of Intel TH architecture; it carries out switching between the trace sources and trace outputs, can enable/disable tracing, perform STP encoding, internal buffering, control backpressure from outputs to sources and so on. This property is also reflected in the software model; GTH (switch) driver is required for the other subdevices to probe, because it matches trace output devices against its output ports and configures them accordingly. It also implements an interface for output ports to request trace enabling or disabling and a few other useful things. For userspace, it provides an attribute group "masters", which allows configuration of per-master trace output destinations for up to master 255 and "256+" meaning "masters 256 and above". It also provides an attribute group to discover and configure some of the parameters of its output ports, called "outputs". Via these the user can set up data retention policy for an individual output port or check if it is in reset state. Signed-off-by: Laurent Fert <[email protected]> Signed-off-by: Alexander Shishkin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 2b0b16d commit b27a6a3

File tree

5 files changed

+834
-0
lines changed

5 files changed

+834
-0
lines changed
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
What: /sys/bus/intel_th/devices/<intel_th_id>-gth/masters/*
2+
Date: June 2015
3+
KernelVersion: 4.3
4+
Contact: Alexander Shishkin <[email protected]>
5+
Description: (RW) Configure output ports for STP masters. Writing -1
6+
disables a master; any
7+
8+
What: /sys/bus/intel_th/devices/<intel_th_id>-gth/outputs/[0-7]_port
9+
Date: June 2015
10+
KernelVersion: 4.3
11+
Contact: Alexander Shishkin <[email protected]>
12+
Description: (RO) Output port type:
13+
0: not present,
14+
1: MSU (Memory Storage Unit)
15+
2: CTP (Common Trace Port)
16+
4: PTI (MIPI PTI).
17+
18+
What: /sys/bus/intel_th/devices/<intel_th_id>-gth/outputs/[0-7]_drop
19+
Date: June 2015
20+
KernelVersion: 4.3
21+
Contact: Alexander Shishkin <[email protected]>
22+
Description: (RW) Data retention policy setting: keep (0) or drop (1)
23+
incoming data while output port is in reset.
24+
25+
What: /sys/bus/intel_th/devices/<intel_th_id>-gth/outputs/[0-7]_null
26+
Date: June 2015
27+
KernelVersion: 4.3
28+
Contact: Alexander Shishkin <[email protected]>
29+
Description: (RW) STP NULL packet generation: enabled (1) or disabled (0).
30+
31+
What: /sys/bus/intel_th/devices/<intel_th_id>-gth/outputs/[0-7]_flush
32+
Date: June 2015
33+
KernelVersion: 4.3
34+
Contact: Alexander Shishkin <[email protected]>
35+
Description: (RW) Force flush data from byte packing buffer for the output
36+
port.
37+
38+
What: /sys/bus/intel_th/devices/<intel_th_id>-gth/outputs/[0-7]_reset
39+
Date: June 2015
40+
KernelVersion: 4.3
41+
Contact: Alexander Shishkin <[email protected]>
42+
Description: (RO) Output port is in reset (1).
43+
44+
What: /sys/bus/intel_th/devices/<intel_th_id>-gth/outputs/[0-7]_smcfreq
45+
Date: June 2015
46+
KernelVersion: 4.3
47+
Contact: Alexander Shishkin <[email protected]>
48+
Description: (RW) STP sync packet frequency for the port. Specifies the
49+
number of clocks between mainenance packets.

drivers/hwtracing/intel_th/Kconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,16 @@ config INTEL_TH_PCI
2424

2525
Say Y here to enable PCI Intel TH support.
2626

27+
config INTEL_TH_GTH
28+
tristate "Intel(R) Trace Hub Global Trace Hub"
29+
help
30+
Global Trace Hub (GTH) is the central component of the
31+
Intel TH infrastructure and acts as a switch for source
32+
and output devices. This driver is required for other
33+
Intel TH subdevices to initialize.
34+
35+
Say Y here to enable GTH subdevice of Intel(R) Trace Hub.
36+
2737
config INTEL_TH_DEBUG
2838
bool "Intel(R) Trace Hub debugging"
2939
depends on DEBUG_FS

drivers/hwtracing/intel_th/Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,6 @@ intel_th-$(CONFIG_INTEL_TH_DEBUG) += debug.o
44

55
obj-$(CONFIG_INTEL_TH_PCI) += intel_th_pci.o
66
intel_th_pci-y := pci.o
7+
8+
obj-$(CONFIG_INTEL_TH_GTH) += intel_th_gth.o
9+
intel_th_gth-y := gth.o

0 commit comments

Comments
 (0)