diff options
Diffstat (limited to 'arch/m32r/kernel/smpboot.c')
-rw-r--r-- | arch/m32r/kernel/smpboot.c | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/arch/m32r/kernel/smpboot.c b/arch/m32r/kernel/smpboot.c index e034844cfc0d..cfdbe5d15002 100644 --- a/arch/m32r/kernel/smpboot.c +++ b/arch/m32r/kernel/smpboot.c | |||
@@ -135,9 +135,9 @@ void __devinit smp_prepare_boot_cpu(void) | |||
135 | { | 135 | { |
136 | bsp_phys_id = hard_smp_processor_id(); | 136 | bsp_phys_id = hard_smp_processor_id(); |
137 | physid_set(bsp_phys_id, phys_cpu_present_map); | 137 | physid_set(bsp_phys_id, phys_cpu_present_map); |
138 | cpu_set(0, cpu_online_map); /* BSP's cpu_id == 0 */ | 138 | set_cpu_online(0, true); /* BSP's cpu_id == 0 */ |
139 | cpu_set(0, cpu_callout_map); | 139 | cpumask_set_cpu(0, &cpu_callout_map); |
140 | cpu_set(0, cpu_callin_map); | 140 | cpumask_set_cpu(0, &cpu_callin_map); |
141 | 141 | ||
142 | /* | 142 | /* |
143 | * Initialize the logical to physical CPU number mapping | 143 | * Initialize the logical to physical CPU number mapping |
@@ -178,7 +178,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus) | |||
178 | for (phys_id = 0 ; phys_id < nr_cpu ; phys_id++) | 178 | for (phys_id = 0 ; phys_id < nr_cpu ; phys_id++) |
179 | physid_set(phys_id, phys_cpu_present_map); | 179 | physid_set(phys_id, phys_cpu_present_map); |
180 | #ifndef CONFIG_HOTPLUG_CPU | 180 | #ifndef CONFIG_HOTPLUG_CPU |
181 | init_cpu_present(&cpu_possible_map); | 181 | init_cpu_present(cpu_possible_mask); |
182 | #endif | 182 | #endif |
183 | 183 | ||
184 | show_mp_info(nr_cpu); | 184 | show_mp_info(nr_cpu); |
@@ -294,10 +294,10 @@ static void __init do_boot_cpu(int phys_id) | |||
294 | send_status = 0; | 294 | send_status = 0; |
295 | boot_status = 0; | 295 | boot_status = 0; |
296 | 296 | ||
297 | cpu_set(phys_id, cpu_bootout_map); | 297 | cpumask_set_cpu(phys_id, &cpu_bootout_map); |
298 | 298 | ||
299 | /* Send Startup IPI */ | 299 | /* Send Startup IPI */ |
300 | send_IPI_mask_phys(cpumask_of_cpu(phys_id), CPU_BOOT_IPI, 0); | 300 | send_IPI_mask_phys(cpumask_of(phys_id), CPU_BOOT_IPI, 0); |
301 | 301 | ||
302 | Dprintk("Waiting for send to finish...\n"); | 302 | Dprintk("Waiting for send to finish...\n"); |
303 | timeout = 0; | 303 | timeout = 0; |
@@ -306,7 +306,7 @@ static void __init do_boot_cpu(int phys_id) | |||
306 | do { | 306 | do { |
307 | Dprintk("+"); | 307 | Dprintk("+"); |
308 | udelay(1000); | 308 | udelay(1000); |
309 | send_status = !cpu_isset(phys_id, cpu_bootin_map); | 309 | send_status = !cpumask_test_cpu(phys_id, &cpu_bootin_map); |
310 | } while (send_status && (timeout++ < 100)); | 310 | } while (send_status && (timeout++ < 100)); |
311 | 311 | ||
312 | Dprintk("After Startup.\n"); | 312 | Dprintk("After Startup.\n"); |
@@ -316,19 +316,19 @@ static void __init do_boot_cpu(int phys_id) | |||
316 | * allow APs to start initializing. | 316 | * allow APs to start initializing. |
317 | */ | 317 | */ |
318 | Dprintk("Before Callout %d.\n", cpu_id); | 318 | Dprintk("Before Callout %d.\n", cpu_id); |
319 | cpu_set(cpu_id, cpu_callout_map); | 319 | cpumask_set_cpu(cpu_id, &cpu_callout_map); |
320 | Dprintk("After Callout %d.\n", cpu_id); | 320 | Dprintk("After Callout %d.\n", cpu_id); |
321 | 321 | ||
322 | /* | 322 | /* |
323 | * Wait 5s total for a response | 323 | * Wait 5s total for a response |
324 | */ | 324 | */ |
325 | for (timeout = 0; timeout < 5000; timeout++) { | 325 | for (timeout = 0; timeout < 5000; timeout++) { |
326 | if (cpu_isset(cpu_id, cpu_callin_map)) | 326 | if (cpumask_test_cpu(cpu_id, &cpu_callin_map)) |
327 | break; /* It has booted */ | 327 | break; /* It has booted */ |
328 | udelay(1000); | 328 | udelay(1000); |
329 | } | 329 | } |
330 | 330 | ||
331 | if (cpu_isset(cpu_id, cpu_callin_map)) { | 331 | if (cpumask_test_cpu(cpu_id, &cpu_callin_map)) { |
332 | /* number CPUs logically, starting from 1 (BSP is 0) */ | 332 | /* number CPUs logically, starting from 1 (BSP is 0) */ |
333 | Dprintk("OK.\n"); | 333 | Dprintk("OK.\n"); |
334 | } else { | 334 | } else { |
@@ -340,9 +340,9 @@ static void __init do_boot_cpu(int phys_id) | |||
340 | 340 | ||
341 | if (send_status || boot_status) { | 341 | if (send_status || boot_status) { |
342 | unmap_cpu_to_physid(cpu_id, phys_id); | 342 | unmap_cpu_to_physid(cpu_id, phys_id); |
343 | cpu_clear(cpu_id, cpu_callout_map); | 343 | cpumask_clear_cpu(cpu_id, &cpu_callout_map); |
344 | cpu_clear(cpu_id, cpu_callin_map); | 344 | cpumask_clear_cpu(cpu_id, &cpu_callin_map); |
345 | cpu_clear(cpu_id, cpu_initialized); | 345 | cpumask_clear_cpu(cpu_id, &cpu_initialized); |
346 | cpucount--; | 346 | cpucount--; |
347 | } | 347 | } |
348 | } | 348 | } |
@@ -351,17 +351,17 @@ int __cpuinit __cpu_up(unsigned int cpu_id) | |||
351 | { | 351 | { |
352 | int timeout; | 352 | int timeout; |
353 | 353 | ||
354 | cpu_set(cpu_id, smp_commenced_mask); | 354 | cpumask_set_cpu(cpu_id, &smp_commenced_mask); |
355 | 355 | ||
356 | /* | 356 | /* |
357 | * Wait 5s total for a response | 357 | * Wait 5s total for a response |
358 | */ | 358 | */ |
359 | for (timeout = 0; timeout < 5000; timeout++) { | 359 | for (timeout = 0; timeout < 5000; timeout++) { |
360 | if (cpu_isset(cpu_id, cpu_online_map)) | 360 | if (cpu_online(cpu_id)) |
361 | break; | 361 | break; |
362 | udelay(1000); | 362 | udelay(1000); |
363 | } | 363 | } |
364 | if (!cpu_isset(cpu_id, cpu_online_map)) | 364 | if (!cpu_online(cpu_id)) |
365 | BUG(); | 365 | BUG(); |
366 | 366 | ||
367 | return 0; | 367 | return 0; |
@@ -373,11 +373,11 @@ void __init smp_cpus_done(unsigned int max_cpus) | |||
373 | unsigned long bogosum = 0; | 373 | unsigned long bogosum = 0; |
374 | 374 | ||
375 | for (timeout = 0; timeout < 5000; timeout++) { | 375 | for (timeout = 0; timeout < 5000; timeout++) { |
376 | if (cpus_equal(cpu_callin_map, cpu_online_map)) | 376 | if (cpumask_equal(&cpu_callin_map, cpu_online_mask)) |
377 | break; | 377 | break; |
378 | udelay(1000); | 378 | udelay(1000); |
379 | } | 379 | } |
380 | if (!cpus_equal(cpu_callin_map, cpu_online_map)) | 380 | if (!cpumask_equal(&cpu_callin_map, cpu_online_mask)) |
381 | BUG(); | 381 | BUG(); |
382 | 382 | ||
383 | for (cpu_id = 0 ; cpu_id < num_online_cpus() ; cpu_id++) | 383 | for (cpu_id = 0 ; cpu_id < num_online_cpus() ; cpu_id++) |
@@ -388,7 +388,7 @@ void __init smp_cpus_done(unsigned int max_cpus) | |||
388 | */ | 388 | */ |
389 | Dprintk("Before bogomips.\n"); | 389 | Dprintk("Before bogomips.\n"); |
390 | if (cpucount) { | 390 | if (cpucount) { |
391 | for_each_cpu_mask(cpu_id, cpu_online_map) | 391 | for_each_cpu(cpu_id,cpu_online_mask) |
392 | bogosum += cpu_data[cpu_id].loops_per_jiffy; | 392 | bogosum += cpu_data[cpu_id].loops_per_jiffy; |
393 | 393 | ||
394 | printk(KERN_INFO "Total of %d processors activated " \ | 394 | printk(KERN_INFO "Total of %d processors activated " \ |
@@ -425,7 +425,7 @@ int __init start_secondary(void *unused) | |||
425 | cpu_init(); | 425 | cpu_init(); |
426 | preempt_disable(); | 426 | preempt_disable(); |
427 | smp_callin(); | 427 | smp_callin(); |
428 | while (!cpu_isset(smp_processor_id(), smp_commenced_mask)) | 428 | while (!cpumask_test_cpu(smp_processor_id(), &smp_commenced_mask)) |
429 | cpu_relax(); | 429 | cpu_relax(); |
430 | 430 | ||
431 | smp_online(); | 431 | smp_online(); |
@@ -463,7 +463,7 @@ static void __init smp_callin(void) | |||
463 | int cpu_id = smp_processor_id(); | 463 | int cpu_id = smp_processor_id(); |
464 | unsigned long timeout; | 464 | unsigned long timeout; |
465 | 465 | ||
466 | if (cpu_isset(cpu_id, cpu_callin_map)) { | 466 | if (cpumask_test_cpu(cpu_id, &cpu_callin_map)) { |
467 | printk("huh, phys CPU#%d, CPU#%d already present??\n", | 467 | printk("huh, phys CPU#%d, CPU#%d already present??\n", |
468 | phys_id, cpu_id); | 468 | phys_id, cpu_id); |
469 | BUG(); | 469 | BUG(); |
@@ -474,7 +474,7 @@ static void __init smp_callin(void) | |||
474 | timeout = jiffies + (2 * HZ); | 474 | timeout = jiffies + (2 * HZ); |
475 | while (time_before(jiffies, timeout)) { | 475 | while (time_before(jiffies, timeout)) { |
476 | /* Has the boot CPU finished it's STARTUP sequence ? */ | 476 | /* Has the boot CPU finished it's STARTUP sequence ? */ |
477 | if (cpu_isset(cpu_id, cpu_callout_map)) | 477 | if (cpumask_test_cpu(cpu_id, &cpu_callout_map)) |
478 | break; | 478 | break; |
479 | cpu_relax(); | 479 | cpu_relax(); |
480 | } | 480 | } |
@@ -486,7 +486,7 @@ static void __init smp_callin(void) | |||
486 | } | 486 | } |
487 | 487 | ||
488 | /* Allow the master to continue. */ | 488 | /* Allow the master to continue. */ |
489 | cpu_set(cpu_id, cpu_callin_map); | 489 | cpumask_set_cpu(cpu_id, &cpu_callin_map); |
490 | } | 490 | } |
491 | 491 | ||
492 | static void __init smp_online(void) | 492 | static void __init smp_online(void) |
@@ -503,7 +503,7 @@ static void __init smp_online(void) | |||
503 | /* Save our processor parameters */ | 503 | /* Save our processor parameters */ |
504 | smp_store_cpu_info(cpu_id); | 504 | smp_store_cpu_info(cpu_id); |
505 | 505 | ||
506 | cpu_set(cpu_id, cpu_online_map); | 506 | set_cpu_online(cpu_id, true); |
507 | } | 507 | } |
508 | 508 | ||
509 | /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ | 509 | /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ |