[PATCH 2/2] ARM: tegra: moving the clock gating procedure to tegra_cpu_kill
From: Stephen Warren <hidden>
Date: 2012-12-20 17:01:27
Also in:
linux-tegra
On 12/19/2012 07:28 PM, Joseph Lo wrote:
The tegra_cpu_die was be executed by the CPU itslf. So the clock gating procedure won't be executed after the CPU hardware shutdown code. Moving the clock gating procedure to tegra_cpu_kill that will be run by another CPU after the CPU died.
Hmmm. I wonder if this is enough to make kexec-on-Tegra-with-SMP-enabled work without explicitly hot-unplugging all the CPUs first... An implementation of cpu_kill() was a major part of what was missing. I thought an implementation of cpu_kill() would require a bunch of code from cpu_die() too. Does this patch assume cpu_die() has executed first, and only then cpu_kill() will work, or can cpu_kill() be used on its own?
quoted hunk ↗ jump to hunk
diff --git a/arch/arm/mach-tegra/hotplug.c b/arch/arm/mach-tegra/hotplug.c
quoted hunk ↗ jump to hunk
@@ -34,10 +45,6 @@ void __ref tegra_cpu_die(unsigned int cpu) /* Shut down the current CPU. */ tegra_hotplug_shutdown(); - /* Clock gate the CPU */ - tegra_wait_cpu_in_reset(cpu); - tegra_disable_cpu_clock(cpu);
I believe that's the last use of the calculation performed right at the
start of this function:
cpu = cpu_logical_map(cpu);
Can you remove that?
Also, Peter, can you review these 2 patches as well?