diff options
author | Shaohua Li <shaohua.li@intel.com> | 2005-06-25 17:55:05 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-25 19:24:31 -0400 |
commit | a9fa06c26f7b7914c8cdf4d309b74df3151cc227 (patch) | |
tree | df8c8e9d2af2f0232d40eb67a5e76d9ae80ed2d4 /arch | |
parent | a02c4cb67e4ccd5ce7a13c7f04c2fedb06c35431 (diff) |
[PATCH] set cpu_state for CPU hotplug (ia64)
Dead CPU notifies online CPU that it's dead using cpu_state variable.
After switching to physical cpu hotplug, we forgot setting the variable.
This patch fixes it. Currently only __cpu_die uses it. We changed other
locations for consistency in case others use it.
Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Acked-by: Ashok Raj <ashok.raj@intel.com>
Cc: "Luck, Tony" <tony.luck@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/ia64/kernel/smpboot.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/ia64/kernel/smpboot.c b/arch/ia64/kernel/smpboot.c index a888ddc10f7d..623b0a546709 100644 --- a/arch/ia64/kernel/smpboot.c +++ b/arch/ia64/kernel/smpboot.c | |||
@@ -346,6 +346,7 @@ smp_callin (void) | |||
346 | lock_ipi_calllock(); | 346 | lock_ipi_calllock(); |
347 | cpu_set(cpuid, cpu_online_map); | 347 | cpu_set(cpuid, cpu_online_map); |
348 | unlock_ipi_calllock(); | 348 | unlock_ipi_calllock(); |
349 | per_cpu(cpu_state, cpuid) = CPU_ONLINE; | ||
349 | 350 | ||
350 | smp_setup_percpu_timer(); | 351 | smp_setup_percpu_timer(); |
351 | 352 | ||
@@ -611,6 +612,7 @@ void __devinit smp_prepare_boot_cpu(void) | |||
611 | { | 612 | { |
612 | cpu_set(smp_processor_id(), cpu_online_map); | 613 | cpu_set(smp_processor_id(), cpu_online_map); |
613 | cpu_set(smp_processor_id(), cpu_callin_map); | 614 | cpu_set(smp_processor_id(), cpu_callin_map); |
615 | per_cpu(cpu_state, smp_processor_id()) = CPU_ONLINE; | ||
614 | } | 616 | } |
615 | 617 | ||
616 | /* | 618 | /* |
@@ -775,6 +777,7 @@ __cpu_up (unsigned int cpu) | |||
775 | if (cpu_isset(cpu, cpu_callin_map)) | 777 | if (cpu_isset(cpu, cpu_callin_map)) |
776 | return -EINVAL; | 778 | return -EINVAL; |
777 | 779 | ||
780 | per_cpu(cpu_state, cpu) = CPU_UP_PREPARE; | ||
778 | /* Processor goes to start_secondary(), sets online flag */ | 781 | /* Processor goes to start_secondary(), sets online flag */ |
779 | ret = do_boot_cpu(sapicid, cpu); | 782 | ret = do_boot_cpu(sapicid, cpu); |
780 | if (ret < 0) | 783 | if (ret < 0) |