blob: 4c08f8fffb2b538a2db65f55df7eac2f424f796b [file] [log] [blame]
From 05f453548b4b9fdf0ab8e36a15c9ef74b21f27e2 Mon Sep 17 00:00:00 2001
From: Magnus Damm <damm@opensource.se>
Date: Wed, 28 Dec 2011 16:47:16 +0900
Subject: ARM: mach-shmobile: Allow SoC specific CPU kill code
Add the function shmobile_platform_kill_cpu() to allow
SoC specific code to tie in their CPU shutdown code.
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
(cherry picked from commit 8b306796995609c281f6d32b3cbaa814551ad5ac)
Signed-off-by: Simon Horman <horms@verge.net.au>
---
arch/arm/mach-shmobile/hotplug.c | 3 ++-
arch/arm/mach-shmobile/include/mach/common.h | 1 +
arch/arm/mach-shmobile/platsmp.c | 5 +++++
3 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/arch/arm/mach-shmobile/hotplug.c b/arch/arm/mach-shmobile/hotplug.c
index 238a0d9..aee3a10 100644
--- a/arch/arm/mach-shmobile/hotplug.c
+++ b/arch/arm/mach-shmobile/hotplug.c
@@ -12,10 +12,11 @@
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/smp.h>
+#include <mach/common.h>
int platform_cpu_kill(unsigned int cpu)
{
- return 1;
+ return shmobile_platform_cpu_kill(cpu);
}
void platform_cpu_die(unsigned int cpu)
diff --git a/arch/arm/mach-shmobile/include/mach/common.h b/arch/arm/mach-shmobile/include/mach/common.h
index bc3aa3e..8b88b80 100644
--- a/arch/arm/mach-shmobile/include/mach/common.h
+++ b/arch/arm/mach-shmobile/include/mach/common.h
@@ -7,6 +7,7 @@ extern void shmobile_setup_delay(unsigned int max_cpu_core_mhz,
unsigned int mult, unsigned int div);
extern void shmobile_setup_console(void);
extern void shmobile_secondary_vector(void);
+extern int shmobile_platform_cpu_kill(unsigned int cpu);
struct clk;
extern int shmobile_clk_init(void);
extern void shmobile_handle_irq_intc(struct pt_regs *);
diff --git a/arch/arm/mach-shmobile/platsmp.c b/arch/arm/mach-shmobile/platsmp.c
index 2cc8930..1103ce5 100644
--- a/arch/arm/mach-shmobile/platsmp.c
+++ b/arch/arm/mach-shmobile/platsmp.c
@@ -37,6 +37,11 @@ static void __init shmobile_smp_prepare_cpus(void)
sh73a0_smp_prepare_cpus();
}
+int shmobile_platform_cpu_kill(unsigned int cpu)
+{
+ return 1;
+}
+
void __cpuinit platform_secondary_init(unsigned int cpu)
{
trace_hardirqs_off();
--
1.7.10.1.362.g242cab3