diff options
author | Natalie Protasevich <Natalie.Protasevich@unisys.com> | 2005-10-30 17:59:32 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-10-30 20:37:12 -0500 |
commit | 9f40a72a7e819789f66910c8cd60aab005cdb413 (patch) | |
tree | d8006a8cea9b19f2871c5fdafa373d1dc5db46ec /arch/i386 | |
parent | ca140fdadbe4c031a20a970f46163908d09a116b (diff) |
[PATCH] x86: hot plug CPU to support physical add of new processors
The patch allows physical bring-up of new processors (not initially present
in the configuration) from facilities such as driver/utility implemented on
a platform. The actual method of making processors available is up to the
platform implementation.
Signed-off-by: Natalie Protasevich <Natalie.Protasevich@unisys.com>
Cc: Shaohua Li <shaohua.li@intel.com>
Cc: Ashok Raj <ashok.raj@intel.com>
Cc: Zwane Mwaikambo <zwane@holomorphy.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/i386')
-rw-r--r-- | arch/i386/kernel/irq.c | 8 | ||||
-rw-r--r-- | arch/i386/kernel/mpparse.c | 6 | ||||
-rw-r--r-- | arch/i386/kernel/smpboot.c | 4 |
3 files changed, 11 insertions, 7 deletions
diff --git a/arch/i386/kernel/irq.c b/arch/i386/kernel/irq.c index ce66dcc26d90..1a201a932865 100644 --- a/arch/i386/kernel/irq.c +++ b/arch/i386/kernel/irq.c | |||
@@ -218,7 +218,7 @@ int show_interrupts(struct seq_file *p, void *v) | |||
218 | 218 | ||
219 | if (i == 0) { | 219 | if (i == 0) { |
220 | seq_printf(p, " "); | 220 | seq_printf(p, " "); |
221 | for_each_cpu(j) | 221 | for_each_online_cpu(j) |
222 | seq_printf(p, "CPU%d ",j); | 222 | seq_printf(p, "CPU%d ",j); |
223 | seq_putc(p, '\n'); | 223 | seq_putc(p, '\n'); |
224 | } | 224 | } |
@@ -232,7 +232,7 @@ int show_interrupts(struct seq_file *p, void *v) | |||
232 | #ifndef CONFIG_SMP | 232 | #ifndef CONFIG_SMP |
233 | seq_printf(p, "%10u ", kstat_irqs(i)); | 233 | seq_printf(p, "%10u ", kstat_irqs(i)); |
234 | #else | 234 | #else |
235 | for_each_cpu(j) | 235 | for_each_online_cpu(j) |
236 | seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]); | 236 | seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]); |
237 | #endif | 237 | #endif |
238 | seq_printf(p, " %14s", irq_desc[i].handler->typename); | 238 | seq_printf(p, " %14s", irq_desc[i].handler->typename); |
@@ -246,12 +246,12 @@ skip: | |||
246 | spin_unlock_irqrestore(&irq_desc[i].lock, flags); | 246 | spin_unlock_irqrestore(&irq_desc[i].lock, flags); |
247 | } else if (i == NR_IRQS) { | 247 | } else if (i == NR_IRQS) { |
248 | seq_printf(p, "NMI: "); | 248 | seq_printf(p, "NMI: "); |
249 | for_each_cpu(j) | 249 | for_each_online_cpu(j) |
250 | seq_printf(p, "%10u ", nmi_count(j)); | 250 | seq_printf(p, "%10u ", nmi_count(j)); |
251 | seq_putc(p, '\n'); | 251 | seq_putc(p, '\n'); |
252 | #ifdef CONFIG_X86_LOCAL_APIC | 252 | #ifdef CONFIG_X86_LOCAL_APIC |
253 | seq_printf(p, "LOC: "); | 253 | seq_printf(p, "LOC: "); |
254 | for_each_cpu(j) | 254 | for_each_online_cpu(j) |
255 | seq_printf(p, "%10u ", | 255 | seq_printf(p, "%10u ", |
256 | per_cpu(irq_stat,j).apic_timer_irqs); | 256 | per_cpu(irq_stat,j).apic_timer_irqs); |
257 | seq_putc(p, '\n'); | 257 | seq_putc(p, '\n'); |
diff --git a/arch/i386/kernel/mpparse.c b/arch/i386/kernel/mpparse.c index 27aabfceb67e..3751bb44961b 100644 --- a/arch/i386/kernel/mpparse.c +++ b/arch/i386/kernel/mpparse.c | |||
@@ -69,7 +69,7 @@ unsigned int def_to_bigsmp = 0; | |||
69 | /* Processor that is doing the boot up */ | 69 | /* Processor that is doing the boot up */ |
70 | unsigned int boot_cpu_physical_apicid = -1U; | 70 | unsigned int boot_cpu_physical_apicid = -1U; |
71 | /* Internal processor count */ | 71 | /* Internal processor count */ |
72 | static unsigned int __initdata num_processors; | 72 | static unsigned int __devinitdata num_processors; |
73 | 73 | ||
74 | /* Bitmask of physically existing CPUs */ | 74 | /* Bitmask of physically existing CPUs */ |
75 | physid_mask_t phys_cpu_present_map; | 75 | physid_mask_t phys_cpu_present_map; |
@@ -119,7 +119,7 @@ static int MP_valid_apicid(int apicid, int version) | |||
119 | } | 119 | } |
120 | #endif | 120 | #endif |
121 | 121 | ||
122 | static void __init MP_processor_info (struct mpc_config_processor *m) | 122 | static void __devinit MP_processor_info (struct mpc_config_processor *m) |
123 | { | 123 | { |
124 | int ver, apicid; | 124 | int ver, apicid; |
125 | physid_mask_t phys_cpu; | 125 | physid_mask_t phys_cpu; |
@@ -834,7 +834,7 @@ void __init mp_register_lapic_address ( | |||
834 | } | 834 | } |
835 | 835 | ||
836 | 836 | ||
837 | void __init mp_register_lapic ( | 837 | void __devinit mp_register_lapic ( |
838 | u8 id, | 838 | u8 id, |
839 | u8 enabled) | 839 | u8 enabled) |
840 | { | 840 | { |
diff --git a/arch/i386/kernel/smpboot.c b/arch/i386/kernel/smpboot.c index 1fb26d0e30b6..01b618e73ecd 100644 --- a/arch/i386/kernel/smpboot.c +++ b/arch/i386/kernel/smpboot.c | |||
@@ -87,7 +87,11 @@ EXPORT_SYMBOL(cpu_online_map); | |||
87 | cpumask_t cpu_callin_map; | 87 | cpumask_t cpu_callin_map; |
88 | cpumask_t cpu_callout_map; | 88 | cpumask_t cpu_callout_map; |
89 | EXPORT_SYMBOL(cpu_callout_map); | 89 | EXPORT_SYMBOL(cpu_callout_map); |
90 | #ifdef CONFIG_HOTPLUG_CPU | ||
91 | cpumask_t cpu_possible_map = CPU_MASK_ALL; | ||
92 | #else | ||
90 | cpumask_t cpu_possible_map; | 93 | cpumask_t cpu_possible_map; |
94 | #endif | ||
91 | EXPORT_SYMBOL(cpu_possible_map); | 95 | EXPORT_SYMBOL(cpu_possible_map); |
92 | static cpumask_t smp_commenced_mask; | 96 | static cpumask_t smp_commenced_mask; |
93 | 97 | ||