summaryrefslogtreecommitdiffstats
path: root/drivers/hwtracing/coresight/coresight-etm.h
diff options
context:
space:
mode:
authorChunyan Zhang2015-07-31 17:37:27 +0200
committerGreg Kroah-Hartman2015-08-05 22:30:15 +0200
commita440617e0d882a35accdd32dd7ae180885c6b28c (patch)
tree99e3b4cbd42d17fb3a276cb783a28f5782a2db9a /drivers/hwtracing/coresight/coresight-etm.h
parentCoresight: Add an interface for supporting ETM3/4 Context ID tracing (diff)
downloadkernel-qcow2-linux-a440617e0d882a35accdd32dd7ae180885c6b28c.tar.gz
kernel-qcow2-linux-a440617e0d882a35accdd32dd7ae180885c6b28c.tar.xz
kernel-qcow2-linux-a440617e0d882a35accdd32dd7ae180885c6b28c.zip
coresight-etm3x: Support context-ID tracing when PID namespace is enabled
The Coresight ETM drivers already support context-ID tracing, but it won't work when PID namespace is enabled. This is because when using PID namespace a process id (ie. VPID) seen from the current namespace differs from the id (ie. PID) seen by kernel. So when users write the process id seen by themselves to ETM, there needs to be a translation from VPID to PID, as such ETM drivers will write the PID into the Context ID register correctly. Signed-off-by: Chunyan Zhang <zhang.chunyan@linaro.org> Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/hwtracing/coresight/coresight-etm.h')
-rw-r--r--drivers/hwtracing/coresight/coresight-etm.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/hwtracing/coresight/coresight-etm.h b/drivers/hwtracing/coresight/coresight-etm.h
index 52af5f0adbed..b4481eb29304 100644
--- a/drivers/hwtracing/coresight/coresight-etm.h
+++ b/drivers/hwtracing/coresight/coresight-etm.h
@@ -184,6 +184,8 @@
* @seq_curr_state: current value of the sequencer register.
* @ctxid_idx: index for the context ID registers.
* @ctxid_pid: value for the context ID to trigger on.
+ * @ctxid_vpid: Virtual PID seen by users if PID namespace is enabled, otherwise
+ * the same value of ctxid_pid.
* @ctxid_mask: mask applicable to all the context IDs.
* @sync_freq: Synchronisation frequency.
* @timestamp_event: Defines an event that requests the insertion
@@ -236,6 +238,7 @@ struct etm_drvdata {
u32 seq_curr_state;
u8 ctxid_idx;
u32 ctxid_pid[ETM_MAX_CTXID_CMP];
+ u32 ctxid_vpid[ETM_MAX_CTXID_CMP];
u32 ctxid_mask;
u32 sync_freq;
u32 timestamp_event;