diff options
Diffstat (limited to 'arch/sparc')
-rw-r--r-- | arch/sparc/include/asm/smp_32.h | 2 | ||||
-rw-r--r-- | arch/sparc/include/asm/topology_64.h | 13 | ||||
-rw-r--r-- | arch/sparc/kernel/irq_64.c | 11 | ||||
-rw-r--r-- | arch/sparc/kernel/of_device_64.c | 4 | ||||
-rw-r--r-- | arch/sparc/kernel/pci_msi.c | 4 | ||||
-rw-r--r-- | arch/sparc/kernel/smp_32.c | 6 | ||||
-rw-r--r-- | arch/sparc/kernel/smp_64.c | 4 | ||||
-rw-r--r-- | arch/sparc/kernel/sparc_ksyms_32.c | 4 | ||||
-rw-r--r-- | arch/sparc/kernel/time_64.c | 2 |
9 files changed, 23 insertions, 27 deletions
diff --git a/arch/sparc/include/asm/smp_32.h b/arch/sparc/include/asm/smp_32.h index a8180e546a48..8408d9d2a662 100644 --- a/arch/sparc/include/asm/smp_32.h +++ b/arch/sparc/include/asm/smp_32.h | |||
@@ -29,8 +29,6 @@ | |||
29 | */ | 29 | */ |
30 | 30 | ||
31 | extern unsigned char boot_cpu_id; | 31 | extern unsigned char boot_cpu_id; |
32 | extern cpumask_t phys_cpu_present_map; | ||
33 | #define cpu_possible_map phys_cpu_present_map | ||
34 | 32 | ||
35 | typedef void (*smpfunc_t)(unsigned long, unsigned long, unsigned long, | 33 | typedef void (*smpfunc_t)(unsigned long, unsigned long, unsigned long, |
36 | unsigned long, unsigned long); | 34 | unsigned long, unsigned long); |
diff --git a/arch/sparc/include/asm/topology_64.h b/arch/sparc/include/asm/topology_64.h index 001c04027c82..b8a65b64e1df 100644 --- a/arch/sparc/include/asm/topology_64.h +++ b/arch/sparc/include/asm/topology_64.h | |||
@@ -16,8 +16,12 @@ static inline cpumask_t node_to_cpumask(int node) | |||
16 | { | 16 | { |
17 | return numa_cpumask_lookup_table[node]; | 17 | return numa_cpumask_lookup_table[node]; |
18 | } | 18 | } |
19 | #define cpumask_of_node(node) (&numa_cpumask_lookup_table[node]) | ||
19 | 20 | ||
20 | /* Returns a pointer to the cpumask of CPUs on Node 'node'. */ | 21 | /* |
22 | * Returns a pointer to the cpumask of CPUs on Node 'node'. | ||
23 | * Deprecated: use "const struct cpumask *mask = cpumask_of_node(node)" | ||
24 | */ | ||
21 | #define node_to_cpumask_ptr(v, node) \ | 25 | #define node_to_cpumask_ptr(v, node) \ |
22 | cpumask_t *v = &(numa_cpumask_lookup_table[node]) | 26 | cpumask_t *v = &(numa_cpumask_lookup_table[node]) |
23 | 27 | ||
@@ -26,9 +30,7 @@ static inline cpumask_t node_to_cpumask(int node) | |||
26 | 30 | ||
27 | static inline int node_to_first_cpu(int node) | 31 | static inline int node_to_first_cpu(int node) |
28 | { | 32 | { |
29 | cpumask_t tmp; | 33 | return cpumask_first(cpumask_of_node(node)); |
30 | tmp = node_to_cpumask(node); | ||
31 | return first_cpu(tmp); | ||
32 | } | 34 | } |
33 | 35 | ||
34 | struct pci_bus; | 36 | struct pci_bus; |
@@ -77,10 +79,13 @@ static inline int pcibus_to_node(struct pci_bus *pbus) | |||
77 | #define topology_core_id(cpu) (cpu_data(cpu).core_id) | 79 | #define topology_core_id(cpu) (cpu_data(cpu).core_id) |
78 | #define topology_core_siblings(cpu) (cpu_core_map[cpu]) | 80 | #define topology_core_siblings(cpu) (cpu_core_map[cpu]) |
79 | #define topology_thread_siblings(cpu) (per_cpu(cpu_sibling_map, cpu)) | 81 | #define topology_thread_siblings(cpu) (per_cpu(cpu_sibling_map, cpu)) |
82 | #define topology_core_cpumask(cpu) (&cpu_core_map[cpu]) | ||
83 | #define topology_thread_cpumask(cpu) (&per_cpu(cpu_sibling_map, cpu)) | ||
80 | #define mc_capable() (sparc64_multi_core) | 84 | #define mc_capable() (sparc64_multi_core) |
81 | #define smt_capable() (sparc64_multi_core) | 85 | #define smt_capable() (sparc64_multi_core) |
82 | #endif /* CONFIG_SMP */ | 86 | #endif /* CONFIG_SMP */ |
83 | 87 | ||
84 | #define cpu_coregroup_map(cpu) (cpu_core_map[cpu]) | 88 | #define cpu_coregroup_map(cpu) (cpu_core_map[cpu]) |
89 | #define cpu_coregroup_mask(cpu) (&cpu_core_map[cpu]) | ||
85 | 90 | ||
86 | #endif /* _ASM_SPARC64_TOPOLOGY_H */ | 91 | #endif /* _ASM_SPARC64_TOPOLOGY_H */ |
diff --git a/arch/sparc/kernel/irq_64.c b/arch/sparc/kernel/irq_64.c index a3ea2bcb95de..cab8e0286871 100644 --- a/arch/sparc/kernel/irq_64.c +++ b/arch/sparc/kernel/irq_64.c | |||
@@ -312,7 +312,8 @@ static void sun4u_irq_enable(unsigned int virt_irq) | |||
312 | } | 312 | } |
313 | } | 313 | } |
314 | 314 | ||
315 | static void sun4u_set_affinity(unsigned int virt_irq, cpumask_t mask) | 315 | static void sun4u_set_affinity(unsigned int virt_irq, |
316 | const struct cpumask *mask) | ||
316 | { | 317 | { |
317 | sun4u_irq_enable(virt_irq); | 318 | sun4u_irq_enable(virt_irq); |
318 | } | 319 | } |
@@ -362,7 +363,8 @@ static void sun4v_irq_enable(unsigned int virt_irq) | |||
362 | ino, err); | 363 | ino, err); |
363 | } | 364 | } |
364 | 365 | ||
365 | static void sun4v_set_affinity(unsigned int virt_irq, cpumask_t mask) | 366 | static void sun4v_set_affinity(unsigned int virt_irq, |
367 | const struct cpumask *mask) | ||
366 | { | 368 | { |
367 | unsigned int ino = virt_irq_table[virt_irq].dev_ino; | 369 | unsigned int ino = virt_irq_table[virt_irq].dev_ino; |
368 | unsigned long cpuid = irq_choose_cpu(virt_irq); | 370 | unsigned long cpuid = irq_choose_cpu(virt_irq); |
@@ -429,7 +431,8 @@ static void sun4v_virq_enable(unsigned int virt_irq) | |||
429 | dev_handle, dev_ino, err); | 431 | dev_handle, dev_ino, err); |
430 | } | 432 | } |
431 | 433 | ||
432 | static void sun4v_virt_set_affinity(unsigned int virt_irq, cpumask_t mask) | 434 | static void sun4v_virt_set_affinity(unsigned int virt_irq, |
435 | const struct cpumask *mask) | ||
433 | { | 436 | { |
434 | unsigned long cpuid, dev_handle, dev_ino; | 437 | unsigned long cpuid, dev_handle, dev_ino; |
435 | int err; | 438 | int err; |
@@ -851,7 +854,7 @@ void fixup_irqs(void) | |||
851 | !(irq_desc[irq].status & IRQ_PER_CPU)) { | 854 | !(irq_desc[irq].status & IRQ_PER_CPU)) { |
852 | if (irq_desc[irq].chip->set_affinity) | 855 | if (irq_desc[irq].chip->set_affinity) |
853 | irq_desc[irq].chip->set_affinity(irq, | 856 | irq_desc[irq].chip->set_affinity(irq, |
854 | irq_desc[irq].affinity); | 857 | &irq_desc[irq].affinity); |
855 | } | 858 | } |
856 | spin_unlock_irqrestore(&irq_desc[irq].lock, flags); | 859 | spin_unlock_irqrestore(&irq_desc[irq].lock, flags); |
857 | } | 860 | } |
diff --git a/arch/sparc/kernel/of_device_64.c b/arch/sparc/kernel/of_device_64.c index 46e231f7c5ce..4873f28905b0 100644 --- a/arch/sparc/kernel/of_device_64.c +++ b/arch/sparc/kernel/of_device_64.c | |||
@@ -778,9 +778,9 @@ static unsigned int __init build_one_device_irq(struct of_device *op, | |||
778 | out: | 778 | out: |
779 | nid = of_node_to_nid(dp); | 779 | nid = of_node_to_nid(dp); |
780 | if (nid != -1) { | 780 | if (nid != -1) { |
781 | cpumask_t numa_mask = node_to_cpumask(nid); | 781 | cpumask_t numa_mask = *cpumask_of_node(nid); |
782 | 782 | ||
783 | irq_set_affinity(irq, numa_mask); | 783 | irq_set_affinity(irq, &numa_mask); |
784 | } | 784 | } |
785 | 785 | ||
786 | return irq; | 786 | return irq; |
diff --git a/arch/sparc/kernel/pci_msi.c b/arch/sparc/kernel/pci_msi.c index 2e680f34f727..4ef282e81912 100644 --- a/arch/sparc/kernel/pci_msi.c +++ b/arch/sparc/kernel/pci_msi.c | |||
@@ -286,9 +286,9 @@ static int bringup_one_msi_queue(struct pci_pbm_info *pbm, | |||
286 | 286 | ||
287 | nid = pbm->numa_node; | 287 | nid = pbm->numa_node; |
288 | if (nid != -1) { | 288 | if (nid != -1) { |
289 | cpumask_t numa_mask = node_to_cpumask(nid); | 289 | cpumask_t numa_mask = *cpumask_of_node(nid); |
290 | 290 | ||
291 | irq_set_affinity(irq, numa_mask); | 291 | irq_set_affinity(irq, &numa_mask); |
292 | } | 292 | } |
293 | err = request_irq(irq, sparc64_msiq_interrupt, 0, | 293 | err = request_irq(irq, sparc64_msiq_interrupt, 0, |
294 | "MSIQ", | 294 | "MSIQ", |
diff --git a/arch/sparc/kernel/smp_32.c b/arch/sparc/kernel/smp_32.c index e396c1f17a92..1e5ac4e282e1 100644 --- a/arch/sparc/kernel/smp_32.c +++ b/arch/sparc/kernel/smp_32.c | |||
@@ -39,8 +39,6 @@ volatile unsigned long cpu_callin_map[NR_CPUS] __cpuinitdata = {0,}; | |||
39 | unsigned char boot_cpu_id = 0; | 39 | unsigned char boot_cpu_id = 0; |
40 | unsigned char boot_cpu_id4 = 0; /* boot_cpu_id << 2 */ | 40 | unsigned char boot_cpu_id4 = 0; /* boot_cpu_id << 2 */ |
41 | 41 | ||
42 | cpumask_t cpu_online_map = CPU_MASK_NONE; | ||
43 | cpumask_t phys_cpu_present_map = CPU_MASK_NONE; | ||
44 | cpumask_t smp_commenced_mask = CPU_MASK_NONE; | 42 | cpumask_t smp_commenced_mask = CPU_MASK_NONE; |
45 | 43 | ||
46 | /* The only guaranteed locking primitive available on all Sparc | 44 | /* The only guaranteed locking primitive available on all Sparc |
@@ -334,7 +332,7 @@ void __init smp_setup_cpu_possible_map(void) | |||
334 | instance = 0; | 332 | instance = 0; |
335 | while (!cpu_find_by_instance(instance, NULL, &mid)) { | 333 | while (!cpu_find_by_instance(instance, NULL, &mid)) { |
336 | if (mid < NR_CPUS) { | 334 | if (mid < NR_CPUS) { |
337 | cpu_set(mid, phys_cpu_present_map); | 335 | cpu_set(mid, cpu_possible_map); |
338 | cpu_set(mid, cpu_present_map); | 336 | cpu_set(mid, cpu_present_map); |
339 | } | 337 | } |
340 | instance++; | 338 | instance++; |
@@ -354,7 +352,7 @@ void __init smp_prepare_boot_cpu(void) | |||
354 | 352 | ||
355 | current_thread_info()->cpu = cpuid; | 353 | current_thread_info()->cpu = cpuid; |
356 | cpu_set(cpuid, cpu_online_map); | 354 | cpu_set(cpuid, cpu_online_map); |
357 | cpu_set(cpuid, phys_cpu_present_map); | 355 | cpu_set(cpuid, cpu_possible_map); |
358 | } | 356 | } |
359 | 357 | ||
360 | int __cpuinit __cpu_up(unsigned int cpu) | 358 | int __cpuinit __cpu_up(unsigned int cpu) |
diff --git a/arch/sparc/kernel/smp_64.c b/arch/sparc/kernel/smp_64.c index bfe99d82d458..46329799f346 100644 --- a/arch/sparc/kernel/smp_64.c +++ b/arch/sparc/kernel/smp_64.c | |||
@@ -49,14 +49,10 @@ | |||
49 | 49 | ||
50 | int sparc64_multi_core __read_mostly; | 50 | int sparc64_multi_core __read_mostly; |
51 | 51 | ||
52 | cpumask_t cpu_possible_map __read_mostly = CPU_MASK_NONE; | ||
53 | cpumask_t cpu_online_map __read_mostly = CPU_MASK_NONE; | ||
54 | DEFINE_PER_CPU(cpumask_t, cpu_sibling_map) = CPU_MASK_NONE; | 52 | DEFINE_PER_CPU(cpumask_t, cpu_sibling_map) = CPU_MASK_NONE; |
55 | cpumask_t cpu_core_map[NR_CPUS] __read_mostly = | 53 | cpumask_t cpu_core_map[NR_CPUS] __read_mostly = |
56 | { [0 ... NR_CPUS-1] = CPU_MASK_NONE }; | 54 | { [0 ... NR_CPUS-1] = CPU_MASK_NONE }; |
57 | 55 | ||
58 | EXPORT_SYMBOL(cpu_possible_map); | ||
59 | EXPORT_SYMBOL(cpu_online_map); | ||
60 | EXPORT_PER_CPU_SYMBOL(cpu_sibling_map); | 56 | EXPORT_PER_CPU_SYMBOL(cpu_sibling_map); |
61 | EXPORT_SYMBOL(cpu_core_map); | 57 | EXPORT_SYMBOL(cpu_core_map); |
62 | 58 | ||
diff --git a/arch/sparc/kernel/sparc_ksyms_32.c b/arch/sparc/kernel/sparc_ksyms_32.c index a4d45fc29b21..e1e97639231b 100644 --- a/arch/sparc/kernel/sparc_ksyms_32.c +++ b/arch/sparc/kernel/sparc_ksyms_32.c | |||
@@ -112,10 +112,6 @@ EXPORT_PER_CPU_SYMBOL(__cpu_data); | |||
112 | #ifdef CONFIG_SMP | 112 | #ifdef CONFIG_SMP |
113 | /* IRQ implementation. */ | 113 | /* IRQ implementation. */ |
114 | EXPORT_SYMBOL(synchronize_irq); | 114 | EXPORT_SYMBOL(synchronize_irq); |
115 | |||
116 | /* CPU online map and active count. */ | ||
117 | EXPORT_SYMBOL(cpu_online_map); | ||
118 | EXPORT_SYMBOL(phys_cpu_present_map); | ||
119 | #endif | 115 | #endif |
120 | 116 | ||
121 | EXPORT_SYMBOL(__udelay); | 117 | EXPORT_SYMBOL(__udelay); |
diff --git a/arch/sparc/kernel/time_64.c b/arch/sparc/kernel/time_64.c index 141da3759091..9df8f095a8b1 100644 --- a/arch/sparc/kernel/time_64.c +++ b/arch/sparc/kernel/time_64.c | |||
@@ -763,7 +763,7 @@ void __devinit setup_sparc64_timer(void) | |||
763 | sevt = &__get_cpu_var(sparc64_events); | 763 | sevt = &__get_cpu_var(sparc64_events); |
764 | 764 | ||
765 | memcpy(sevt, &sparc64_clockevent, sizeof(*sevt)); | 765 | memcpy(sevt, &sparc64_clockevent, sizeof(*sevt)); |
766 | sevt->cpumask = cpumask_of_cpu(smp_processor_id()); | 766 | sevt->cpumask = cpumask_of(smp_processor_id()); |
767 | 767 | ||
768 | clockevents_register_device(sevt); | 768 | clockevents_register_device(sevt); |
769 | } | 769 | } |