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

Commit 63fc1370 authored by Rob Herring's avatar Rob Herring
Browse files

ARM: highbank: 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 now to get the right hard cpu index.

Signed-off-by: default avatarRob Herring <rob.herring@calxeda.com>
parent c7d5b93e
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -28,6 +28,7 @@


#include <asm/arch_timer.h>
#include <asm/arch_timer.h>
#include <asm/cacheflush.h>
#include <asm/cacheflush.h>
#include <asm/cputype.h>
#include <asm/smp_plat.h>
#include <asm/smp_plat.h>
#include <asm/smp_twd.h>
#include <asm/smp_twd.h>
#include <asm/hardware/arm_timer.h>
#include <asm/hardware/arm_timer.h>
@@ -59,7 +60,7 @@ static void __init highbank_scu_map_io(void)


void highbank_set_cpu_jump(int cpu, void *jump_addr)
void highbank_set_cpu_jump(int cpu, void *jump_addr)
{
{
	cpu = cpu_logical_map(cpu);
	cpu = MPIDR_AFFINITY_LEVEL(cpu_logical_map(cpu), 0);
	writel(virt_to_phys(jump_addr), HB_JUMP_TABLE_VIRT(cpu));
	writel(virt_to_phys(jump_addr), HB_JUMP_TABLE_VIRT(cpu));
	__cpuc_flush_dcache_area(HB_JUMP_TABLE_VIRT(cpu), 16);
	__cpuc_flush_dcache_area(HB_JUMP_TABLE_VIRT(cpu), 16);
	outer_clean_range(HB_JUMP_TABLE_PHYS(cpu),
	outer_clean_range(HB_JUMP_TABLE_PHYS(cpu),
+2 −2
Original line number Original line Diff line number Diff line
@@ -37,7 +37,7 @@ extern void __iomem *sregs_base;


static inline void highbank_set_core_pwr(void)
static inline void highbank_set_core_pwr(void)
{
{
	int cpu = cpu_logical_map(smp_processor_id());
	int cpu = MPIDR_AFFINITY_LEVEL(cpu_logical_map(smp_processor_id()), 0);
	if (scu_base_addr)
	if (scu_base_addr)
		scu_power_mode(scu_base_addr, SCU_PM_POWEROFF);
		scu_power_mode(scu_base_addr, SCU_PM_POWEROFF);
	else
	else
@@ -46,7 +46,7 @@ static inline void highbank_set_core_pwr(void)


static inline void highbank_clear_core_pwr(void)
static inline void highbank_clear_core_pwr(void)
{
{
	int cpu = cpu_logical_map(smp_processor_id());
	int cpu = MPIDR_AFFINITY_LEVEL(cpu_logical_map(smp_processor_id()), 0);
	if (scu_base_addr)
	if (scu_base_addr)
		scu_power_mode(scu_base_addr, SCU_PM_NORMAL);
		scu_power_mode(scu_base_addr, SCU_PM_NORMAL);
	else
	else