diff options
Diffstat (limited to 'arch/powerpc/kernel/setup-common.c')
-rw-r--r-- | arch/powerpc/kernel/setup-common.c | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c index 21f30cb68077..79fca2651b65 100644 --- a/arch/powerpc/kernel/setup-common.c +++ b/arch/powerpc/kernel/setup-common.c | |||
@@ -381,7 +381,7 @@ static void __init cpu_init_thread_core_maps(int tpc) | |||
381 | int i; | 381 | int i; |
382 | 382 | ||
383 | threads_per_core = tpc; | 383 | threads_per_core = tpc; |
384 | threads_core_mask = CPU_MASK_NONE; | 384 | cpumask_clear(&threads_core_mask); |
385 | 385 | ||
386 | /* This implementation only supports power of 2 number of threads | 386 | /* This implementation only supports power of 2 number of threads |
387 | * for simplicity and performance | 387 | * for simplicity and performance |
@@ -390,7 +390,7 @@ static void __init cpu_init_thread_core_maps(int tpc) | |||
390 | BUG_ON(tpc != (1 << threads_shift)); | 390 | BUG_ON(tpc != (1 << threads_shift)); |
391 | 391 | ||
392 | for (i = 0; i < tpc; i++) | 392 | for (i = 0; i < tpc; i++) |
393 | cpu_set(i, threads_core_mask); | 393 | cpumask_set_cpu(i, &threads_core_mask); |
394 | 394 | ||
395 | printk(KERN_INFO "CPU maps initialized for %d thread%s per core\n", | 395 | printk(KERN_INFO "CPU maps initialized for %d thread%s per core\n", |
396 | tpc, tpc > 1 ? "s" : ""); | 396 | tpc, tpc > 1 ? "s" : ""); |
@@ -404,7 +404,7 @@ static void __init cpu_init_thread_core_maps(int tpc) | |||
404 | * cpu_present_mask | 404 | * cpu_present_mask |
405 | * | 405 | * |
406 | * Having the possible map set up early allows us to restrict allocations | 406 | * Having the possible map set up early allows us to restrict allocations |
407 | * of things like irqstacks to num_possible_cpus() rather than NR_CPUS. | 407 | * of things like irqstacks to nr_cpu_ids rather than NR_CPUS. |
408 | * | 408 | * |
409 | * We do not initialize the online map here; cpus set their own bits in | 409 | * We do not initialize the online map here; cpus set their own bits in |
410 | * cpu_online_mask as they come up. | 410 | * cpu_online_mask as they come up. |
@@ -424,7 +424,7 @@ void __init smp_setup_cpu_maps(void) | |||
424 | 424 | ||
425 | DBG("smp_setup_cpu_maps()\n"); | 425 | DBG("smp_setup_cpu_maps()\n"); |
426 | 426 | ||
427 | while ((dn = of_find_node_by_type(dn, "cpu")) && cpu < NR_CPUS) { | 427 | while ((dn = of_find_node_by_type(dn, "cpu")) && cpu < nr_cpu_ids) { |
428 | const int *intserv; | 428 | const int *intserv; |
429 | int j, len; | 429 | int j, len; |
430 | 430 | ||
@@ -443,7 +443,7 @@ void __init smp_setup_cpu_maps(void) | |||
443 | intserv = &cpu; /* assume logical == phys */ | 443 | intserv = &cpu; /* assume logical == phys */ |
444 | } | 444 | } |
445 | 445 | ||
446 | for (j = 0; j < nthreads && cpu < NR_CPUS; j++) { | 446 | for (j = 0; j < nthreads && cpu < nr_cpu_ids; j++) { |
447 | DBG(" thread %d -> cpu %d (hard id %d)\n", | 447 | DBG(" thread %d -> cpu %d (hard id %d)\n", |
448 | j, cpu, intserv[j]); | 448 | j, cpu, intserv[j]); |
449 | set_cpu_present(cpu, true); | 449 | set_cpu_present(cpu, true); |
@@ -483,12 +483,12 @@ void __init smp_setup_cpu_maps(void) | |||
483 | if (cpu_has_feature(CPU_FTR_SMT)) | 483 | if (cpu_has_feature(CPU_FTR_SMT)) |
484 | maxcpus *= nthreads; | 484 | maxcpus *= nthreads; |
485 | 485 | ||
486 | if (maxcpus > NR_CPUS) { | 486 | if (maxcpus > nr_cpu_ids) { |
487 | printk(KERN_WARNING | 487 | printk(KERN_WARNING |
488 | "Partition configured for %d cpus, " | 488 | "Partition configured for %d cpus, " |
489 | "operating system maximum is %d.\n", | 489 | "operating system maximum is %d.\n", |
490 | maxcpus, NR_CPUS); | 490 | maxcpus, nr_cpu_ids); |
491 | maxcpus = NR_CPUS; | 491 | maxcpus = nr_cpu_ids; |
492 | } else | 492 | } else |
493 | printk(KERN_INFO "Partition configured for %d cpus.\n", | 493 | printk(KERN_INFO "Partition configured for %d cpus.\n", |
494 | maxcpus); | 494 | maxcpus); |
@@ -510,7 +510,7 @@ void __init smp_setup_cpu_maps(void) | |||
510 | cpu_init_thread_core_maps(nthreads); | 510 | cpu_init_thread_core_maps(nthreads); |
511 | 511 | ||
512 | /* Now that possible cpus are set, set nr_cpu_ids for later use */ | 512 | /* Now that possible cpus are set, set nr_cpu_ids for later use */ |
513 | nr_cpu_ids = find_last_bit(cpumask_bits(cpu_possible_mask),NR_CPUS) + 1; | 513 | setup_nr_cpu_ids(); |
514 | 514 | ||
515 | free_unused_pacas(); | 515 | free_unused_pacas(); |
516 | } | 516 | } |
@@ -602,6 +602,10 @@ int check_legacy_ioport(unsigned long base_port) | |||
602 | * name instead */ | 602 | * name instead */ |
603 | if (!np) | 603 | if (!np) |
604 | np = of_find_node_by_name(NULL, "8042"); | 604 | np = of_find_node_by_name(NULL, "8042"); |
605 | if (np) { | ||
606 | of_i8042_kbd_irq = 1; | ||
607 | of_i8042_aux_irq = 12; | ||
608 | } | ||
605 | break; | 609 | break; |
606 | case FDC_BASE: /* FDC1 */ | 610 | case FDC_BASE: /* FDC1 */ |
607 | np = of_find_node_by_type(NULL, "fdc"); | 611 | np = of_find_node_by_type(NULL, "fdc"); |