summaryrefslogtreecommitdiff
path: root/drivers/coresight
diff options
context:
space:
mode:
authorFrank Li <Frank.Li@freescale.com>2015-02-17 05:29:50 +0800
committerFrank Li <Frank.Li@freescale.com>2015-02-21 04:20:16 +0800
commitc05d4d4fcd93914570d1da8e4dd78ec84566c4bc (patch)
tree0b8dae4934f18496c1c9d0656568713065be1ae2 /drivers/coresight
parenta8779c1db456efea46f93f94c2b2c78cf5f85c36 (diff)
MLK-10283-2 ARM: coresight: fix system halt when add nosmp to command line
when nosmp set, only 1 core enabled. try to access disable core will halt. dts need added arm,primecell-periphid = <id> for none-boot core otherwise amba_device_add will halt when read peripheral id. Signed-off-by: Frank Li <Frank.Li@freescale.com>
Diffstat (limited to 'drivers/coresight')
-rw-r--r--drivers/coresight/coresight-etm3x.c4
-rw-r--r--drivers/coresight/of_coresight.c3
2 files changed, 5 insertions, 2 deletions
diff --git a/drivers/coresight/coresight-etm3x.c b/drivers/coresight/coresight-etm3x.c
index 73c36696f1b6..d31295257f6c 100644
--- a/drivers/coresight/coresight-etm3x.c
+++ b/drivers/coresight/coresight-etm3x.c
@@ -1829,6 +1829,10 @@ static int etm_probe(struct amba_device *adev, const struct amba_id *id)
return ret;
drvdata->cpu = pdata ? pdata->cpu : 0;
+ if (drvdata->cpu < 0) {
+ ret = -EINVAL;
+ goto err_arch_supported;
+ }
get_online_cpus();
etmdrvdata[drvdata->cpu] = drvdata;
diff --git a/drivers/coresight/of_coresight.c b/drivers/coresight/of_coresight.c
index c3efa418a86d..6804bbdc8ba8 100644
--- a/drivers/coresight/of_coresight.c
+++ b/drivers/coresight/of_coresight.c
@@ -196,8 +196,7 @@ struct coresight_platform_data *of_get_coresight_platform_data(
if (cell) {
hwid = of_read_number(cell, of_n_addr_cells(dn));
index = get_logical_index(hwid);
- if (index != -EINVAL)
- pdata->cpu = index;
+ pdata->cpu = index;
}
}