summaryrefslogtreecommitdiffstats
path: root/drivers/hwtracing/coresight/coresight.c
diff options
context:
space:
mode:
authorMathieu Poirier <mathieu.poirier@linaro.org>2017-08-02 10:21:57 -0600
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-08-28 16:05:47 +0200
commit0c3fc4d5fa26092853278145aca9b21fa52a3e93 (patch)
tree22445053dce96dc4922d04deb5f029a3aaec8c56 /drivers/hwtracing/coresight/coresight.c
parent4f871a9f0f6fbb8ab023cca1f0099bf152a5d618 (diff)
downloadlinux-stable-0c3fc4d5fa26092853278145aca9b21fa52a3e93.tar.gz
linux-stable-0c3fc4d5fa26092853278145aca9b21fa52a3e93.tar.bz2
linux-stable-0c3fc4d5fa26092853278145aca9b21fa52a3e93.zip
coresight: Add barrier packet for synchronisation
When a buffer overflow happens the synchronisation patckets usually present at the beginning of the buffer are lost, a situation that prevents the decoder from knowing the context of the traces being decoded. This patch adds a barrier packet to be used by sink IPs when a buffer overflow condition is detected. These barrier packets are then used by the decoding library as markers to force re-synchronisation. 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.c')
-rw-r--r--drivers/hwtracing/coresight/coresight.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/hwtracing/coresight/coresight.c b/drivers/hwtracing/coresight/coresight.c
index 6a0202b7384f..b8091bef21dc 100644
--- a/drivers/hwtracing/coresight/coresight.c
+++ b/drivers/hwtracing/coresight/coresight.c
@@ -53,6 +53,14 @@ static DEFINE_PER_CPU(struct list_head *, tracer_path);
*/
static struct list_head *stm_path;
+/*
+ * When losing synchronisation a new barrier packet needs to be inserted at the
+ * beginning of the data collected in a buffer. That way the decoder knows that
+ * it needs to look for another sync sequence.
+ */
+const u32 barrier_pkt[5] = {0x7fffffff, 0x7fffffff,
+ 0x7fffffff, 0x7fffffff, 0x0};
+
static int coresight_id_match(struct device *dev, void *data)
{
int trace_id, i_trace_id;