Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

alpha: replace with new cpumask APIs

We plan to remove cpu_xx() old APIs. Thus convert them. This patch has
no functional change.

Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Matt Turner <mattst88@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

KOSAKI Motohiro and committed by
Linus Torvalds
81740fc6 f67d9b15

+14 -12
+1 -1
arch/alpha/kernel/process.c
··· 121 121 /* Wait for the secondaries to halt. */ 122 122 set_cpu_present(boot_cpuid, false); 123 123 set_cpu_possible(boot_cpuid, false); 124 - while (cpus_weight(cpu_present_map)) 124 + while (cpumask_weight(cpu_present_mask)) 125 125 barrier(); 126 126 #endif 127 127
+1 -1
arch/alpha/kernel/setup.c
··· 1257 1257 #ifdef CONFIG_SMP 1258 1258 seq_printf(f, "cpus active\t\t: %u\n" 1259 1259 "cpu active mask\t\t: %016lx\n", 1260 - num_online_cpus(), cpus_addr(cpu_possible_map)[0]); 1260 + num_online_cpus(), cpumask_bits(cpu_possible_mask)[0]); 1261 1261 #endif 1262 1262 1263 1263 show_cache_size (f, "L1 Icache", alpha_l1i_cacheshape);
+4 -3
arch/alpha/kernel/smp.c
··· 451 451 } 452 452 453 453 printk(KERN_INFO "SMP: %d CPUs probed -- cpu_present_map = %lx\n", 454 - smp_num_probed, cpu_present_map.bits[0]); 454 + smp_num_probed, cpumask_bits(cpu_present_mask)[0]); 455 455 } 456 456 457 457 /* ··· 629 629 void 630 630 smp_send_stop(void) 631 631 { 632 - cpumask_t to_whom = cpu_possible_map; 633 - cpu_clear(smp_processor_id(), to_whom); 632 + cpumask_t to_whom; 633 + cpumask_copy(&to_whom, cpu_possible_mask); 634 + cpumask_clear_cpu(smp_processor_id(), &to_whom); 634 635 #ifdef DEBUG_IPI_MSG 635 636 if (hard_smp_processor_id() != boot_cpu_id) 636 637 printk(KERN_WARNING "smp_send_stop: Not on boot cpu.\n");
+1 -1
arch/alpha/kernel/sys_dp264.c
··· 140 140 141 141 for (cpu = 0; cpu < 4; cpu++) { 142 142 unsigned long aff = cpu_irq_affinity[cpu]; 143 - if (cpu_isset(cpu, affinity)) 143 + if (cpumask_test_cpu(cpu, &affinity)) 144 144 aff |= 1UL << irq; 145 145 else 146 146 aff &= ~(1UL << irq);
+7 -6
arch/alpha/kernel/sys_titan.c
··· 65 65 register int bcpu = boot_cpuid; 66 66 67 67 #ifdef CONFIG_SMP 68 - cpumask_t cpm = cpu_present_map; 68 + cpumask_t cpm; 69 69 volatile unsigned long *dim0, *dim1, *dim2, *dim3; 70 70 unsigned long mask0, mask1, mask2, mask3, dummy; 71 71 72 + cpumask_copy(&cpm, cpu_present_mask); 72 73 mask &= ~isa_enable; 73 74 mask0 = mask & titan_cpu_irq_affinity[0]; 74 75 mask1 = mask & titan_cpu_irq_affinity[1]; ··· 85 84 dim1 = &cchip->dim1.csr; 86 85 dim2 = &cchip->dim2.csr; 87 86 dim3 = &cchip->dim3.csr; 88 - if (!cpu_isset(0, cpm)) dim0 = &dummy; 89 - if (!cpu_isset(1, cpm)) dim1 = &dummy; 90 - if (!cpu_isset(2, cpm)) dim2 = &dummy; 91 - if (!cpu_isset(3, cpm)) dim3 = &dummy; 87 + if (!cpumask_test_cpu(0, &cpm)) dim0 = &dummy; 88 + if (!cpumask_test_cpu(1, &cpm)) dim1 = &dummy; 89 + if (!cpumask_test_cpu(2, &cpm)) dim2 = &dummy; 90 + if (!cpumask_test_cpu(3, &cpm)) dim3 = &dummy; 92 91 93 92 *dim0 = mask0; 94 93 *dim1 = mask1; ··· 138 137 int cpu; 139 138 140 139 for (cpu = 0; cpu < 4; cpu++) { 141 - if (cpu_isset(cpu, affinity)) 140 + if (cpumask_test_cpu(cpu, &affinity)) 142 141 titan_cpu_irq_affinity[cpu] |= 1UL << irq; 143 142 else 144 143 titan_cpu_irq_affinity[cpu] &= ~(1UL << irq);