提交 bbc81fd4 编写于 作者: R Russell King

ARM: CPU hotplug: remove bug checks in platform_cpu_die()

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: NRussell King <rmk+kernel@arm.linux.org.uk>
上级 3c030bea
...@@ -32,14 +32,6 @@ int platform_cpu_kill(unsigned int cpu) ...@@ -32,14 +32,6 @@ int platform_cpu_kill(unsigned int cpu)
*/ */
void platform_cpu_die(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(); flush_cache_all();
dsb(); dsb();
......
...@@ -102,16 +102,6 @@ int platform_cpu_kill(unsigned int cpu) ...@@ -102,16 +102,6 @@ int platform_cpu_kill(unsigned int cpu)
*/ */
void platform_cpu_die(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 * we're ready for shutdown now, so do it
*/ */
......
...@@ -105,16 +105,6 @@ int platform_cpu_kill(unsigned int cpu) ...@@ -105,16 +105,6 @@ int platform_cpu_kill(unsigned int cpu)
*/ */
void platform_cpu_die(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 * we're ready for shutdown now, so do it
*/ */
......
...@@ -101,16 +101,6 @@ int platform_cpu_kill(unsigned int cpu) ...@@ -101,16 +101,6 @@ int platform_cpu_kill(unsigned int cpu)
*/ */
void platform_cpu_die(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 * we're ready for shutdown now, so do it
*/ */
......
...@@ -45,16 +45,6 @@ int platform_cpu_kill(unsigned int cpu) ...@@ -45,16 +45,6 @@ int platform_cpu_kill(unsigned int cpu)
*/ */
void platform_cpu_die(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 */ /* directly enter low power state, skipping secure registers */
platform_do_lowpower(cpu); platform_do_lowpower(cpu);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册