coresight-etm: Fix initial trace ID value
authorMathieu Poirier <mathieu.poirier@linaro.org>
Fri, 9 Jan 2015 23:57:17 +0000 (16:57 -0700)
committerMathieu Poirier <mathieu.poirier@linaro.org>
Mon, 2 Mar 2015 18:33:29 +0000 (11:33 -0700)
The coresight TRM specify that a component's trace ID should
be other than 0.

Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit b2c09284bbfe36f9ba0e3e8bec8bb3c4789b3911)
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
drivers/coresight/coresight-etm3x.c

index 369cac00afaa46aebe7eaa22bcfbf9e2173a97ad..73c36696f1b686f94069aac7c35573e510d33531 100644 (file)
@@ -1749,7 +1749,11 @@ static void etm_init_arch_data(void *info)
 
 static void etm_init_default_data(struct etm_drvdata *drvdata)
 {
-       static int etm3x_traceid;
+       /*
+        * A trace ID of value 0 is invalid, so let's start at some
+        * random value that fits in 7 bits and will be just as good.
+        */
+       static int etm3x_traceid = 0x10;
 
        u32 flags = (1 << 0 | /* instruction execute*/
                     3 << 3 | /* ARM instruction */