coresight-etm3x: Support context-ID tracing when PID namespace is enabled
authorChunyan Zhang <zhang.chunyan@linaro.org>
Fri, 31 Jul 2015 15:37:27 +0000 (09:37 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Aug 2015 20:30:15 +0000 (13:30 -0700)
commita440617e0d882a35accdd32dd7ae180885c6b28c
tree99e3b4cbd42d17fb3a276cb783a28f5782a2db9a
parent722102274ab1206634d31abe4f438a911a0945d2
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>
drivers/hwtracing/coresight/coresight-etm.h
drivers/hwtracing/coresight/coresight-etm3x.c