Skip to content

Commit

Permalink
ARM: scu: mask cluster id from cpu_logical_map
Browse files Browse the repository at this point in the history
With commit a0ae024 (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: Rob Herring <rob.herring@calxeda.com>
  • Loading branch information
Rob Herring committed Jan 31, 2013
1 parent eed8812 commit c7d5b93
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/arm/kernel/smp_scu.c
Expand Up @@ -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;
Expand Down

0 comments on commit c7d5b93

Please sign in to comment.