Commit 510bb595 authored by Joseph Lo's avatar Joseph Lo Committed by Stephen Warren

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: default avatarJoseph Lo <josephl@nvidia.com>
[swarren: adjusted the switch statement to be future-proof]
Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
parent 33d5c019
...@@ -2,3 +2,4 @@ extern struct smp_operations tegra_smp_ops; ...@@ -2,3 +2,4 @@ extern struct smp_operations tegra_smp_ops;
extern int tegra_cpu_kill(unsigned int cpu); extern int tegra_cpu_kill(unsigned int cpu);
extern void tegra_cpu_die(unsigned int cpu); extern void tegra_cpu_die(unsigned int cpu);
extern int tegra_cpu_disable(unsigned int cpu);
...@@ -46,6 +46,17 @@ void __ref tegra_cpu_die(unsigned int cpu) ...@@ -46,6 +46,17 @@ void __ref tegra_cpu_die(unsigned int cpu)
BUG(); 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) void __init tegra_hotplug_init(void)
{ {
if (!IS_ENABLED(CONFIG_HOTPLUG_CPU)) if (!IS_ENABLED(CONFIG_HOTPLUG_CPU))
......
...@@ -196,5 +196,6 @@ struct smp_operations tegra_smp_ops __initdata = { ...@@ -196,5 +196,6 @@ struct smp_operations tegra_smp_ops __initdata = {
#ifdef CONFIG_HOTPLUG_CPU #ifdef CONFIG_HOTPLUG_CPU
.cpu_kill = tegra_cpu_kill, .cpu_kill = tegra_cpu_kill,
.cpu_die = tegra_cpu_die, .cpu_die = tegra_cpu_die,
.cpu_disable = tegra_cpu_disable,
#endif #endif
}; };
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment