diff options
author | Tony Luck <aegl@agluck-desktop.(none)> | 2009-03-31 17:24:52 -0400 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2009-03-31 17:24:52 -0400 |
commit | 50fbe56c127efde659c686495eb1f925fd84ff0a (patch) | |
tree | 6eb331035b3c03b4f97ba888c6d66017e84df4c5 /arch/ia64/kernel | |
parent | 15f7176eb1cccec0a332541285ee752b935c1c85 (diff) | |
parent | 5d8c39f68e1dc78c1a958e28bc685a5bac125b21 (diff) |
Pull cpumask into release branch
Diffstat (limited to 'arch/ia64/kernel')
-rw-r--r-- | arch/ia64/kernel/acpi.c | 8 | ||||
-rw-r--r-- | arch/ia64/kernel/mca.c | 6 | ||||
-rw-r--r-- | arch/ia64/kernel/perfmon.c | 4 | ||||
-rw-r--r-- | arch/ia64/kernel/salinfo.c | 6 | ||||
-rw-r--r-- | arch/ia64/kernel/setup.c | 4 | ||||
-rw-r--r-- | arch/ia64/kernel/smp.c | 6 | ||||
-rw-r--r-- | arch/ia64/kernel/smpboot.c | 17 |
7 files changed, 24 insertions, 27 deletions
diff --git a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c index bdef2ce38c8b..5510317db37b 100644 --- a/arch/ia64/kernel/acpi.c +++ b/arch/ia64/kernel/acpi.c | |||
@@ -890,7 +890,7 @@ __init void prefill_possible_map(void) | |||
890 | possible, max((possible - available_cpus), 0)); | 890 | possible, max((possible - available_cpus), 0)); |
891 | 891 | ||
892 | for (i = 0; i < possible; i++) | 892 | for (i = 0; i < possible; i++) |
893 | cpu_set(i, cpu_possible_map); | 893 | set_cpu_possible(i, true); |
894 | } | 894 | } |
895 | 895 | ||
896 | int acpi_map_lsapic(acpi_handle handle, int *pcpu) | 896 | int acpi_map_lsapic(acpi_handle handle, int *pcpu) |
@@ -928,9 +928,9 @@ int acpi_map_lsapic(acpi_handle handle, int *pcpu) | |||
928 | buffer.length = ACPI_ALLOCATE_BUFFER; | 928 | buffer.length = ACPI_ALLOCATE_BUFFER; |
929 | buffer.pointer = NULL; | 929 | buffer.pointer = NULL; |
930 | 930 | ||
931 | cpus_complement(tmp_map, cpu_present_map); | 931 | cpumask_complement(&tmp_map, cpu_present_mask); |
932 | cpu = first_cpu(tmp_map); | 932 | cpu = cpumask_first(&tmp_map); |
933 | if (cpu >= NR_CPUS) | 933 | if (cpu >= nr_cpu_ids) |
934 | return -EINVAL; | 934 | return -EINVAL; |
935 | 935 | ||
936 | acpi_map_cpu2node(handle, cpu, physid); | 936 | acpi_map_cpu2node(handle, cpu, physid); |
diff --git a/arch/ia64/kernel/mca.c b/arch/ia64/kernel/mca.c index bab1de2d2f6a..8f33a8840422 100644 --- a/arch/ia64/kernel/mca.c +++ b/arch/ia64/kernel/mca.c | |||
@@ -1456,9 +1456,9 @@ ia64_mca_cmc_int_caller(int cmc_irq, void *arg) | |||
1456 | 1456 | ||
1457 | ia64_mca_cmc_int_handler(cmc_irq, arg); | 1457 | ia64_mca_cmc_int_handler(cmc_irq, arg); |
1458 | 1458 | ||
1459 | for (++cpuid ; cpuid < NR_CPUS && !cpu_online(cpuid) ; cpuid++); | 1459 | cpuid = cpumask_next(cpuid+1, cpu_online_mask); |
1460 | 1460 | ||
1461 | if (cpuid < NR_CPUS) { | 1461 | if (cpuid < nr_cpu_ids) { |
1462 | platform_send_ipi(cpuid, IA64_CMCP_VECTOR, IA64_IPI_DM_INT, 0); | 1462 | platform_send_ipi(cpuid, IA64_CMCP_VECTOR, IA64_IPI_DM_INT, 0); |
1463 | } else { | 1463 | } else { |
1464 | /* If no log record, switch out of polling mode */ | 1464 | /* If no log record, switch out of polling mode */ |
@@ -1525,7 +1525,7 @@ ia64_mca_cpe_int_caller(int cpe_irq, void *arg) | |||
1525 | 1525 | ||
1526 | ia64_mca_cpe_int_handler(cpe_irq, arg); | 1526 | ia64_mca_cpe_int_handler(cpe_irq, arg); |
1527 | 1527 | ||
1528 | for (++cpuid ; cpuid < NR_CPUS && !cpu_online(cpuid) ; cpuid++); | 1528 | cpuid = cpumask_next(cpuid+1, cpu_online_mask); |
1529 | 1529 | ||
1530 | if (cpuid < NR_CPUS) { | 1530 | if (cpuid < NR_CPUS) { |
1531 | platform_send_ipi(cpuid, IA64_CPEP_VECTOR, IA64_IPI_DM_INT, 0); | 1531 | platform_send_ipi(cpuid, IA64_CPEP_VECTOR, IA64_IPI_DM_INT, 0); |
diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c index 5c0f408cfd71..8a06dc480594 100644 --- a/arch/ia64/kernel/perfmon.c +++ b/arch/ia64/kernel/perfmon.c | |||
@@ -5603,7 +5603,7 @@ pfm_interrupt_handler(int irq, void *arg) | |||
5603 | * /proc/perfmon interface, for debug only | 5603 | * /proc/perfmon interface, for debug only |
5604 | */ | 5604 | */ |
5605 | 5605 | ||
5606 | #define PFM_PROC_SHOW_HEADER ((void *)NR_CPUS+1) | 5606 | #define PFM_PROC_SHOW_HEADER ((void *)nr_cpu_ids+1) |
5607 | 5607 | ||
5608 | static void * | 5608 | static void * |
5609 | pfm_proc_start(struct seq_file *m, loff_t *pos) | 5609 | pfm_proc_start(struct seq_file *m, loff_t *pos) |
@@ -5612,7 +5612,7 @@ pfm_proc_start(struct seq_file *m, loff_t *pos) | |||
5612 | return PFM_PROC_SHOW_HEADER; | 5612 | return PFM_PROC_SHOW_HEADER; |
5613 | } | 5613 | } |
5614 | 5614 | ||
5615 | while (*pos <= NR_CPUS) { | 5615 | while (*pos <= nr_cpu_ids) { |
5616 | if (cpu_online(*pos - 1)) { | 5616 | if (cpu_online(*pos - 1)) { |
5617 | return (void *)*pos; | 5617 | return (void *)*pos; |
5618 | } | 5618 | } |
diff --git a/arch/ia64/kernel/salinfo.c b/arch/ia64/kernel/salinfo.c index ecb9eb78d687..7053c55b7649 100644 --- a/arch/ia64/kernel/salinfo.c +++ b/arch/ia64/kernel/salinfo.c | |||
@@ -317,7 +317,7 @@ retry: | |||
317 | } | 317 | } |
318 | 318 | ||
319 | n = data->cpu_check; | 319 | n = data->cpu_check; |
320 | for (i = 0; i < NR_CPUS; i++) { | 320 | for (i = 0; i < nr_cpu_ids; i++) { |
321 | if (cpu_isset(n, data->cpu_event)) { | 321 | if (cpu_isset(n, data->cpu_event)) { |
322 | if (!cpu_online(n)) { | 322 | if (!cpu_online(n)) { |
323 | cpu_clear(n, data->cpu_event); | 323 | cpu_clear(n, data->cpu_event); |
@@ -326,7 +326,7 @@ retry: | |||
326 | cpu = n; | 326 | cpu = n; |
327 | break; | 327 | break; |
328 | } | 328 | } |
329 | if (++n == NR_CPUS) | 329 | if (++n == nr_cpu_ids) |
330 | n = 0; | 330 | n = 0; |
331 | } | 331 | } |
332 | 332 | ||
@@ -337,7 +337,7 @@ retry: | |||
337 | 337 | ||
338 | /* for next read, start checking at next CPU */ | 338 | /* for next read, start checking at next CPU */ |
339 | data->cpu_check = cpu; | 339 | data->cpu_check = cpu; |
340 | if (++data->cpu_check == NR_CPUS) | 340 | if (++data->cpu_check == nr_cpu_ids) |
341 | data->cpu_check = 0; | 341 | data->cpu_check = 0; |
342 | 342 | ||
343 | snprintf(cmd, sizeof(cmd), "read %d\n", cpu); | 343 | snprintf(cmd, sizeof(cmd), "read %d\n", cpu); |
diff --git a/arch/ia64/kernel/setup.c b/arch/ia64/kernel/setup.c index 865af27c7737..ae9ec3dc76b8 100644 --- a/arch/ia64/kernel/setup.c +++ b/arch/ia64/kernel/setup.c | |||
@@ -730,10 +730,10 @@ static void * | |||
730 | c_start (struct seq_file *m, loff_t *pos) | 730 | c_start (struct seq_file *m, loff_t *pos) |
731 | { | 731 | { |
732 | #ifdef CONFIG_SMP | 732 | #ifdef CONFIG_SMP |
733 | while (*pos < NR_CPUS && !cpu_isset(*pos, cpu_online_map)) | 733 | while (*pos < nr_cpu_ids && !cpu_online(*pos)) |
734 | ++*pos; | 734 | ++*pos; |
735 | #endif | 735 | #endif |
736 | return *pos < NR_CPUS ? cpu_data(*pos) : NULL; | 736 | return *pos < nr_cpu_ids ? cpu_data(*pos) : NULL; |
737 | } | 737 | } |
738 | 738 | ||
739 | static void * | 739 | static void * |
diff --git a/arch/ia64/kernel/smp.c b/arch/ia64/kernel/smp.c index da8f020d82c1..2ea4199d9c57 100644 --- a/arch/ia64/kernel/smp.c +++ b/arch/ia64/kernel/smp.c | |||
@@ -166,11 +166,11 @@ send_IPI_allbutself (int op) | |||
166 | * Called with preemption disabled. | 166 | * Called with preemption disabled. |
167 | */ | 167 | */ |
168 | static inline void | 168 | static inline void |
169 | send_IPI_mask(cpumask_t mask, int op) | 169 | send_IPI_mask(const struct cpumask *mask, int op) |
170 | { | 170 | { |
171 | unsigned int cpu; | 171 | unsigned int cpu; |
172 | 172 | ||
173 | for_each_cpu_mask(cpu, mask) { | 173 | for_each_cpu(cpu, mask) { |
174 | send_IPI_single(cpu, op); | 174 | send_IPI_single(cpu, op); |
175 | } | 175 | } |
176 | } | 176 | } |
@@ -316,7 +316,7 @@ void arch_send_call_function_single_ipi(int cpu) | |||
316 | send_IPI_single(cpu, IPI_CALL_FUNC_SINGLE); | 316 | send_IPI_single(cpu, IPI_CALL_FUNC_SINGLE); |
317 | } | 317 | } |
318 | 318 | ||
319 | void arch_send_call_function_ipi(cpumask_t mask) | 319 | void arch_send_call_function_ipi_mask(const struct cpumask *mask) |
320 | { | 320 | { |
321 | send_IPI_mask(mask, IPI_CALL_FUNC); | 321 | send_IPI_mask(mask, IPI_CALL_FUNC); |
322 | } | 322 | } |
diff --git a/arch/ia64/kernel/smpboot.c b/arch/ia64/kernel/smpboot.c index 52290547c85b..7700e23034bb 100644 --- a/arch/ia64/kernel/smpboot.c +++ b/arch/ia64/kernel/smpboot.c | |||
@@ -581,14 +581,14 @@ smp_build_cpu_map (void) | |||
581 | 581 | ||
582 | ia64_cpu_to_sapicid[0] = boot_cpu_id; | 582 | ia64_cpu_to_sapicid[0] = boot_cpu_id; |
583 | cpus_clear(cpu_present_map); | 583 | cpus_clear(cpu_present_map); |
584 | cpu_set(0, cpu_present_map); | 584 | set_cpu_present(0, true); |
585 | cpu_set(0, cpu_possible_map); | 585 | set_cpu_possible(0, true); |
586 | for (cpu = 1, i = 0; i < smp_boot_data.cpu_count; i++) { | 586 | for (cpu = 1, i = 0; i < smp_boot_data.cpu_count; i++) { |
587 | sapicid = smp_boot_data.cpu_phys_id[i]; | 587 | sapicid = smp_boot_data.cpu_phys_id[i]; |
588 | if (sapicid == boot_cpu_id) | 588 | if (sapicid == boot_cpu_id) |
589 | continue; | 589 | continue; |
590 | cpu_set(cpu, cpu_present_map); | 590 | set_cpu_present(cpu, true); |
591 | cpu_set(cpu, cpu_possible_map); | 591 | set_cpu_possible(cpu, true); |
592 | ia64_cpu_to_sapicid[cpu] = sapicid; | 592 | ia64_cpu_to_sapicid[cpu] = sapicid; |
593 | cpu++; | 593 | cpu++; |
594 | } | 594 | } |
@@ -626,12 +626,9 @@ smp_prepare_cpus (unsigned int max_cpus) | |||
626 | */ | 626 | */ |
627 | if (!max_cpus) { | 627 | if (!max_cpus) { |
628 | printk(KERN_INFO "SMP mode deactivated.\n"); | 628 | printk(KERN_INFO "SMP mode deactivated.\n"); |
629 | cpus_clear(cpu_online_map); | 629 | init_cpu_online(cpumask_of(0)); |
630 | cpus_clear(cpu_present_map); | 630 | init_cpu_present(cpumask_of(0)); |
631 | cpus_clear(cpu_possible_map); | 631 | init_cpu_possible(cpumask_of(0)); |
632 | cpu_set(0, cpu_online_map); | ||
633 | cpu_set(0, cpu_present_map); | ||
634 | cpu_set(0, cpu_possible_map); | ||
635 | return; | 632 | return; |
636 | } | 633 | } |
637 | } | 634 | } |