diff options
author | Kyle McMartin <kyle@mcmartin.ca> | 2009-04-01 21:43:14 -0400 |
---|---|---|
committer | Kyle McMartin <kyle@mcmartin.ca> | 2009-04-01 21:43:14 -0400 |
commit | 7cec2ef4a298605b010f1c80041de884e777ea67 (patch) | |
tree | ea0e947f07d8818a955e8d257aba92c47d92ba12 /arch/parisc/kernel | |
parent | 91400ac365da35b18036b46bdda27ddbcee4a663 (diff) | |
parent | 9bc181d8d7cb6462de0c315e364780ad275f7c57 (diff) |
Merge branch 'rusty-cpumask-parisc' into parisc
Diffstat (limited to 'arch/parisc/kernel')
-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 |
3 files changed, 14 insertions, 14 deletions
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) |