Skip to content

Commit

Permalink
Merge tag 'highbank-fixes-for-3.8' of git://sources.calxeda.com/kerne…
Browse files Browse the repository at this point in the history
…l/linux into fixes

From Rob Herring:
highbank fixes for 3.8

-Compile fix for !SMP
-More cpu cluster id related fixes

* tag 'highbank-fixes-for-3.8' of git://sources.calxeda.com/kernel/linux:
  ARM: highbank: mask cluster id from cpu_logical_map
  ARM: scu: mask cluster id from cpu_logical_map
  ARM: scu: add empty scu_enable for !CONFIG_SMP
  • Loading branch information
Olof Johansson committed Feb 5, 2013
2 parents 825bf91 + 63fc137 commit 34178c5
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
8 changes: 7 additions & 1 deletion arch/arm/include/asm/smp_scu.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,14 @@

#ifndef __ASSEMBLER__
unsigned int scu_get_core_count(void __iomem *);
void scu_enable(void __iomem *);
int scu_power_mode(void __iomem *, unsigned int);

#ifdef CONFIG_SMP
void scu_enable(void __iomem *scu_base);
#else
static inline void scu_enable(void __iomem *scu_base) {}
#endif

#endif

#endif
2 changes: 1 addition & 1 deletion arch/arm/kernel/smp_scu.c
Original file line number Diff line number Diff line change
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
3 changes: 2 additions & 1 deletion arch/arm/mach-highbank/highbank.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

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

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));
__cpuc_flush_dcache_area(HB_JUMP_TABLE_VIRT(cpu), 16);
outer_clean_range(HB_JUMP_TABLE_PHYS(cpu),
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/mach-highbank/sysregs.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ extern void __iomem *sregs_base;

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)
scu_power_mode(scu_base_addr, SCU_PM_POWEROFF);
else
Expand All @@ -46,7 +46,7 @@ static inline void highbank_set_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)
scu_power_mode(scu_base_addr, SCU_PM_NORMAL);
else
Expand Down

0 comments on commit 34178c5

Please sign in to comment.