aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips')
-rw-r--r--arch/mips/alchemy/common/time.c2
-rw-r--r--arch/mips/include/asm/mach-ip27/topology.h2
-rw-r--r--arch/mips/include/asm/mmu_context.h10
-rw-r--r--arch/mips/include/asm/smp-ops.h2
-rw-r--r--arch/mips/include/asm/smp.h2
-rw-r--r--arch/mips/kernel/smp-cmp.c6
-rw-r--r--arch/mips/kernel/smp-mt.c6
-rw-r--r--arch/mips/kernel/smp-up.c3
-rw-r--r--arch/mips/kernel/smp.c8
-rw-r--r--arch/mips/kernel/smtc.c6
-rw-r--r--arch/mips/mipssim/sim_smtc.c5
-rw-r--r--arch/mips/mm/c-octeon.c2
-rw-r--r--arch/mips/mti-malta/malta-smtc.c4
-rw-r--r--arch/mips/pmc-sierra/yosemite/smp.c4
-rw-r--r--arch/mips/sgi-ip27/ip27-memory.c2
-rw-r--r--arch/mips/sgi-ip27/ip27-smp.c4
-rw-r--r--arch/mips/sibyte/bcm1480/smp.c5
-rw-r--r--arch/mips/sibyte/sb1250/smp.c5
18 files changed, 40 insertions, 38 deletions
diff --git a/arch/mips/alchemy/common/time.c b/arch/mips/alchemy/common/time.c
index f34ff8601942..379a664809b0 100644
--- a/arch/mips/alchemy/common/time.c
+++ b/arch/mips/alchemy/common/time.c
@@ -88,7 +88,7 @@ static struct clock_event_device au1x_rtcmatch2_clockdev = {
88 .irq = AU1000_RTC_MATCH2_INT, 88 .irq = AU1000_RTC_MATCH2_INT,
89 .set_next_event = au1x_rtcmatch2_set_next_event, 89 .set_next_event = au1x_rtcmatch2_set_next_event,
90 .set_mode = au1x_rtcmatch2_set_mode, 90 .set_mode = au1x_rtcmatch2_set_mode,
91 .cpumask = CPU_MASK_ALL_PTR, 91 .cpumask = cpu_all_mask,
92}; 92};
93 93
94static struct irqaction au1x_rtcmatch2_irqaction = { 94static struct irqaction au1x_rtcmatch2_irqaction = {
diff --git a/arch/mips/include/asm/mach-ip27/topology.h b/arch/mips/include/asm/mach-ip27/topology.h
index 230591707005..f6837422fe65 100644
--- a/arch/mips/include/asm/mach-ip27/topology.h
+++ b/arch/mips/include/asm/mach-ip27/topology.h
@@ -24,12 +24,10 @@ extern struct cpuinfo_ip27 sn_cpu_info[NR_CPUS];
24 24
25#define cpu_to_node(cpu) (sn_cpu_info[(cpu)].p_nodeid) 25#define cpu_to_node(cpu) (sn_cpu_info[(cpu)].p_nodeid)
26#define parent_node(node) (node) 26#define parent_node(node) (node)
27#define node_to_cpumask(node) (hub_data(node)->h_cpus)
28#define cpumask_of_node(node) (&hub_data(node)->h_cpus) 27#define cpumask_of_node(node) (&hub_data(node)->h_cpus)
29struct pci_bus; 28struct pci_bus;
30extern int pcibus_to_node(struct pci_bus *); 29extern int pcibus_to_node(struct pci_bus *);
31 30
32#define pcibus_to_cpumask(bus) (cpu_online_map)
33#define cpumask_of_pcibus(bus) (cpu_online_mask) 31#define cpumask_of_pcibus(bus) (cpu_online_mask)
34 32
35extern unsigned char __node_distances[MAX_COMPACT_NODES][MAX_COMPACT_NODES]; 33extern unsigned char __node_distances[MAX_COMPACT_NODES][MAX_COMPACT_NODES];
diff --git a/arch/mips/include/asm/mmu_context.h b/arch/mips/include/asm/mmu_context.h
index d3bea88d8744..d9743536a621 100644
--- a/arch/mips/include/asm/mmu_context.h
+++ b/arch/mips/include/asm/mmu_context.h
@@ -178,8 +178,8 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,
178 * Mark current->active_mm as not "active" anymore. 178 * Mark current->active_mm as not "active" anymore.
179 * We don't want to mislead possible IPI tlb flush routines. 179 * We don't want to mislead possible IPI tlb flush routines.
180 */ 180 */
181 cpu_clear(cpu, prev->cpu_vm_mask); 181 cpumask_clear_cpu(cpu, mm_cpumask(prev));
182 cpu_set(cpu, next->cpu_vm_mask); 182 cpumask_set_cpu(cpu, mm_cpumask(next));
183 183
184 local_irq_restore(flags); 184 local_irq_restore(flags);
185} 185}
@@ -235,8 +235,8 @@ activate_mm(struct mm_struct *prev, struct mm_struct *next)
235 TLBMISS_HANDLER_SETUP_PGD(next->pgd); 235 TLBMISS_HANDLER_SETUP_PGD(next->pgd);
236 236
237 /* mark mmu ownership change */ 237 /* mark mmu ownership change */
238 cpu_clear(cpu, prev->cpu_vm_mask); 238 cpumask_clear_cpu(cpu, mm_cpumask(prev));
239 cpu_set(cpu, next->cpu_vm_mask); 239 cpumask_set_cpu(cpu, mm_cpumask(next));
240 240
241 local_irq_restore(flags); 241 local_irq_restore(flags);
242} 242}
@@ -258,7 +258,7 @@ drop_mmu_context(struct mm_struct *mm, unsigned cpu)
258 258
259 local_irq_save(flags); 259 local_irq_save(flags);
260 260
261 if (cpu_isset(cpu, mm->cpu_vm_mask)) { 261 if (cpumask_test_cpu(cpu, mm_cpumask(mm))) {
262 get_new_mmu_context(mm, cpu); 262 get_new_mmu_context(mm, cpu);
263#ifdef CONFIG_MIPS_MT_SMTC 263#ifdef CONFIG_MIPS_MT_SMTC
264 /* See comments for similar code above */ 264 /* See comments for similar code above */
diff --git a/arch/mips/include/asm/smp-ops.h b/arch/mips/include/asm/smp-ops.h
index fd545547b8aa..9e09af34c8a8 100644
--- a/arch/mips/include/asm/smp-ops.h
+++ b/arch/mips/include/asm/smp-ops.h
@@ -19,7 +19,7 @@ struct task_struct;
19 19
20struct plat_smp_ops { 20struct plat_smp_ops {
21 void (*send_ipi_single)(int cpu, unsigned int action); 21 void (*send_ipi_single)(int cpu, unsigned int action);
22 void (*send_ipi_mask)(cpumask_t mask, unsigned int action); 22 void (*send_ipi_mask)(const struct cpumask *mask, unsigned int action);
23 void (*init_secondary)(void); 23 void (*init_secondary)(void);
24 void (*smp_finish)(void); 24 void (*smp_finish)(void);
25 void (*cpus_done)(void); 25 void (*cpus_done)(void);
diff --git a/arch/mips/include/asm/smp.h b/arch/mips/include/asm/smp.h
index aaa2d4ab26dc..e15f11a09311 100644
--- a/arch/mips/include/asm/smp.h
+++ b/arch/mips/include/asm/smp.h
@@ -78,6 +78,6 @@ extern void play_dead(void);
78extern asmlinkage void smp_call_function_interrupt(void); 78extern asmlinkage void smp_call_function_interrupt(void);
79 79
80extern void arch_send_call_function_single_ipi(int cpu); 80extern void arch_send_call_function_single_ipi(int cpu);
81extern void arch_send_call_function_ipi(cpumask_t mask); 81extern void arch_send_call_function_ipi_mask(const struct cpumask *mask);
82 82
83#endif /* __ASM_SMP_H */ 83#endif /* __ASM_SMP_H */
diff --git a/arch/mips/kernel/smp-cmp.c b/arch/mips/kernel/smp-cmp.c
index ad0ff5dc4d59..cc81771b882c 100644
--- a/arch/mips/kernel/smp-cmp.c
+++ b/arch/mips/kernel/smp-cmp.c
@@ -80,11 +80,11 @@ void cmp_send_ipi_single(int cpu, unsigned int action)
80 local_irq_restore(flags); 80 local_irq_restore(flags);
81} 81}
82 82
83static void cmp_send_ipi_mask(cpumask_t mask, unsigned int action) 83static void cmp_send_ipi_mask(const struct cpumask *mask, unsigned int action)
84{ 84{
85 unsigned int i; 85 unsigned int i;
86 86
87 for_each_cpu_mask(i, mask) 87 for_each_cpu(i, mask)
88 cmp_send_ipi_single(i, action); 88 cmp_send_ipi_single(i, action);
89} 89}
90 90
@@ -171,7 +171,7 @@ void __init cmp_smp_setup(void)
171 171
172 for (i = 1; i < NR_CPUS; i++) { 172 for (i = 1; i < NR_CPUS; i++) {
173 if (amon_cpu_avail(i)) { 173 if (amon_cpu_avail(i)) {
174 cpu_set(i, cpu_possible_map); 174 set_cpu_possible(i, true);
175 __cpu_number_map[i] = ++ncpu; 175 __cpu_number_map[i] = ++ncpu;
176 __cpu_logical_map[ncpu] = i; 176 __cpu_logical_map[ncpu] = i;
177 } 177 }
diff --git a/arch/mips/kernel/smp-mt.c b/arch/mips/kernel/smp-mt.c
index 6f7ee5ac46ee..43e7cdc5ded2 100644
--- a/arch/mips/kernel/smp-mt.c
+++ b/arch/mips/kernel/smp-mt.c
@@ -70,7 +70,7 @@ static unsigned int __init smvp_vpe_init(unsigned int tc, unsigned int mvpconf0,
70 write_vpe_c0_vpeconf0(tmp); 70 write_vpe_c0_vpeconf0(tmp);
71 71
72 /* Record this as available CPU */ 72 /* Record this as available CPU */
73 cpu_set(tc, cpu_possible_map); 73 set_cpu_possible(tc, true);
74 __cpu_number_map[tc] = ++ncpu; 74 __cpu_number_map[tc] = ++ncpu;
75 __cpu_logical_map[ncpu] = tc; 75 __cpu_logical_map[ncpu] = tc;
76 } 76 }
@@ -141,11 +141,11 @@ static void vsmp_send_ipi_single(int cpu, unsigned int action)
141 local_irq_restore(flags); 141 local_irq_restore(flags);
142} 142}
143 143
144static void vsmp_send_ipi_mask(cpumask_t mask, unsigned int action) 144static void vsmp_send_ipi_mask(const struct cpumask *mask, unsigned int action)
145{ 145{
146 unsigned int i; 146 unsigned int i;
147 147
148 for_each_cpu_mask(i, mask) 148 for_each_cpu(i, mask)
149 vsmp_send_ipi_single(i, action); 149 vsmp_send_ipi_single(i, action);
150} 150}
151 151
diff --git a/arch/mips/kernel/smp-up.c b/arch/mips/kernel/smp-up.c
index 2508d55d68fd..00500fea2750 100644
--- a/arch/mips/kernel/smp-up.c
+++ b/arch/mips/kernel/smp-up.c
@@ -18,7 +18,8 @@ static void up_send_ipi_single(int cpu, unsigned int action)
18 panic(KERN_ERR "%s called", __func__); 18 panic(KERN_ERR "%s called", __func__);
19} 19}
20 20
21static inline void up_send_ipi_mask(cpumask_t mask, unsigned int action) 21static inline void up_send_ipi_mask(const struct cpumask *mask,
22 unsigned int action)
22{ 23{
23 panic(KERN_ERR "%s called", __func__); 24 panic(KERN_ERR "%s called", __func__);
24} 25}
diff --git a/arch/mips/kernel/smp.c b/arch/mips/kernel/smp.c
index 64668a93248b..4eb106c6a3ec 100644
--- a/arch/mips/kernel/smp.c
+++ b/arch/mips/kernel/smp.c
@@ -128,7 +128,7 @@ asmlinkage __cpuinit void start_secondary(void)
128 cpu_idle(); 128 cpu_idle();
129} 129}
130 130
131void arch_send_call_function_ipi(cpumask_t mask) 131void arch_send_call_function_ipi_mask(const struct cpumask *mask)
132{ 132{
133 mp_ops->send_ipi_mask(mask, SMP_CALL_FUNCTION); 133 mp_ops->send_ipi_mask(mask, SMP_CALL_FUNCTION);
134} 134}
@@ -183,15 +183,15 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
183 mp_ops->prepare_cpus(max_cpus); 183 mp_ops->prepare_cpus(max_cpus);
184 set_cpu_sibling_map(0); 184 set_cpu_sibling_map(0);
185#ifndef CONFIG_HOTPLUG_CPU 185#ifndef CONFIG_HOTPLUG_CPU
186 cpu_present_map = cpu_possible_map; 186 init_cpu_present(&cpu_possible_map);
187#endif 187#endif
188} 188}
189 189
190/* preload SMP state for boot cpu */ 190/* preload SMP state for boot cpu */
191void __devinit smp_prepare_boot_cpu(void) 191void __devinit smp_prepare_boot_cpu(void)
192{ 192{
193 cpu_set(0, cpu_possible_map); 193 set_cpu_possible(0, true);
194 cpu_set(0, cpu_online_map); 194 set_cpu_online(0, true);
195 cpu_set(0, cpu_callin_map); 195 cpu_set(0, cpu_callin_map);
196} 196}
197 197
diff --git a/arch/mips/kernel/smtc.c b/arch/mips/kernel/smtc.c
index 1a466baf0edf..67153a0dc267 100644
--- a/arch/mips/kernel/smtc.c
+++ b/arch/mips/kernel/smtc.c
@@ -305,7 +305,7 @@ int __init smtc_build_cpu_map(int start_cpu_slot)
305 */ 305 */
306 ntcs = ((read_c0_mvpconf0() & MVPCONF0_PTC) >> MVPCONF0_PTC_SHIFT) + 1; 306 ntcs = ((read_c0_mvpconf0() & MVPCONF0_PTC) >> MVPCONF0_PTC_SHIFT) + 1;
307 for (i=start_cpu_slot; i<NR_CPUS && i<ntcs; i++) { 307 for (i=start_cpu_slot; i<NR_CPUS && i<ntcs; i++) {
308 cpu_set(i, cpu_possible_map); 308 set_cpu_possible(i, true);
309 __cpu_number_map[i] = i; 309 __cpu_number_map[i] = i;
310 __cpu_logical_map[i] = i; 310 __cpu_logical_map[i] = i;
311 } 311 }
@@ -525,8 +525,8 @@ void smtc_prepare_cpus(int cpus)
525 * Pull any physically present but unused TCs out of circulation. 525 * Pull any physically present but unused TCs out of circulation.
526 */ 526 */
527 while (tc < (((val & MVPCONF0_PTC) >> MVPCONF0_PTC_SHIFT) + 1)) { 527 while (tc < (((val & MVPCONF0_PTC) >> MVPCONF0_PTC_SHIFT) + 1)) {
528 cpu_clear(tc, cpu_possible_map); 528 set_cpu_possible(tc, false);
529 cpu_clear(tc, cpu_present_map); 529 set_cpu_present(tc, false);
530 tc++; 530 tc++;
531 } 531 }
532 532
diff --git a/arch/mips/mipssim/sim_smtc.c b/arch/mips/mipssim/sim_smtc.c
index d6e4f656ad14..5da30b6a65b7 100644
--- a/arch/mips/mipssim/sim_smtc.c
+++ b/arch/mips/mipssim/sim_smtc.c
@@ -43,11 +43,12 @@ static void ssmtc_send_ipi_single(int cpu, unsigned int action)
43 /* "CPU" may be TC of same VPE, VPE of same CPU, or different CPU */ 43 /* "CPU" may be TC of same VPE, VPE of same CPU, or different CPU */
44} 44}
45 45
46static inline void ssmtc_send_ipi_mask(cpumask_t mask, unsigned int action) 46static inline void ssmtc_send_ipi_mask(const struct cpumask *mask,
47 unsigned int action)
47{ 48{
48 unsigned int i; 49 unsigned int i;
49 50
50 for_each_cpu_mask(i, mask) 51 for_each_cpu(i, mask)
51 ssmtc_send_ipi_single(i, action); 52 ssmtc_send_ipi_single(i, action);
52} 53}
53 54
diff --git a/arch/mips/mm/c-octeon.c b/arch/mips/mm/c-octeon.c
index 10ab69f7183f..94e05e5733c1 100644
--- a/arch/mips/mm/c-octeon.c
+++ b/arch/mips/mm/c-octeon.c
@@ -79,7 +79,7 @@ static void octeon_flush_icache_all_cores(struct vm_area_struct *vma)
79 * cores it has been used on 79 * cores it has been used on
80 */ 80 */
81 if (vma) 81 if (vma)
82 mask = vma->vm_mm->cpu_vm_mask; 82 mask = *mm_cpumask(vma->vm_mm);
83 else 83 else
84 mask = cpu_online_map; 84 mask = cpu_online_map;
85 cpu_clear(cpu, mask); 85 cpu_clear(cpu, mask);
diff --git a/arch/mips/mti-malta/malta-smtc.c b/arch/mips/mti-malta/malta-smtc.c
index 499ffe5475df..192cfd2a539c 100644
--- a/arch/mips/mti-malta/malta-smtc.c
+++ b/arch/mips/mti-malta/malta-smtc.c
@@ -21,11 +21,11 @@ static void msmtc_send_ipi_single(int cpu, unsigned int action)
21 smtc_send_ipi(cpu, LINUX_SMP_IPI, action); 21 smtc_send_ipi(cpu, LINUX_SMP_IPI, action);
22} 22}
23 23
24static void msmtc_send_ipi_mask(cpumask_t mask, unsigned int action) 24static void msmtc_send_ipi_mask(const struct cpumask *mask, unsigned int action)
25{ 25{
26 unsigned int i; 26 unsigned int i;
27 27
28 for_each_cpu_mask(i, mask) 28 for_each_cpu(i, mask)
29 msmtc_send_ipi_single(i, action); 29 msmtc_send_ipi_single(i, action);
30} 30}
31 31
diff --git a/arch/mips/pmc-sierra/yosemite/smp.c b/arch/mips/pmc-sierra/yosemite/smp.c
index 8ace27716232..326fe7a392e8 100644
--- a/arch/mips/pmc-sierra/yosemite/smp.c
+++ b/arch/mips/pmc-sierra/yosemite/smp.c
@@ -97,11 +97,11 @@ static void yos_send_ipi_single(int cpu, unsigned int action)
97 } 97 }
98} 98}
99 99
100static void yos_send_ipi_mask(cpumask_t mask, unsigned int action) 100static void yos_send_ipi_mask(const struct cpumask *mask, unsigned int action)
101{ 101{
102 unsigned int i; 102 unsigned int i;
103 103
104 for_each_cpu_mask(i, mask) 104 for_each_cpu(i, mask)
105 yos_send_ipi_single(i, action); 105 yos_send_ipi_single(i, action);
106} 106}
107 107
diff --git a/arch/mips/sgi-ip27/ip27-memory.c b/arch/mips/sgi-ip27/ip27-memory.c
index 060d853d7b35..f61c164d1e67 100644
--- a/arch/mips/sgi-ip27/ip27-memory.c
+++ b/arch/mips/sgi-ip27/ip27-memory.c
@@ -421,7 +421,7 @@ static void __init node_mem_init(cnodeid_t node)
421 421
422/* 422/*
423 * A node with nothing. We use it to avoid any special casing in 423 * A node with nothing. We use it to avoid any special casing in
424 * node_to_cpumask 424 * cpumask_of_node
425 */ 425 */
426static struct node_data null_node = { 426static struct node_data null_node = {
427 .hub = { 427 .hub = {
diff --git a/arch/mips/sgi-ip27/ip27-smp.c b/arch/mips/sgi-ip27/ip27-smp.c
index cbcd7eb83bd1..9aa8f2951df6 100644
--- a/arch/mips/sgi-ip27/ip27-smp.c
+++ b/arch/mips/sgi-ip27/ip27-smp.c
@@ -165,11 +165,11 @@ static void ip27_send_ipi_single(int destid, unsigned int action)
165 REMOTE_HUB_SEND_INTR(COMPACT_TO_NASID_NODEID(cpu_to_node(destid)), irq); 165 REMOTE_HUB_SEND_INTR(COMPACT_TO_NASID_NODEID(cpu_to_node(destid)), irq);
166} 166}
167 167
168static void ip27_send_ipi_mask(cpumask_t mask, unsigned int action) 168static void ip27_send_ipi(const struct cpumask *mask, unsigned int action)
169{ 169{
170 unsigned int i; 170 unsigned int i;
171 171
172 for_each_cpu_mask(i, mask) 172 for_each_cpu(i, mask)
173 ip27_send_ipi_single(i, action); 173 ip27_send_ipi_single(i, action);
174} 174}
175 175
diff --git a/arch/mips/sibyte/bcm1480/smp.c b/arch/mips/sibyte/bcm1480/smp.c
index 314691648c97..47b347c992ea 100644
--- a/arch/mips/sibyte/bcm1480/smp.c
+++ b/arch/mips/sibyte/bcm1480/smp.c
@@ -82,11 +82,12 @@ static void bcm1480_send_ipi_single(int cpu, unsigned int action)
82 __raw_writeq((((u64)action)<< 48), mailbox_0_set_regs[cpu]); 82 __raw_writeq((((u64)action)<< 48), mailbox_0_set_regs[cpu]);
83} 83}
84 84
85static void bcm1480_send_ipi_mask(cpumask_t mask, unsigned int action) 85static void bcm1480_send_ipi_mask(const struct cpumask *mask,
86 unsigned int action)
86{ 87{
87 unsigned int i; 88 unsigned int i;
88 89
89 for_each_cpu_mask(i, mask) 90 for_each_cpu(i, mask)
90 bcm1480_send_ipi_single(i, action); 91 bcm1480_send_ipi_single(i, action);
91} 92}
92 93
diff --git a/arch/mips/sibyte/sb1250/smp.c b/arch/mips/sibyte/sb1250/smp.c
index cad14003b84f..c00a5cb1128d 100644
--- a/arch/mips/sibyte/sb1250/smp.c
+++ b/arch/mips/sibyte/sb1250/smp.c
@@ -70,11 +70,12 @@ static void sb1250_send_ipi_single(int cpu, unsigned int action)
70 __raw_writeq((((u64)action) << 48), mailbox_set_regs[cpu]); 70 __raw_writeq((((u64)action) << 48), mailbox_set_regs[cpu]);
71} 71}
72 72
73static inline void sb1250_send_ipi_mask(cpumask_t mask, unsigned int action) 73static inline void sb1250_send_ipi_mask(const struct cpumask *mask,
74 unsigned int action)
74{ 75{
75 unsigned int i; 76 unsigned int i;
76 77
77 for_each_cpu_mask(i, mask) 78 for_each_cpu(i, mask)
78 sb1250_send_ipi_single(i, action); 79 sb1250_send_ipi_single(i, action);
79} 80}
80 81