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

Commit c7d5b93e authored by Rob Herring's avatar Rob Herring
Browse files

ARM: scu: mask cluster id from cpu_logical_map



With commit a0ae0240 (ARM: kernel: add device tree init map function),
the cpu id value may include the cluster id and is no longer 0-3, so we
need to mask it in scu_power_mode to get the local cpu number. Since we
are only dealing with the cpu we are running on, the cluster id should
not ever be needed.

Signed-off-by: default avatarRob Herring <rob.herring@calxeda.com>
parent eed88123
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -75,7 +75,7 @@ void scu_enable(void __iomem *scu_base)
int scu_power_mode(void __iomem *scu_base, unsigned int mode)
{
	unsigned int val;
	int cpu = cpu_logical_map(smp_processor_id());
	int cpu = MPIDR_AFFINITY_LEVEL(cpu_logical_map(smp_processor_id()), 0);

	if (mode > 3 || mode == 1 || cpu > 3)
		return -EINVAL;