diff options
Diffstat (limited to 'arch/parisc')
-rw-r--r-- | arch/parisc/include/asm/smp.h | 3 | ||||
-rw-r--r-- | arch/parisc/kernel/irq.c | 4 | ||||
-rw-r--r-- | arch/parisc/kernel/processor.c | 6 | ||||
-rw-r--r-- | arch/parisc/kernel/smp.c | 18 |
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); | |||
29 | extern void smp_send_all_nop(void); | 29 | extern void smp_send_all_nop(void); |
30 | 30 | ||
31 | extern void arch_send_call_function_single_ipi(int cpu); | 31 | extern void arch_send_call_function_single_ipi(int cpu); |
32 | extern void arch_send_call_function_ipi(cpumask_t mask); | 32 | extern 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 | ||
217 | static void | 217 | static void |
218 | send_IPI_mask(cpumask_t mask, enum ipi_message_type op) | 218 | send_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 | ||
261 | void arch_send_call_function_ipi(cpumask_t mask) | 261 | void 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 | */ |
438 | void __init smp_prepare_cpus(unsigned int max_cpus) | 439 | void __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) |