coresight: do not probe if cpu is not online

If you use the parameter 'maxcpus=n', restrict boot time cpus to n.
To initialize the ETM on cpu, the cpus should be online. So if you restrict
boot time cpus, you can not enable the ETM on cpu which is rectriced(not
enabled). Skip the initialization of the ETM.

Change-Id: Idccf537ff4dce0ae5d1b60ecc1631180ad323fb8
This commit is contained in:
Devin Kim 2013-01-14 09:40:05 -08:00 committed by Iliyan Malchev
parent cf4f0da410
commit 3c2dd59f90
1 changed files with 5 additions and 0 deletions

View File

@ -2045,6 +2045,11 @@ static int __devinit etm_probe(struct platform_device *pdev)
pdev->dev.platform_data = pdata;
}
#ifdef CONFIG_SMP
if (count >= setup_max_cpus)
return -ENODEV;
#endif
drvdata = devm_kzalloc(dev, sizeof(*drvdata), GFP_KERNEL);
if (!drvdata)
return -ENOMEM;