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

Commit 4b46c654 authored by Shashank Mittal's avatar Shashank Mittal
Browse files

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: default avatarShashank Mittal <mittals@codeaurora.org>
parent a8371783
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -192,8 +192,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)) {