From 510bb595de26f90e5bb7c4a1e2a584e38398cf00 Mon Sep 17 00:00:00 2001 From: Joseph Lo Date: Tue, 21 May 2013 18:13:35 +0800 Subject: 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 [swarren: adjusted the switch statement to be future-proof] Signed-off-by: Stephen Warren --- arch/arm/mach-tegra/hotplug.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'arch/arm/mach-tegra/hotplug.c') 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)) -- cgit