From 7d151e606e4bb3b654431dcbc890d0c0018386b4 Mon Sep 17 00:00:00 2001 From: Shashank Mittal Date: Tue, 23 Feb 2016 11:15:09 -0800 Subject: [PATCH] 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 --- drivers/hwtracing/coresight/of_coresight.c | 4 ++-- 1 file 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)) {