diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-23 21:14:11 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-23 21:14:11 -0400 |
commit | 94a8d5caba74211ec76dac80fc6e2d5c391530df (patch) | |
tree | 21d17d214a354ae00ae27217d82b67bfc5bff3a3 /arch/powerpc | |
parent | 2bcd57ab61e7cabed626226a3771617981c11ce1 (diff) | |
parent | 6ba2ef7baac23a5d9bb85e28b882d16b439a2293 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus
* git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus: (39 commits)
cpumask: Move deprecated functions to end of header.
cpumask: remove unused deprecated functions, avoid accusations of insanity
cpumask: use new-style cpumask ops in mm/quicklist.
cpumask: use mm_cpumask() wrapper: x86
cpumask: use mm_cpumask() wrapper: um
cpumask: use mm_cpumask() wrapper: mips
cpumask: use mm_cpumask() wrapper: mn10300
cpumask: use mm_cpumask() wrapper: m32r
cpumask: use mm_cpumask() wrapper: arm
cpumask: Use accessors for cpu_*_mask: um
cpumask: Use accessors for cpu_*_mask: powerpc
cpumask: Use accessors for cpu_*_mask: mips
cpumask: Use accessors for cpu_*_mask: m32r
cpumask: remove arch_send_call_function_ipi
cpumask: arch_send_call_function_ipi_mask: s390
cpumask: arch_send_call_function_ipi_mask: powerpc
cpumask: arch_send_call_function_ipi_mask: mips
cpumask: arch_send_call_function_ipi_mask: m32r
cpumask: arch_send_call_function_ipi_mask: alpha
cpumask: remove obsolete topology_core_siblings and topology_thread_siblings: ia64
...
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/include/asm/smp.h | 2 | ||||
-rw-r--r-- | arch/powerpc/include/asm/topology.h | 12 | ||||
-rw-r--r-- | arch/powerpc/kernel/setup-common.c | 6 | ||||
-rw-r--r-- | arch/powerpc/kernel/smp.c | 12 | ||||
-rw-r--r-- | arch/powerpc/platforms/powermac/smp.c | 6 | ||||
-rw-r--r-- | arch/powerpc/platforms/pseries/hotplug-cpu.c | 6 |
6 files changed, 16 insertions, 28 deletions
diff --git a/arch/powerpc/include/asm/smp.h b/arch/powerpc/include/asm/smp.h index c0d3b8af9319..d9ea8d39c342 100644 --- a/arch/powerpc/include/asm/smp.h +++ b/arch/powerpc/include/asm/smp.h | |||
@@ -146,7 +146,7 @@ extern void smp_generic_take_timebase(void); | |||
146 | extern struct smp_ops_t *smp_ops; | 146 | extern struct smp_ops_t *smp_ops; |
147 | 147 | ||
148 | extern void arch_send_call_function_single_ipi(int cpu); | 148 | extern void arch_send_call_function_single_ipi(int cpu); |
149 | extern void arch_send_call_function_ipi(cpumask_t mask); | 149 | extern void arch_send_call_function_ipi_mask(const struct cpumask *mask); |
150 | 150 | ||
151 | /* Definitions relative to the secondary CPU spin loop | 151 | /* Definitions relative to the secondary CPU spin loop |
152 | * and entry point. Not all of them exist on both 32 and | 152 | * and entry point. Not all of them exist on both 32 and |
diff --git a/arch/powerpc/include/asm/topology.h b/arch/powerpc/include/asm/topology.h index 394edcbcce71..22f738d12ad9 100644 --- a/arch/powerpc/include/asm/topology.h +++ b/arch/powerpc/include/asm/topology.h | |||
@@ -17,11 +17,6 @@ static inline int cpu_to_node(int cpu) | |||
17 | 17 | ||
18 | #define parent_node(node) (node) | 18 | #define parent_node(node) (node) |
19 | 19 | ||
20 | static inline cpumask_t node_to_cpumask(int node) | ||
21 | { | ||
22 | return numa_cpumask_lookup_table[node]; | ||
23 | } | ||
24 | |||
25 | #define cpumask_of_node(node) (&numa_cpumask_lookup_table[node]) | 20 | #define cpumask_of_node(node) (&numa_cpumask_lookup_table[node]) |
26 | 21 | ||
27 | int of_node_to_nid(struct device_node *device); | 22 | int of_node_to_nid(struct device_node *device); |
@@ -36,11 +31,6 @@ static inline int pcibus_to_node(struct pci_bus *bus) | |||
36 | } | 31 | } |
37 | #endif | 32 | #endif |
38 | 33 | ||
39 | #define pcibus_to_cpumask(bus) (pcibus_to_node(bus) == -1 ? \ | ||
40 | CPU_MASK_ALL : \ | ||
41 | node_to_cpumask(pcibus_to_node(bus)) \ | ||
42 | ) | ||
43 | |||
44 | #define cpumask_of_pcibus(bus) (pcibus_to_node(bus) == -1 ? \ | 34 | #define cpumask_of_pcibus(bus) (pcibus_to_node(bus) == -1 ? \ |
45 | cpu_all_mask : \ | 35 | cpu_all_mask : \ |
46 | cpumask_of_node(pcibus_to_node(bus))) | 36 | cpumask_of_node(pcibus_to_node(bus))) |
@@ -104,8 +94,6 @@ static inline void sysfs_remove_device_from_node(struct sys_device *dev, | |||
104 | #ifdef CONFIG_PPC64 | 94 | #ifdef CONFIG_PPC64 |
105 | #include <asm/smp.h> | 95 | #include <asm/smp.h> |
106 | 96 | ||
107 | #define topology_thread_siblings(cpu) (per_cpu(cpu_sibling_map, cpu)) | ||
108 | #define topology_core_siblings(cpu) (per_cpu(cpu_core_map, cpu)) | ||
109 | #define topology_thread_cpumask(cpu) (&per_cpu(cpu_sibling_map, cpu)) | 97 | #define topology_thread_cpumask(cpu) (&per_cpu(cpu_sibling_map, cpu)) |
110 | #define topology_core_cpumask(cpu) (&per_cpu(cpu_core_map, cpu)) | 98 | #define topology_core_cpumask(cpu) (&per_cpu(cpu_core_map, cpu)) |
111 | #define topology_core_id(cpu) (cpu_to_core_id(cpu)) | 99 | #define topology_core_id(cpu) (cpu_to_core_id(cpu)) |
diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c index 74cd1a7d0d4b..4271f7a655a3 100644 --- a/arch/powerpc/kernel/setup-common.c +++ b/arch/powerpc/kernel/setup-common.c | |||
@@ -431,9 +431,9 @@ void __init smp_setup_cpu_maps(void) | |||
431 | for (j = 0; j < nthreads && cpu < NR_CPUS; j++) { | 431 | for (j = 0; j < nthreads && cpu < NR_CPUS; j++) { |
432 | DBG(" thread %d -> cpu %d (hard id %d)\n", | 432 | DBG(" thread %d -> cpu %d (hard id %d)\n", |
433 | j, cpu, intserv[j]); | 433 | j, cpu, intserv[j]); |
434 | cpu_set(cpu, cpu_present_map); | 434 | set_cpu_present(cpu, true); |
435 | set_hard_smp_processor_id(cpu, intserv[j]); | 435 | set_hard_smp_processor_id(cpu, intserv[j]); |
436 | cpu_set(cpu, cpu_possible_map); | 436 | set_cpu_possible(cpu, true); |
437 | cpu++; | 437 | cpu++; |
438 | } | 438 | } |
439 | } | 439 | } |
@@ -479,7 +479,7 @@ void __init smp_setup_cpu_maps(void) | |||
479 | maxcpus); | 479 | maxcpus); |
480 | 480 | ||
481 | for (cpu = 0; cpu < maxcpus; cpu++) | 481 | for (cpu = 0; cpu < maxcpus; cpu++) |
482 | cpu_set(cpu, cpu_possible_map); | 482 | set_cpu_possible(cpu, true); |
483 | out: | 483 | out: |
484 | of_node_put(dn); | 484 | of_node_put(dn); |
485 | } | 485 | } |
diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c index d387b3937ccc..9b86a74d2815 100644 --- a/arch/powerpc/kernel/smp.c +++ b/arch/powerpc/kernel/smp.c | |||
@@ -189,11 +189,11 @@ void arch_send_call_function_single_ipi(int cpu) | |||
189 | smp_ops->message_pass(cpu, PPC_MSG_CALL_FUNC_SINGLE); | 189 | smp_ops->message_pass(cpu, PPC_MSG_CALL_FUNC_SINGLE); |
190 | } | 190 | } |
191 | 191 | ||
192 | void arch_send_call_function_ipi(cpumask_t mask) | 192 | void arch_send_call_function_ipi_mask(const struct cpumask *mask) |
193 | { | 193 | { |
194 | unsigned int cpu; | 194 | unsigned int cpu; |
195 | 195 | ||
196 | for_each_cpu_mask(cpu, mask) | 196 | for_each_cpu(cpu, mask) |
197 | smp_ops->message_pass(cpu, PPC_MSG_CALL_FUNCTION); | 197 | smp_ops->message_pass(cpu, PPC_MSG_CALL_FUNCTION); |
198 | } | 198 | } |
199 | 199 | ||
@@ -287,7 +287,7 @@ void __devinit smp_prepare_boot_cpu(void) | |||
287 | { | 287 | { |
288 | BUG_ON(smp_processor_id() != boot_cpuid); | 288 | BUG_ON(smp_processor_id() != boot_cpuid); |
289 | 289 | ||
290 | cpu_set(boot_cpuid, cpu_online_map); | 290 | set_cpu_online(boot_cpuid, true); |
291 | cpu_set(boot_cpuid, per_cpu(cpu_sibling_map, boot_cpuid)); | 291 | cpu_set(boot_cpuid, per_cpu(cpu_sibling_map, boot_cpuid)); |
292 | cpu_set(boot_cpuid, per_cpu(cpu_core_map, boot_cpuid)); | 292 | cpu_set(boot_cpuid, per_cpu(cpu_core_map, boot_cpuid)); |
293 | #ifdef CONFIG_PPC64 | 293 | #ifdef CONFIG_PPC64 |
@@ -307,7 +307,7 @@ int generic_cpu_disable(void) | |||
307 | if (cpu == boot_cpuid) | 307 | if (cpu == boot_cpuid) |
308 | return -EBUSY; | 308 | return -EBUSY; |
309 | 309 | ||
310 | cpu_clear(cpu, cpu_online_map); | 310 | set_cpu_online(cpu, false); |
311 | #ifdef CONFIG_PPC64 | 311 | #ifdef CONFIG_PPC64 |
312 | vdso_data->processorCount--; | 312 | vdso_data->processorCount--; |
313 | fixup_irqs(cpu_online_map); | 313 | fixup_irqs(cpu_online_map); |
@@ -361,7 +361,7 @@ void generic_mach_cpu_die(void) | |||
361 | smp_wmb(); | 361 | smp_wmb(); |
362 | while (__get_cpu_var(cpu_state) != CPU_UP_PREPARE) | 362 | while (__get_cpu_var(cpu_state) != CPU_UP_PREPARE) |
363 | cpu_relax(); | 363 | cpu_relax(); |
364 | cpu_set(cpu, cpu_online_map); | 364 | set_cpu_online(cpu, true); |
365 | local_irq_enable(); | 365 | local_irq_enable(); |
366 | } | 366 | } |
367 | #endif | 367 | #endif |
@@ -508,7 +508,7 @@ int __devinit start_secondary(void *unused) | |||
508 | 508 | ||
509 | ipi_call_lock(); | 509 | ipi_call_lock(); |
510 | notify_cpu_starting(cpu); | 510 | notify_cpu_starting(cpu); |
511 | cpu_set(cpu, cpu_online_map); | 511 | set_cpu_online(cpu, true); |
512 | /* Update sibling maps */ | 512 | /* Update sibling maps */ |
513 | base = cpu_first_thread_in_core(cpu); | 513 | base = cpu_first_thread_in_core(cpu); |
514 | for (i = 0; i < threads_per_core; i++) { | 514 | for (i = 0; i < threads_per_core; i++) { |
diff --git a/arch/powerpc/platforms/powermac/smp.c b/arch/powerpc/platforms/powermac/smp.c index 937a38e73178..b40c22d697f0 100644 --- a/arch/powerpc/platforms/powermac/smp.c +++ b/arch/powerpc/platforms/powermac/smp.c | |||
@@ -320,7 +320,7 @@ static int __init smp_psurge_probe(void) | |||
320 | if (ncpus > NR_CPUS) | 320 | if (ncpus > NR_CPUS) |
321 | ncpus = NR_CPUS; | 321 | ncpus = NR_CPUS; |
322 | for (i = 1; i < ncpus ; ++i) | 322 | for (i = 1; i < ncpus ; ++i) |
323 | cpu_set(i, cpu_present_map); | 323 | set_cpu_present(i, true); |
324 | 324 | ||
325 | if (ppc_md.progress) ppc_md.progress("smp_psurge_probe - done", 0x352); | 325 | if (ppc_md.progress) ppc_md.progress("smp_psurge_probe - done", 0x352); |
326 | 326 | ||
@@ -867,7 +867,7 @@ static void __devinit smp_core99_setup_cpu(int cpu_nr) | |||
867 | 867 | ||
868 | int smp_core99_cpu_disable(void) | 868 | int smp_core99_cpu_disable(void) |
869 | { | 869 | { |
870 | cpu_clear(smp_processor_id(), cpu_online_map); | 870 | set_cpu_online(smp_processor_id(), false); |
871 | 871 | ||
872 | /* XXX reset cpu affinity here */ | 872 | /* XXX reset cpu affinity here */ |
873 | mpic_cpu_set_priority(0xf); | 873 | mpic_cpu_set_priority(0xf); |
@@ -952,7 +952,7 @@ void __init pmac_setup_smp(void) | |||
952 | int cpu; | 952 | int cpu; |
953 | 953 | ||
954 | for (cpu = 1; cpu < 4 && cpu < NR_CPUS; ++cpu) | 954 | for (cpu = 1; cpu < 4 && cpu < NR_CPUS; ++cpu) |
955 | cpu_set(cpu, cpu_possible_map); | 955 | set_cpu_possible(cpu, true); |
956 | smp_ops = &psurge_smp_ops; | 956 | smp_ops = &psurge_smp_ops; |
957 | } | 957 | } |
958 | #endif /* CONFIG_PPC32 */ | 958 | #endif /* CONFIG_PPC32 */ |
diff --git a/arch/powerpc/platforms/pseries/hotplug-cpu.c b/arch/powerpc/platforms/pseries/hotplug-cpu.c index a20ead87153d..ebff6d9a4e39 100644 --- a/arch/powerpc/platforms/pseries/hotplug-cpu.c +++ b/arch/powerpc/platforms/pseries/hotplug-cpu.c | |||
@@ -94,7 +94,7 @@ static int pseries_cpu_disable(void) | |||
94 | { | 94 | { |
95 | int cpu = smp_processor_id(); | 95 | int cpu = smp_processor_id(); |
96 | 96 | ||
97 | cpu_clear(cpu, cpu_online_map); | 97 | set_cpu_online(cpu, false); |
98 | vdso_data->processorCount--; | 98 | vdso_data->processorCount--; |
99 | 99 | ||
100 | /*fix boot_cpuid here*/ | 100 | /*fix boot_cpuid here*/ |
@@ -185,7 +185,7 @@ static int pseries_add_processor(struct device_node *np) | |||
185 | 185 | ||
186 | for_each_cpu_mask(cpu, tmp) { | 186 | for_each_cpu_mask(cpu, tmp) { |
187 | BUG_ON(cpu_isset(cpu, cpu_present_map)); | 187 | BUG_ON(cpu_isset(cpu, cpu_present_map)); |
188 | cpu_set(cpu, cpu_present_map); | 188 | set_cpu_present(cpu, true); |
189 | set_hard_smp_processor_id(cpu, *intserv++); | 189 | set_hard_smp_processor_id(cpu, *intserv++); |
190 | } | 190 | } |
191 | err = 0; | 191 | err = 0; |
@@ -217,7 +217,7 @@ static void pseries_remove_processor(struct device_node *np) | |||
217 | if (get_hard_smp_processor_id(cpu) != intserv[i]) | 217 | if (get_hard_smp_processor_id(cpu) != intserv[i]) |
218 | continue; | 218 | continue; |
219 | BUG_ON(cpu_online(cpu)); | 219 | BUG_ON(cpu_online(cpu)); |
220 | cpu_clear(cpu, cpu_present_map); | 220 | set_cpu_present(cpu, false); |
221 | set_hard_smp_processor_id(cpu, -1); | 221 | set_hard_smp_processor_id(cpu, -1); |
222 | break; | 222 | break; |
223 | } | 223 | } |