Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5736f82c authored by Satyajit Desai's avatar Satyajit Desai
Browse files

coresight: etm: Fail probe for unsupported CPUs



Fail probe for CPUs which are not supported by the kernel
else we end up trying to configure ETM on different CPU
while executing on CPU0. This results in a NOC error.

Change-Id: I0f7917cfe87dbe4f6a2ab8ba6166d5b052e3c4fa
Signed-off-by: default avatarSatyajit Desai <sadesai@codeaurora.org>
parent 06bd68cc
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -976,7 +976,12 @@ static int etm4_probe(struct amba_device *adev, const struct amba_id *id)

	spin_lock_init(&drvdata->spinlock);

	drvdata->cpu = pdata ? pdata->cpu : 0;
	drvdata->cpu = pdata ? pdata->cpu : -1;

	if (drvdata->cpu == -1) {
		dev_info(dev, "CPU not available\n");
		return -ENODEV;
	}

	get_online_cpus();

+2 −2
Original line number Diff line number Diff line
@@ -182,8 +182,8 @@ struct coresight_platform_data *of_get_coresight_platform_data(
		} while (ep);
	}

	/* Affinity defaults to CPU0 */
	pdata->cpu = 0;
	/* Affinity defaults to 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)) {