diff options
author | Magnus Damm <damm@opensource.se> | 2010-12-14 08:57:11 +0100 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2010-12-14 10:15:47 +0100 |
commit | 72f4d57923d2aa651db060a71a6f6211654c119e (patch) | |
tree | 11c20ab3f639c842b9b8d0ff46e03025780fe4b7 /arch/arm/mach-shmobile/platsmp.c | |
parent | ARM: mach-shmobile: Enable SMP support (diff) | |
download | linux-72f4d57923d2aa651db060a71a6f6211654c119e.tar.xz linux-72f4d57923d2aa651db060a71a6f6211654c119e.zip |
ARM: mach-shmobile: sh73a0 SMP support
Add SMP support for ag5evm and the sh73a0 processor.
Onlining and offlining works well, but at this point
offlined processor cores are not put into sleep mode.
There is no spinlock for syncing the secondary core
with the first one in this implementation. The code
instead relies on the cpu_online() check in __cpu_up().
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/arm/mach-shmobile/platsmp.c')
-rw-r--r-- | arch/arm/mach-shmobile/platsmp.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/arch/arm/mach-shmobile/platsmp.c b/arch/arm/mach-shmobile/platsmp.c index b41f5d0650e4..3c2c0f49073e 100644 --- a/arch/arm/mach-shmobile/platsmp.c +++ b/arch/arm/mach-shmobile/platsmp.c @@ -16,25 +16,37 @@ #include <linux/smp.h> #include <linux/io.h> #include <asm/localtimer.h> +#include <asm/mach-types.h> +#include <mach/common.h> static unsigned int __init shmobile_smp_get_core_count(void) { + if (machine_is_ag5evm()) + return sh73a0_get_core_count(); + return 1; } static void __init shmobile_smp_prepare_cpus(void) { - /* do nothing for now */ + if (machine_is_ag5evm()) + sh73a0_smp_prepare_cpus(); } void __cpuinit platform_secondary_init(unsigned int cpu) { trace_hardirqs_off(); + + if (machine_is_ag5evm()) + sh73a0_secondary_init(cpu); } int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle) { + if (machine_is_ag5evm()) + return sh73a0_boot_secondary(cpu); + return -ENOSYS; } |