summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Lo <josephl@nvidia.com>2013-05-21 18:13:35 +0800
committerStephen Warren <swarren@nvidia.com>2013-05-28 15:26:07 -0600
commit510bb595de26f90e5bb7c4a1e2a584e38398cf00 (patch)
tree1a0cb9b73611ccb4583532def3cc425b0a30c820
parent33d5c01915ccca298a5fda7e0cb33199d225e03a (diff)
downloadkernel-common-510bb595de26f90e5bb7c4a1e2a584e38398cf00.tar.gz
kernel-common-510bb595de26f90e5bb7c4a1e2a584e38398cf00.tar.bz2
kernel-common-510bb595de26f90e5bb7c4a1e2a584e38398cf00.zip
ARM: tegra: add cpu_disable for hotplug
The Tegra114 could hotplug the CPU0, but the common cpu_disable didn't support that. Adding a Tegra specific cpu_disable function for it. Signed-off-by: Joseph Lo <josephl@nvidia.com> [swarren: adjusted the switch statement to be future-proof] Signed-off-by: Stephen Warren <swarren@nvidia.com>
-rw-r--r--arch/arm/mach-tegra/common.h1
-rw-r--r--arch/arm/mach-tegra/hotplug.c11
-rw-r--r--arch/arm/mach-tegra/platsmp.c1
3 files changed, 13 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/common.h b/arch/arm/mach-tegra/common.h
index 5900cc44f780..32f8eb3fe344 100644
--- a/arch/arm/mach-tegra/common.h
+++ b/arch/arm/mach-tegra/common.h
@@ -2,3 +2,4 @@ extern struct smp_operations tegra_smp_ops;
extern int tegra_cpu_kill(unsigned int cpu);
extern void tegra_cpu_die(unsigned int cpu);
+extern int tegra_cpu_disable(unsigned int cpu);
diff --git a/arch/arm/mach-tegra/hotplug.c b/arch/arm/mach-tegra/hotplug.c
index d07f152b275f..a52c10e0a857 100644
--- a/arch/arm/mach-tegra/hotplug.c
+++ b/arch/arm/mach-tegra/hotplug.c
@@ -46,6 +46,17 @@ void __ref tegra_cpu_die(unsigned int cpu)
BUG();
}
+int tegra_cpu_disable(unsigned int cpu)
+{
+ switch (tegra_chip_id) {
+ case TEGRA20:
+ case TEGRA30:
+ return cpu == 0 ? -EPERM : 0;
+ default:
+ return 0;
+ }
+}
+
void __init tegra_hotplug_init(void)
{
if (!IS_ENABLED(CONFIG_HOTPLUG_CPU))
diff --git a/arch/arm/mach-tegra/platsmp.c b/arch/arm/mach-tegra/platsmp.c
index 554aedc98c9f..24db4ac428ae 100644
--- a/arch/arm/mach-tegra/platsmp.c
+++ b/arch/arm/mach-tegra/platsmp.c
@@ -196,5 +196,6 @@ struct smp_operations tegra_smp_ops __initdata = {
#ifdef CONFIG_HOTPLUG_CPU
.cpu_kill = tegra_cpu_kill,
.cpu_die = tegra_cpu_die,
+ .cpu_disable = tegra_cpu_disable,
#endif
};