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

Commit 7356c89a authored by Mahesh Sivasubramanian's avatar Mahesh Sivasubramanian
Browse files

msm: spm_devices: Check for L2 SPM's core id



The L2 SPM device was being set incorrectly if the core-id was not in
the range of the supported CPUs. The DT for certain devices are shared
among cores that have different CPUs. In cases where the core-id didn't
match the physical core, it was being incorrectly set to L2 and causing
issues when the SPM hardware was accessed.

Fix by checking for L2 core-id of 0xffff before assigning it to an L2
device.

Change-Id: I90f8d3606ddfdc4987bb4d7918e0712d28e17083
Signed-off-by: default avatarMahesh Sivasubramanian <msivasub@codeaurora.org>
parent 63704274
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -400,7 +400,7 @@ static struct msm_spm_device *msm_spm_get_device(struct platform_device *pdev)

	if ((cpu >= 0) && cpu < num_possible_cpus()) {
		dev = &per_cpu(msm_cpu_spm_device, cpu);
	} else {
	} else if (cpu == 0xffff) {
		dev = devm_kzalloc(&pdev->dev, sizeof(struct msm_spm_device),
				GFP_KERNEL);
		msm_spm_l2_device = dev;