diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-23 21:37:44 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-23 21:37:44 -0400 |
commit | 26dcce0fabbef75ae426461edf21b5030bad60f3 (patch) | |
tree | 56c64fa47dc29f7ea5a8fd0cab0459fb0a05a2bc /arch/x86/kernel/reboot.c | |
parent | d7b6de14a0ef8a376f9d57b867545b47302b7bfb (diff) | |
parent | eb6a12c2428d21a9f3e0f1a50e927d5fd80fc3d0 (diff) |
Merge branch 'cpus4096-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'cpus4096-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (31 commits)
NR_CPUS: Replace NR_CPUS in speedstep-centrino.c
cpumask: Provide a generic set of CPUMASK_ALLOC macros, FIXUP
NR_CPUS: Replace NR_CPUS in cpufreq userspace routines
NR_CPUS: Replace per_cpu(..., smp_processor_id()) with __get_cpu_var
NR_CPUS: Replace NR_CPUS in arch/x86/kernel/genapic_flat_64.c
NR_CPUS: Replace NR_CPUS in arch/x86/kernel/genx2apic_uv_x.c
NR_CPUS: Replace NR_CPUS in arch/x86/kernel/cpu/proc.c
NR_CPUS: Replace NR_CPUS in arch/x86/kernel/cpu/mcheck/mce_64.c
cpumask: Optimize cpumask_of_cpu in lib/smp_processor_id.c, fix
cpumask: Use optimized CPUMASK_ALLOC macros in the centrino_target
cpumask: Provide a generic set of CPUMASK_ALLOC macros
cpumask: Optimize cpumask_of_cpu in lib/smp_processor_id.c
cpumask: Optimize cpumask_of_cpu in kernel/time/tick-common.c
cpumask: Optimize cpumask_of_cpu in drivers/misc/sgi-xp/xpc_main.c
cpumask: Optimize cpumask_of_cpu in arch/x86/kernel/ldt.c
cpumask: Optimize cpumask_of_cpu in arch/x86/kernel/io_apic_64.c
cpumask: Replace cpumask_of_cpu with cpumask_of_cpu_ptr
Revert "cpumask: introduce new APIs"
cpumask: make for_each_cpu_mask a bit smaller
net: Pass reference to cpumask variable in net/sunrpc/svc.c
...
Fix up trivial conflicts in drivers/cpufreq/cpufreq.c manually
Diffstat (limited to 'arch/x86/kernel/reboot.c')
-rw-r--r-- | arch/x86/kernel/reboot.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c index 9dcf39c02972..06a9f643817e 100644 --- a/arch/x86/kernel/reboot.c +++ b/arch/x86/kernel/reboot.c | |||
@@ -411,24 +411,28 @@ void native_machine_shutdown(void) | |||
411 | { | 411 | { |
412 | /* Stop the cpus and apics */ | 412 | /* Stop the cpus and apics */ |
413 | #ifdef CONFIG_SMP | 413 | #ifdef CONFIG_SMP |
414 | int reboot_cpu_id; | ||
415 | 414 | ||
416 | /* The boot cpu is always logical cpu 0 */ | 415 | /* The boot cpu is always logical cpu 0 */ |
417 | reboot_cpu_id = 0; | 416 | int reboot_cpu_id = 0; |
417 | cpumask_of_cpu_ptr(newmask, reboot_cpu_id); | ||
418 | 418 | ||
419 | #ifdef CONFIG_X86_32 | 419 | #ifdef CONFIG_X86_32 |
420 | /* See if there has been given a command line override */ | 420 | /* See if there has been given a command line override */ |
421 | if ((reboot_cpu != -1) && (reboot_cpu < NR_CPUS) && | 421 | if ((reboot_cpu != -1) && (reboot_cpu < NR_CPUS) && |
422 | cpu_online(reboot_cpu)) | 422 | cpu_online(reboot_cpu)) { |
423 | reboot_cpu_id = reboot_cpu; | 423 | reboot_cpu_id = reboot_cpu; |
424 | cpumask_of_cpu_ptr_next(newmask, reboot_cpu_id); | ||
425 | } | ||
424 | #endif | 426 | #endif |
425 | 427 | ||
426 | /* Make certain the cpu I'm about to reboot on is online */ | 428 | /* Make certain the cpu I'm about to reboot on is online */ |
427 | if (!cpu_online(reboot_cpu_id)) | 429 | if (!cpu_online(reboot_cpu_id)) { |
428 | reboot_cpu_id = smp_processor_id(); | 430 | reboot_cpu_id = smp_processor_id(); |
431 | cpumask_of_cpu_ptr_next(newmask, reboot_cpu_id); | ||
432 | } | ||
429 | 433 | ||
430 | /* Make certain I only run on the appropriate processor */ | 434 | /* Make certain I only run on the appropriate processor */ |
431 | set_cpus_allowed_ptr(current, &cpumask_of_cpu(reboot_cpu_id)); | 435 | set_cpus_allowed_ptr(current, newmask); |
432 | 436 | ||
433 | /* O.K Now that I'm on the appropriate processor, | 437 | /* O.K Now that I'm on the appropriate processor, |
434 | * stop all of the others. | 438 | * stop all of the others. |