aboutsummaryrefslogtreecommitdiffstats
path: root/arch/parisc
diff options
context:
space:
mode:
authorKyle McMartin <kyle@mcmartin.ca>2009-04-01 21:43:14 -0400
committerKyle McMartin <kyle@mcmartin.ca>2009-04-01 21:43:14 -0400
commit7cec2ef4a298605b010f1c80041de884e777ea67 (patch)
treeea0e947f07d8818a955e8d257aba92c47d92ba12 /arch/parisc
parent91400ac365da35b18036b46bdda27ddbcee4a663 (diff)
parent9bc181d8d7cb6462de0c315e364780ad275f7c57 (diff)
Merge branch 'rusty-cpumask-parisc' into parisc
Diffstat (limited to 'arch/parisc')
-rw-r--r--arch/parisc/include/asm/smp.h3
-rw-r--r--arch/parisc/kernel/irq.c4
-rw-r--r--arch/parisc/kernel/processor.c6
-rw-r--r--arch/parisc/kernel/smp.c18
4 files changed, 16 insertions, 15 deletions
diff --git a/arch/parisc/include/asm/smp.h b/arch/parisc/include/asm/smp.h
index 6ef4b7867b1b..21eb45a52629 100644
--- a/arch/parisc/include/asm/smp.h
+++ b/arch/parisc/include/asm/smp.h
@@ -29,7 +29,8 @@ extern void smp_send_reschedule(int cpu);
29extern void smp_send_all_nop(void); 29extern void smp_send_all_nop(void);
30 30
31extern void arch_send_call_function_single_ipi(int cpu); 31extern void arch_send_call_function_single_ipi(int cpu);
32extern void arch_send_call_function_ipi(cpumask_t mask); 32extern void arch_send_call_function_ipi_mask(const struct cpumask *mask);
33#define arch_send_call_function_ipi_mask arch_send_call_function_ipi_mask
33 34
34#endif /* !ASSEMBLY */ 35#endif /* !ASSEMBLY */
35 36
diff --git a/arch/parisc/kernel/irq.c b/arch/parisc/kernel/irq.c
index 1c740f5cbd63..4ea4229d765c 100644
--- a/arch/parisc/kernel/irq.c
+++ b/arch/parisc/kernel/irq.c
@@ -311,12 +311,12 @@ unsigned long txn_alloc_addr(unsigned int virt_irq)
311 next_cpu++; /* assign to "next" CPU we want this bugger on */ 311 next_cpu++; /* assign to "next" CPU we want this bugger on */
312 312
313 /* validate entry */ 313 /* validate entry */
314 while ((next_cpu < NR_CPUS) && 314 while ((next_cpu < nr_cpu_ids) &&
315 (!per_cpu(cpu_data, next_cpu).txn_addr || 315 (!per_cpu(cpu_data, next_cpu).txn_addr ||
316 !cpu_online(next_cpu))) 316 !cpu_online(next_cpu)))
317 next_cpu++; 317 next_cpu++;
318 318
319 if (next_cpu >= NR_CPUS) 319 if (next_cpu >= nr_cpu_ids)
320 next_cpu = 0; /* nothing else, assign monarch */ 320 next_cpu = 0; /* nothing else, assign monarch */
321 321
322 return txn_affinity_addr(virt_irq, next_cpu); 322 return txn_affinity_addr(virt_irq, next_cpu);
diff --git a/arch/parisc/kernel/processor.c b/arch/parisc/kernel/processor.c
index df5e28c7a829..e09d0f7fb6b0 100644
--- a/arch/parisc/kernel/processor.c
+++ b/arch/parisc/kernel/processor.c
@@ -100,8 +100,8 @@ static int __cpuinit processor_probe(struct parisc_device *dev)
100 struct cpuinfo_parisc *p; 100 struct cpuinfo_parisc *p;
101 101
102#ifdef CONFIG_SMP 102#ifdef CONFIG_SMP
103 if (num_online_cpus() >= NR_CPUS) { 103 if (num_online_cpus() >= nr_cpu_ids) {
104 printk(KERN_INFO "num_online_cpus() >= NR_CPUS\n"); 104 printk(KERN_INFO "num_online_cpus() >= nr_cpu_ids\n");
105 return 1; 105 return 1;
106 } 106 }
107#else 107#else
@@ -214,7 +214,7 @@ static int __cpuinit processor_probe(struct parisc_device *dev)
214 */ 214 */
215#ifdef CONFIG_SMP 215#ifdef CONFIG_SMP
216 if (cpuid) { 216 if (cpuid) {
217 cpu_set(cpuid, cpu_present_map); 217 set_cpu_present(cpuid, true);
218 cpu_up(cpuid); 218 cpu_up(cpuid);
219 } 219 }
220#endif 220#endif
diff --git a/arch/parisc/kernel/smp.c b/arch/parisc/kernel/smp.c
index 8545f2e7a2c0..1fd0f0cec037 100644
--- a/arch/parisc/kernel/smp.c
+++ b/arch/parisc/kernel/smp.c
@@ -114,7 +114,7 @@ halt_processor(void)
114{ 114{
115 /* REVISIT : redirect I/O Interrupts to another CPU? */ 115 /* REVISIT : redirect I/O Interrupts to another CPU? */
116 /* REVISIT : does PM *know* this CPU isn't available? */ 116 /* REVISIT : does PM *know* this CPU isn't available? */
117 cpu_clear(smp_processor_id(), cpu_online_map); 117 set_cpu_online(smp_processor_id(), false);
118 local_irq_disable(); 118 local_irq_disable();
119 for (;;) 119 for (;;)
120 ; 120 ;
@@ -215,11 +215,11 @@ ipi_send(int cpu, enum ipi_message_type op)
215} 215}
216 216
217static void 217static void
218send_IPI_mask(cpumask_t mask, enum ipi_message_type op) 218send_IPI_mask(const struct cpumask *mask, enum ipi_message_type op)
219{ 219{
220 int cpu; 220 int cpu;
221 221
222 for_each_cpu_mask(cpu, mask) 222 for_each_cpu(cpu, mask)
223 ipi_send(cpu, op); 223 ipi_send(cpu, op);
224} 224}
225 225
@@ -258,7 +258,7 @@ smp_send_all_nop(void)
258 send_IPI_allbutself(IPI_NOP); 258 send_IPI_allbutself(IPI_NOP);
259} 259}
260 260
261void arch_send_call_function_ipi(cpumask_t mask) 261void arch_send_call_function_ipi_mask(const struct cpumask *mask)
262{ 262{
263 send_IPI_mask(mask, IPI_CALL_FUNC); 263 send_IPI_mask(mask, IPI_CALL_FUNC);
264} 264}
@@ -297,13 +297,14 @@ smp_cpu_init(int cpunum)
297 mb(); 297 mb();
298 298
299 /* Well, support 2.4 linux scheme as well. */ 299 /* Well, support 2.4 linux scheme as well. */
300 if (cpu_test_and_set(cpunum, cpu_online_map)) 300 if (cpu_isset(cpunum, cpu_online_map))
301 { 301 {
302 extern void machine_halt(void); /* arch/parisc.../process.c */ 302 extern void machine_halt(void); /* arch/parisc.../process.c */
303 303
304 printk(KERN_CRIT "CPU#%d already initialized!\n", cpunum); 304 printk(KERN_CRIT "CPU#%d already initialized!\n", cpunum);
305 machine_halt(); 305 machine_halt();
306 } 306 }
307 set_cpu_online(cpunum, true);
307 308
308 /* Initialise the idle task for this CPU */ 309 /* Initialise the idle task for this CPU */
309 atomic_inc(&init_mm.mm_count); 310 atomic_inc(&init_mm.mm_count);
@@ -425,8 +426,8 @@ void __init smp_prepare_boot_cpu(void)
425 /* Setup BSP mappings */ 426 /* Setup BSP mappings */
426 printk(KERN_INFO "SMP: bootstrap CPU ID is %d\n", bootstrap_processor); 427 printk(KERN_INFO "SMP: bootstrap CPU ID is %d\n", bootstrap_processor);
427 428
428 cpu_set(bootstrap_processor, cpu_online_map); 429 set_cpu_online(bootstrap_processor, true);
429 cpu_set(bootstrap_processor, cpu_present_map); 430 set_cpu_present(bootstrap_processor, true);
430} 431}
431 432
432 433
@@ -437,8 +438,7 @@ void __init smp_prepare_boot_cpu(void)
437*/ 438*/
438void __init smp_prepare_cpus(unsigned int max_cpus) 439void __init smp_prepare_cpus(unsigned int max_cpus)
439{ 440{
440 cpus_clear(cpu_present_map); 441 init_cpu_present(cpumask_of(0));
441 cpu_set(0, cpu_present_map);
442 442
443 parisc_max_cpus = max_cpus; 443 parisc_max_cpus = max_cpus;
444 if (!max_cpus) 444 if (!max_cpus)