forked from Minki/linux
cpumask: Use accessors code.: parisc
Impact: use new API Use the accessors rather than frobbing bits directly. Most of this is in arch code I haven't even compiled, but it is mostly straightforward. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Mike Travis <travis@sgi.com>
This commit is contained in:
parent
bd071e1a37
commit
9bc181d8d7
@ -214,7 +214,7 @@ static int __cpuinit processor_probe(struct parisc_device *dev)
|
|||||||
*/
|
*/
|
||||||
#ifdef CONFIG_SMP
|
#ifdef CONFIG_SMP
|
||||||
if (cpuid) {
|
if (cpuid) {
|
||||||
cpu_set(cpuid, cpu_present_map);
|
set_cpu_present(cpuid, true);
|
||||||
cpu_up(cpuid);
|
cpu_up(cpuid);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -113,7 +113,7 @@ halt_processor(void)
|
|||||||
{
|
{
|
||||||
/* REVISIT : redirect I/O Interrupts to another CPU? */
|
/* REVISIT : redirect I/O Interrupts to another CPU? */
|
||||||
/* REVISIT : does PM *know* this CPU isn't available? */
|
/* REVISIT : does PM *know* this CPU isn't available? */
|
||||||
cpu_clear(smp_processor_id(), cpu_online_map);
|
set_cpu_online(smp_processor_id(), false);
|
||||||
local_irq_disable();
|
local_irq_disable();
|
||||||
for (;;)
|
for (;;)
|
||||||
;
|
;
|
||||||
@ -296,13 +296,14 @@ smp_cpu_init(int cpunum)
|
|||||||
mb();
|
mb();
|
||||||
|
|
||||||
/* Well, support 2.4 linux scheme as well. */
|
/* Well, support 2.4 linux scheme as well. */
|
||||||
if (cpu_test_and_set(cpunum, cpu_online_map))
|
if (cpu_isset(cpunum, cpu_online_map))
|
||||||
{
|
{
|
||||||
extern void machine_halt(void); /* arch/parisc.../process.c */
|
extern void machine_halt(void); /* arch/parisc.../process.c */
|
||||||
|
|
||||||
printk(KERN_CRIT "CPU#%d already initialized!\n", cpunum);
|
printk(KERN_CRIT "CPU#%d already initialized!\n", cpunum);
|
||||||
machine_halt();
|
machine_halt();
|
||||||
}
|
}
|
||||||
|
set_cpu_online(cpunum, true);
|
||||||
|
|
||||||
/* Initialise the idle task for this CPU */
|
/* Initialise the idle task for this CPU */
|
||||||
atomic_inc(&init_mm.mm_count);
|
atomic_inc(&init_mm.mm_count);
|
||||||
@ -424,8 +425,8 @@ void __init smp_prepare_boot_cpu(void)
|
|||||||
/* Setup BSP mappings */
|
/* Setup BSP mappings */
|
||||||
printk(KERN_INFO "SMP: bootstrap CPU ID is %d\n", bootstrap_processor);
|
printk(KERN_INFO "SMP: bootstrap CPU ID is %d\n", bootstrap_processor);
|
||||||
|
|
||||||
cpu_set(bootstrap_processor, cpu_online_map);
|
set_cpu_online(bootstrap_processor, true);
|
||||||
cpu_set(bootstrap_processor, cpu_present_map);
|
set_cpu_present(bootstrap_processor, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -436,8 +437,7 @@ void __init smp_prepare_boot_cpu(void)
|
|||||||
*/
|
*/
|
||||||
void __init smp_prepare_cpus(unsigned int max_cpus)
|
void __init smp_prepare_cpus(unsigned int max_cpus)
|
||||||
{
|
{
|
||||||
cpus_clear(cpu_present_map);
|
init_cpu_present(cpumask_of(0));
|
||||||
cpu_set(0, cpu_present_map);
|
|
||||||
|
|
||||||
parisc_max_cpus = max_cpus;
|
parisc_max_cpus = max_cpus;
|
||||||
if (!max_cpus)
|
if (!max_cpus)
|
||||||
|
Loading…
Reference in New Issue
Block a user