Commit f3abb77d authored by Paul Mackerras's avatar Paul Mackerras Committed by Linus Torvalds

[PATCH] ppc64: remove unnecessary cpu maps

With cpu_present_map, we don't need these any longer.
Signed-off-by: default avatarNathan Lynch <nathanl@austin.ibm.com>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 8923632c
...@@ -940,9 +940,7 @@ static void __init prom_hold_cpus(unsigned long mem) ...@@ -940,9 +940,7 @@ static void __init prom_hold_cpus(unsigned long mem)
lpaca[cpuid].hw_cpu_id = reg; lpaca[cpuid].hw_cpu_id = reg;
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
cpu_set(cpuid, RELOC(cpu_available_map));
cpu_set(cpuid, RELOC(cpu_possible_map)); cpu_set(cpuid, RELOC(cpu_possible_map));
cpu_set(cpuid, RELOC(cpu_present_at_boot));
cpu_set(cpuid, RELOC(cpu_present_map)); cpu_set(cpuid, RELOC(cpu_present_map));
if (reg == 0) if (reg == 0)
cpu_set(cpuid, RELOC(cpu_online_map)); cpu_set(cpuid, RELOC(cpu_online_map));
...@@ -1043,9 +1041,7 @@ static void __init prom_hold_cpus(unsigned long mem) ...@@ -1043,9 +1041,7 @@ static void __init prom_hold_cpus(unsigned long mem)
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
/* Set the number of active processors. */ /* Set the number of active processors. */
_systemcfg->processorCount++; _systemcfg->processorCount++;
cpu_set(cpuid, RELOC(cpu_available_map));
cpu_set(cpuid, RELOC(cpu_possible_map)); cpu_set(cpuid, RELOC(cpu_possible_map));
cpu_set(cpuid, RELOC(cpu_present_at_boot));
cpu_set(cpuid, RELOC(cpu_present_map)); cpu_set(cpuid, RELOC(cpu_present_map));
#endif #endif
} else { } else {
...@@ -1055,10 +1051,8 @@ static void __init prom_hold_cpus(unsigned long mem) ...@@ -1055,10 +1051,8 @@ static void __init prom_hold_cpus(unsigned long mem)
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
else { else {
prom_printf("%x : booting cpu %s\n", cpuid, path); prom_printf("%x : booting cpu %s\n", cpuid, path);
cpu_set(cpuid, RELOC(cpu_available_map));
cpu_set(cpuid, RELOC(cpu_possible_map)); cpu_set(cpuid, RELOC(cpu_possible_map));
cpu_set(cpuid, RELOC(cpu_online_map)); cpu_set(cpuid, RELOC(cpu_online_map));
cpu_set(cpuid, RELOC(cpu_present_at_boot));
cpu_set(cpuid, RELOC(cpu_present_map)); cpu_set(cpuid, RELOC(cpu_present_map));
} }
#endif #endif
...@@ -1073,8 +1067,6 @@ static void __init prom_hold_cpus(unsigned long mem) ...@@ -1073,8 +1067,6 @@ static void __init prom_hold_cpus(unsigned long mem)
prom_printf("%x : preparing thread ... ", prom_printf("%x : preparing thread ... ",
interrupt_server[i]); interrupt_server[i]);
if (_naca->smt_state) { if (_naca->smt_state) {
cpu_set(cpuid, RELOC(cpu_available_map));
cpu_set(cpuid, RELOC(cpu_present_at_boot));
cpu_set(cpuid, RELOC(cpu_present_map)); cpu_set(cpuid, RELOC(cpu_present_map));
cpu_set(cpuid, RELOC(cpu_possible_map)); cpu_set(cpuid, RELOC(cpu_possible_map));
_systemcfg->processorCount++; _systemcfg->processorCount++;
......
...@@ -59,8 +59,6 @@ unsigned long cache_decay_ticks; ...@@ -59,8 +59,6 @@ unsigned long cache_decay_ticks;
cpumask_t cpu_possible_map = CPU_MASK_NONE; cpumask_t cpu_possible_map = CPU_MASK_NONE;
cpumask_t cpu_online_map = CPU_MASK_NONE; cpumask_t cpu_online_map = CPU_MASK_NONE;
cpumask_t cpu_available_map = CPU_MASK_NONE;
cpumask_t cpu_present_at_boot = CPU_MASK_NONE;
EXPORT_SYMBOL(cpu_online_map); EXPORT_SYMBOL(cpu_online_map);
EXPORT_SYMBOL(cpu_possible_map); EXPORT_SYMBOL(cpu_possible_map);
...@@ -124,9 +122,7 @@ static int smp_iSeries_numProcs(void) ...@@ -124,9 +122,7 @@ static int smp_iSeries_numProcs(void)
np = 0; np = 0;
for (i=0; i < NR_CPUS; ++i) { for (i=0; i < NR_CPUS; ++i) {
if (paca[i].lppaca.xDynProcStatus < 2) { if (paca[i].lppaca.xDynProcStatus < 2) {
cpu_set(i, cpu_available_map);
cpu_set(i, cpu_possible_map); cpu_set(i, cpu_possible_map);
cpu_set(i, cpu_present_at_boot);
cpu_set(i, cpu_present_map); cpu_set(i, cpu_present_map);
++np; ++np;
} }
...@@ -879,7 +875,7 @@ int __devinit __cpu_up(unsigned int cpu) ...@@ -879,7 +875,7 @@ int __devinit __cpu_up(unsigned int cpu)
int c; int c;
/* At boot, don't bother with non-present cpus -JSCHOPP */ /* At boot, don't bother with non-present cpus -JSCHOPP */
if (system_state == SYSTEM_BOOTING && !cpu_present_at_boot(cpu)) if (system_state == SYSTEM_BOOTING && !cpu_present(cpu))
return -ENOENT; return -ENOENT;
paca[cpu].prof_counter = 1; paca[cpu].prof_counter = 1;
......
...@@ -536,7 +536,7 @@ void xics_init_IRQ(void) ...@@ -536,7 +536,7 @@ void xics_init_IRQ(void)
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
for_each_cpu(i) { for_each_cpu(i) {
/* FIXME: Do this dynamically! --RR */ /* FIXME: Do this dynamically! --RR */
if (!cpu_present_at_boot(i)) if (!cpu_present(i))
continue; continue;
xics_per_cpu[i] = __ioremap((ulong)inodes[get_hard_smp_processor_id(i)].addr, xics_per_cpu[i] = __ioremap((ulong)inodes[get_hard_smp_processor_id(i)].addr,
(ulong)inodes[get_hard_smp_processor_id(i)].size, (ulong)inodes[get_hard_smp_processor_id(i)].size,
......
...@@ -36,23 +36,6 @@ extern void smp_message_recv(int, struct pt_regs *); ...@@ -36,23 +36,6 @@ extern void smp_message_recv(int, struct pt_regs *);
#define smp_processor_id() (get_paca()->paca_index) #define smp_processor_id() (get_paca()->paca_index)
#define hard_smp_processor_id() (get_paca()->hw_cpu_id) #define hard_smp_processor_id() (get_paca()->hw_cpu_id)
/*
* Retrieve the state of a CPU:
* online: CPU is in a normal run state
* possible: CPU is a candidate to be made online
* available: CPU is candidate for the 'possible' pool
* Used to get SMT threads started at boot time.
* present_at_boot: CPU was available at boot time. Used in DLPAR
* code to handle special cases for processor start up.
*/
extern cpumask_t cpu_present_at_boot;
extern cpumask_t cpu_online_map;
extern cpumask_t cpu_possible_map;
extern cpumask_t cpu_available_map;
#define cpu_present_at_boot(cpu) cpu_isset(cpu, cpu_present_at_boot)
#define cpu_available(cpu) cpu_isset(cpu, cpu_available_map)
/* Since OpenPIC has only 4 IPIs, we use slightly different message numbers. /* Since OpenPIC has only 4 IPIs, we use slightly different message numbers.
* *
* Make sure this matches openpic_request_IPIs in open_pic.c, or what shows up * Make sure this matches openpic_request_IPIs in open_pic.c, or what shows up
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment