Skip to content

Commit

Permalink
ARM: CPU hotplug: remove bug checks in platform_cpu_die()
Browse files Browse the repository at this point in the history
platform_cpu_die() is entered from the CPU's own idle thread, which
can not be migrated to other CPUs.  Moreover, the 'cpu' argument
comes from the thread info, which will always be the 'current'
CPU.  So remove this useless bug check.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
Russell King committed Dec 20, 2010
1 parent 3c030be commit bbc81fd
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 48 deletions.
8 changes: 0 additions & 8 deletions arch/arm/mach-omap2/omap-hotplug.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,6 @@ int platform_cpu_kill(unsigned int cpu)
*/
void platform_cpu_die(unsigned int cpu)
{
unsigned int this_cpu = hard_smp_processor_id();

if (cpu != this_cpu) {
pr_crit("platform_cpu_die running on %u, should be %u\n",
this_cpu, cpu);
BUG();
}

flush_cache_all();
dsb();

Expand Down
10 changes: 0 additions & 10 deletions arch/arm/mach-realview/hotplug.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,16 +102,6 @@ int platform_cpu_kill(unsigned int cpu)
*/
void platform_cpu_die(unsigned int cpu)
{
#ifdef DEBUG
unsigned int this_cpu = hard_smp_processor_id();

if (cpu != this_cpu) {
printk(KERN_CRIT "Eek! platform_cpu_die running on %u, should be %u\n",
this_cpu, cpu);
BUG();
}
#endif

/*
* we're ready for shutdown now, so do it
*/
Expand Down
10 changes: 0 additions & 10 deletions arch/arm/mach-s5pv310/hotplug.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,16 +105,6 @@ int platform_cpu_kill(unsigned int cpu)
*/
void platform_cpu_die(unsigned int cpu)
{
#ifdef DEBUG
unsigned int this_cpu = hard_smp_processor_id();

if (cpu != this_cpu) {
printk(KERN_CRIT "Eek! platform_cpu_die running on %u, should be %u\n",
this_cpu, cpu);
BUG();
}
#endif

/*
* we're ready for shutdown now, so do it
*/
Expand Down
10 changes: 0 additions & 10 deletions arch/arm/mach-tegra/hotplug.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,16 +101,6 @@ int platform_cpu_kill(unsigned int cpu)
*/
void platform_cpu_die(unsigned int cpu)
{
#ifdef DEBUG
unsigned int this_cpu = hard_smp_processor_id();

if (cpu != this_cpu) {
printk(KERN_CRIT "Eek! platform_cpu_die running on %u, should be %u\n",
this_cpu, cpu);
BUG();
}
#endif

/*
* we're ready for shutdown now, so do it
*/
Expand Down
10 changes: 0 additions & 10 deletions arch/arm/mach-ux500/hotplug.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,6 @@ int platform_cpu_kill(unsigned int cpu)
*/
void platform_cpu_die(unsigned int cpu)
{
#ifdef DEBUG
unsigned int this_cpu = hard_smp_processor_id();

if (cpu != this_cpu) {
printk(KERN_CRIT "Eek! platform_cpu_die running on %u, should be %u\n",
this_cpu, cpu);
BUG();
}
#endif

/* directly enter low power state, skipping secure registers */
platform_do_lowpower(cpu);
}
Expand Down

0 comments on commit bbc81fd

Please sign in to comment.