From c970d4ef3ac6d56f5fd02902ad2ad80377c0bca1 Mon Sep 17 00:00:00 2001 From: Magnus Damm Date: Wed, 31 Jul 2013 16:07:12 +0900 Subject: ARM: shmobile: Introduce shared SCU SMP boot code Add SMP boot functions for SCU equipped mach-shmobile SoCs. At this point shmobile_smp_scu_prepare_cpus() controls the SCU and installs boot fn and arg, while shmobile_smp_scu_boot_secondary() currently does nothing. In the future the boot function and arg install code will be reworked, so the empty function is ground work for that. Signed-off-by: Magnus Damm Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/include/mach/common.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'arch/arm/mach-shmobile/include/mach/common.h') diff --git a/arch/arm/mach-shmobile/include/mach/common.h b/arch/arm/mach-shmobile/include/mach/common.h index e818f029d8e3..42761f4fb171 100644 --- a/arch/arm/mach-shmobile/include/mach/common.h +++ b/arch/arm/mach-shmobile/include/mach/common.h @@ -11,6 +11,9 @@ extern void shmobile_boot_vector(void); extern unsigned long shmobile_boot_fn; extern unsigned long shmobile_boot_arg; extern void shmobile_boot_scu(void); +extern void shmobile_smp_scu_prepare_cpus(unsigned int max_cpus); +extern int shmobile_smp_scu_boot_secondary(unsigned int cpu, + struct task_struct *idle); struct clk; extern int shmobile_clk_init(void); extern void shmobile_handle_irq_intc(struct pt_regs *); -- cgit v1.2.1 From e7b1c96384181d690950530f5a64167965226744 Mon Sep 17 00:00:00 2001 From: Magnus Damm Date: Wed, 31 Jul 2013 16:07:49 +0900 Subject: ARM: shmobile: Add shared SCU CPU Hotplug code Add CPU Hotplug functions for SCU equipped mach-shmobile SoCs. The functions shmobile_smp_scu_cpu_die() together with shmobile_smp_scu_cpu_kill() perform basic shutdown and allows checking of shutdown status. These are written to work together with SMP boot code in headsmp-scu.S. Signed-off-by: Magnus Damm Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/include/mach/common.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'arch/arm/mach-shmobile/include/mach/common.h') diff --git a/arch/arm/mach-shmobile/include/mach/common.h b/arch/arm/mach-shmobile/include/mach/common.h index 42761f4fb171..04209d5c0338 100644 --- a/arch/arm/mach-shmobile/include/mach/common.h +++ b/arch/arm/mach-shmobile/include/mach/common.h @@ -14,6 +14,8 @@ extern void shmobile_boot_scu(void); extern void shmobile_smp_scu_prepare_cpus(unsigned int max_cpus); extern int shmobile_smp_scu_boot_secondary(unsigned int cpu, struct task_struct *idle); +extern void shmobile_smp_scu_cpu_die(unsigned int cpu); +extern int shmobile_smp_scu_cpu_kill(unsigned int cpu); struct clk; extern int shmobile_clk_init(void); extern void shmobile_handle_irq_intc(struct pt_regs *); -- cgit v1.2.1 From cc61591e45c0457139ddd4cd7e57f75928acaaf2 Mon Sep 17 00:00:00 2001 From: Magnus Damm Date: Thu, 1 Aug 2013 03:38:18 +0900 Subject: ARM: shmobile: Introduce per-CPU SMP boot / sleep code Add per-CPU SMP boot / sleep code that can be used by all SoCs included in mach-shmobile. The boot code reads out the per-CPU MPIDR id value and matches it with the value stored for any CPU number, and if there is a match and the boot function is set as well then the boot function will be executed. The sleep code simply uses WFI and then jumps back to the boot code to see if anyone has asked to wake up that CPU, if not it will sleep again. Signed-off-by: Magnus Damm [horms+renesas@verge.net.au: Remove trailing whitespace] Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/include/mach/common.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'arch/arm/mach-shmobile/include/mach/common.h') diff --git a/arch/arm/mach-shmobile/include/mach/common.h b/arch/arm/mach-shmobile/include/mach/common.h index 04209d5c0338..3880cf54b2b3 100644 --- a/arch/arm/mach-shmobile/include/mach/common.h +++ b/arch/arm/mach-shmobile/include/mach/common.h @@ -10,6 +10,10 @@ extern void shmobile_setup_console(void); extern void shmobile_boot_vector(void); extern unsigned long shmobile_boot_fn; extern unsigned long shmobile_boot_arg; +extern void shmobile_smp_boot(void); +extern void shmobile_smp_sleep(void); +extern void shmobile_smp_hook(unsigned int cpu, unsigned long fn, + unsigned long arg); extern void shmobile_boot_scu(void); extern void shmobile_smp_scu_prepare_cpus(unsigned int max_cpus); extern int shmobile_smp_scu_boot_secondary(unsigned int cpu, -- cgit v1.2.1