From f30d0aab7b838de4e893ae83da69b87b3d619948 Mon Sep 17 00:00:00 2001 From: Robin Holt Date: Fri, 7 Jun 2013 10:07:01 +1000 Subject: [PATCH] migrate-shutdown-reboot-to-boot-cpu-v11 Signed-off-by: Robin Holt Signed-off-by: Andrew Morton --- kernel/sys.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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)); } /** -- 2.39.2