mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-23 15:11:16 +00:00
[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>
This commit is contained in:
parent
ca140fdadb
commit
9f40a72a7e
3 changed files with 11 additions and 7 deletions
|
@ -218,7 +218,7 @@ int show_interrupts(struct seq_file *p, void *v)
|
||||||
|
|
||||||
if (i == 0) {
|
if (i == 0) {
|
||||||
seq_printf(p, " ");
|
seq_printf(p, " ");
|
||||||
for_each_cpu(j)
|
for_each_online_cpu(j)
|
||||||
seq_printf(p, "CPU%d ",j);
|
seq_printf(p, "CPU%d ",j);
|
||||||
seq_putc(p, '\n');
|
seq_putc(p, '\n');
|
||||||
}
|
}
|
||||||
|
@ -232,7 +232,7 @@ int show_interrupts(struct seq_file *p, void *v)
|
||||||
#ifndef CONFIG_SMP
|
#ifndef CONFIG_SMP
|
||||||
seq_printf(p, "%10u ", kstat_irqs(i));
|
seq_printf(p, "%10u ", kstat_irqs(i));
|
||||||
#else
|
#else
|
||||||
for_each_cpu(j)
|
for_each_online_cpu(j)
|
||||||
seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]);
|
seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]);
|
||||||
#endif
|
#endif
|
||||||
seq_printf(p, " %14s", irq_desc[i].handler->typename);
|
seq_printf(p, " %14s", irq_desc[i].handler->typename);
|
||||||
|
@ -246,12 +246,12 @@ skip:
|
||||||
spin_unlock_irqrestore(&irq_desc[i].lock, flags);
|
spin_unlock_irqrestore(&irq_desc[i].lock, flags);
|
||||||
} else if (i == NR_IRQS) {
|
} else if (i == NR_IRQS) {
|
||||||
seq_printf(p, "NMI: ");
|
seq_printf(p, "NMI: ");
|
||||||
for_each_cpu(j)
|
for_each_online_cpu(j)
|
||||||
seq_printf(p, "%10u ", nmi_count(j));
|
seq_printf(p, "%10u ", nmi_count(j));
|
||||||
seq_putc(p, '\n');
|
seq_putc(p, '\n');
|
||||||
#ifdef CONFIG_X86_LOCAL_APIC
|
#ifdef CONFIG_X86_LOCAL_APIC
|
||||||
seq_printf(p, "LOC: ");
|
seq_printf(p, "LOC: ");
|
||||||
for_each_cpu(j)
|
for_each_online_cpu(j)
|
||||||
seq_printf(p, "%10u ",
|
seq_printf(p, "%10u ",
|
||||||
per_cpu(irq_stat,j).apic_timer_irqs);
|
per_cpu(irq_stat,j).apic_timer_irqs);
|
||||||
seq_putc(p, '\n');
|
seq_putc(p, '\n');
|
||||||
|
|
|
@ -69,7 +69,7 @@ unsigned int def_to_bigsmp = 0;
|
||||||
/* Processor that is doing the boot up */
|
/* Processor that is doing the boot up */
|
||||||
unsigned int boot_cpu_physical_apicid = -1U;
|
unsigned int boot_cpu_physical_apicid = -1U;
|
||||||
/* Internal processor count */
|
/* Internal processor count */
|
||||||
static unsigned int __initdata num_processors;
|
static unsigned int __devinitdata num_processors;
|
||||||
|
|
||||||
/* Bitmask of physically existing CPUs */
|
/* Bitmask of physically existing CPUs */
|
||||||
physid_mask_t phys_cpu_present_map;
|
physid_mask_t phys_cpu_present_map;
|
||||||
|
@ -119,7 +119,7 @@ static int MP_valid_apicid(int apicid, int version)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static void __init MP_processor_info (struct mpc_config_processor *m)
|
static void __devinit MP_processor_info (struct mpc_config_processor *m)
|
||||||
{
|
{
|
||||||
int ver, apicid;
|
int ver, apicid;
|
||||||
physid_mask_t phys_cpu;
|
physid_mask_t phys_cpu;
|
||||||
|
@ -834,7 +834,7 @@ void __init mp_register_lapic_address (
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void __init mp_register_lapic (
|
void __devinit mp_register_lapic (
|
||||||
u8 id,
|
u8 id,
|
||||||
u8 enabled)
|
u8 enabled)
|
||||||
{
|
{
|
||||||
|
|
|
@ -87,7 +87,11 @@ EXPORT_SYMBOL(cpu_online_map);
|
||||||
cpumask_t cpu_callin_map;
|
cpumask_t cpu_callin_map;
|
||||||
cpumask_t cpu_callout_map;
|
cpumask_t cpu_callout_map;
|
||||||
EXPORT_SYMBOL(cpu_callout_map);
|
EXPORT_SYMBOL(cpu_callout_map);
|
||||||
|
#ifdef CONFIG_HOTPLUG_CPU
|
||||||
|
cpumask_t cpu_possible_map = CPU_MASK_ALL;
|
||||||
|
#else
|
||||||
cpumask_t cpu_possible_map;
|
cpumask_t cpu_possible_map;
|
||||||
|
#endif
|
||||||
EXPORT_SYMBOL(cpu_possible_map);
|
EXPORT_SYMBOL(cpu_possible_map);
|
||||||
static cpumask_t smp_commenced_mask;
|
static cpumask_t smp_commenced_mask;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue