tangled
alpha
login
or
join now
tjh.dev
/
kernel
1
fork
atom
Linux kernel mirror (for testing)
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel
os
linux
1
fork
atom
overview
issues
pulls
pipelines
Merge branch 'rusty-cpumask-parisc' into parisc
Kyle McMartin
17 years ago
7cec2ef4
91400ac3
+16
-15
4 changed files
expand all
collapse all
unified
split
arch
parisc
include
asm
smp.h
kernel
irq.c
processor.c
smp.c
+2
-1
arch/parisc/include/asm/smp.h
reviewed
···
29
29
extern void smp_send_all_nop(void);
30
30
31
31
extern void arch_send_call_function_single_ipi(int cpu);
32
32
-
extern void arch_send_call_function_ipi(cpumask_t mask);
32
32
+
extern void arch_send_call_function_ipi_mask(const struct cpumask *mask);
33
33
+
#define arch_send_call_function_ipi_mask arch_send_call_function_ipi_mask
33
34
34
35
#endif /* !ASSEMBLY */
35
36
+2
-2
arch/parisc/kernel/irq.c
reviewed
···
311
311
next_cpu++; /* assign to "next" CPU we want this bugger on */
312
312
313
313
/* validate entry */
314
314
-
while ((next_cpu < NR_CPUS) &&
314
314
+
while ((next_cpu < nr_cpu_ids) &&
315
315
(!per_cpu(cpu_data, next_cpu).txn_addr ||
316
316
!cpu_online(next_cpu)))
317
317
next_cpu++;
318
318
319
319
-
if (next_cpu >= NR_CPUS)
319
319
+
if (next_cpu >= nr_cpu_ids)
320
320
next_cpu = 0; /* nothing else, assign monarch */
321
321
322
322
return txn_affinity_addr(virt_irq, next_cpu);
+3
-3
arch/parisc/kernel/processor.c
reviewed
···
100
100
struct cpuinfo_parisc *p;
101
101
102
102
#ifdef CONFIG_SMP
103
103
-
if (num_online_cpus() >= NR_CPUS) {
104
104
-
printk(KERN_INFO "num_online_cpus() >= NR_CPUS\n");
103
103
+
if (num_online_cpus() >= nr_cpu_ids) {
104
104
+
printk(KERN_INFO "num_online_cpus() >= nr_cpu_ids\n");
105
105
return 1;
106
106
}
107
107
#else
···
214
214
*/
215
215
#ifdef CONFIG_SMP
216
216
if (cpuid) {
217
217
-
cpu_set(cpuid, cpu_present_map);
217
217
+
set_cpu_present(cpuid, true);
218
218
cpu_up(cpuid);
219
219
}
220
220
#endif
+9
-9
arch/parisc/kernel/smp.c
reviewed
···
114
114
{
115
115
/* REVISIT : redirect I/O Interrupts to another CPU? */
116
116
/* REVISIT : does PM *know* this CPU isn't available? */
117
117
-
cpu_clear(smp_processor_id(), cpu_online_map);
117
117
+
set_cpu_online(smp_processor_id(), false);
118
118
local_irq_disable();
119
119
for (;;)
120
120
;
···
215
215
}
216
216
217
217
static void
218
218
-
send_IPI_mask(cpumask_t mask, enum ipi_message_type op)
218
218
+
send_IPI_mask(const struct cpumask *mask, enum ipi_message_type op)
219
219
{
220
220
int cpu;
221
221
222
222
-
for_each_cpu_mask(cpu, mask)
222
222
+
for_each_cpu(cpu, mask)
223
223
ipi_send(cpu, op);
224
224
}
225
225
···
258
258
send_IPI_allbutself(IPI_NOP);
259
259
}
260
260
261
261
-
void arch_send_call_function_ipi(cpumask_t mask)
261
261
+
void arch_send_call_function_ipi_mask(const struct cpumask *mask)
262
262
{
263
263
send_IPI_mask(mask, IPI_CALL_FUNC);
264
264
}
···
297
297
mb();
298
298
299
299
/* Well, support 2.4 linux scheme as well. */
300
300
-
if (cpu_test_and_set(cpunum, cpu_online_map))
300
300
+
if (cpu_isset(cpunum, cpu_online_map))
301
301
{
302
302
extern void machine_halt(void); /* arch/parisc.../process.c */
303
303
304
304
printk(KERN_CRIT "CPU#%d already initialized!\n", cpunum);
305
305
machine_halt();
306
306
}
307
307
+
set_cpu_online(cpunum, true);
307
308
308
309
/* Initialise the idle task for this CPU */
309
310
atomic_inc(&init_mm.mm_count);
···
426
425
/* Setup BSP mappings */
427
426
printk(KERN_INFO "SMP: bootstrap CPU ID is %d\n", bootstrap_processor);
428
427
429
429
-
cpu_set(bootstrap_processor, cpu_online_map);
430
430
-
cpu_set(bootstrap_processor, cpu_present_map);
428
428
+
set_cpu_online(bootstrap_processor, true);
429
429
+
set_cpu_present(bootstrap_processor, true);
431
430
}
432
431
433
432
···
438
437
*/
439
438
void __init smp_prepare_cpus(unsigned int max_cpus)
440
439
{
441
441
-
cpus_clear(cpu_present_map);
442
442
-
cpu_set(0, cpu_present_map);
440
440
+
init_cpu_present(cpumask_of(0));
443
441
444
442
parisc_max_cpus = max_cpus;
445
443
if (!max_cpus)