summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShashank Mittal <mittals@codeaurora.org>2016-02-23 11:15:09 -0800
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-25 16:02:37 -0700
commit7d151e606e4bb3b654431dcbc890d0c0018386b4 (patch)
tree540cffe39ad3bc851bbfb4410bc801bafad22b43
parent019f188ab5112c2460af1d59e8b2f2b425830ad9 (diff)
coresight: set invalid default cpu id
Current code sets default CPU id as of CPU0. This causes a failure in case where device tree declares a CoreSight node that is associated with a CPU that's not available on that target. This causes complete failure of the system. Set default CPU id to -1 to avoid this problem. Change-Id: I77e5f734666a5f806013d685e89902ce5983cf49 Signed-off-by: Shashank Mittal <mittals@codeaurora.org>
-rw-r--r--drivers/hwtracing/coresight/of_coresight.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/hwtracing/coresight/of_coresight.c b/drivers/hwtracing/coresight/of_coresight.c
index efd19444021c..5afebc05a359 100644
--- a/drivers/hwtracing/coresight/of_coresight.c
+++ b/drivers/hwtracing/coresight/of_coresight.c
@@ -183,8 +183,8 @@ struct coresight_platform_data *of_get_coresight_platform_data(
} while (ep);
}
- /* Affinity defaults to CPU0 */
- pdata->cpu = 0;
+ /* Affinity defaults to -1 (invalid) */
+ pdata->cpu = -1;
dn = of_parse_phandle(node, "cpu", 0);
for (cpu = 0; dn && cpu < nr_cpu_ids; cpu++) {
if (dn == of_get_cpu_node(cpu, NULL)) {