From: Robin Holt Date: Fri, 7 Jun 2013 00:07:01 +0000 (+1000) Subject: migrate-shutdown-reboot-to-boot-cpu-v11 X-Git-Tag: next-20130607~2^2~563 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=f30d0aab7b838de4e893ae83da69b87b3d619948;p=karo-tx-linux.git migrate-shutdown-reboot-to-boot-cpu-v11 Signed-off-by: Robin Holt Signed-off-by: Andrew Morton --- diff --git a/kernel/sys.c b/kernel/sys.c index 14640d72ba1e..2bbd9a73b54c 100644 --- a/kernel/sys.c +++ b/kernel/sys.c @@ -370,19 +370,19 @@ EXPORT_SYMBOL(unregister_reboot_notifier); static void migrate_to_reboot_cpu(void) { /* The boot cpu is always logical cpu 0 */ - int reboot_cpu = 0; + int cpu = 0; cpu_hotplug_disable(); /* Make certain the cpu I'm about to reboot on is online */ - if (!cpu_online(reboot_cpu)) - reboot_cpu = cpumask_first(cpu_online_mask); + if (!cpu_online(cpu)) + cpu = cpumask_first(cpu_online_mask); /* Prevent races with other tasks migrating this task */ current->flags |= PF_NO_SETAFFINITY; /* Make certain I only run on the appropriate processor */ - set_cpus_allowed_ptr(current, cpumask_of(reboot_cpu)); + set_cpus_allowed_ptr(current, cpumask_of(cpu)); } /**