coresight: etm4x: Skip selector pair 0
authorMathieu Poirier <mathieu.poirier@linaro.org>
Thu, 25 Apr 2019 19:52:53 +0000 (13:52 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Apr 2019 20:00:16 +0000 (22:00 +0200)
Resource selector pair 0 is always implemented and reserved.  As such
it should not be explicitly programmed.

Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Tested-by: Leo Yan <leo.yan@linaro.org>
Tested-by: Robert Walker <robert.walker@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hwtracing/coresight/coresight-etm4x.c

index 732ae12fca9b6fe89b31298e8d45ddeae7952636..d64192c298600000220ce637c75c2e8e8799a111 100644 (file)
@@ -138,8 +138,11 @@ static int etm4_enable_hw(struct etmv4_drvdata *drvdata)
                               drvdata->base + TRCCNTVRn(i));
        }
 
-       /* Resource selector pair 0 is always implemented and reserved */
-       for (i = 0; i < drvdata->nr_resource * 2; i++)
+       /*
+        * Resource selector pair 0 is always implemented and reserved.  As
+        * such start at 2.
+        */
+       for (i = 2; i < drvdata->nr_resource * 2; i++)
                writel_relaxed(config->res_ctrl[i],
                               drvdata->base + TRCRSCTLRn(i));