smp.c (8239c25f47d2b318156993b15f33900a86ea5e17) smp.c (9a1347237492f273f84ec39962b5806c70b2806a)
1/*
2** SMP Support
3**
4** Copyright (C) 1999 Walt Drummond <drummond@valinux.com>
5** Copyright (C) 1999 David Mosberger-Tang <davidm@hpl.hp.com>
6** Copyright (C) 2001,2004 Grant Grundler <grundler@parisc-linux.org>
7**
8** Lots of stuff stolen from arch/alpha/kernel/smp.c

--- 320 unchanged lines hidden (view full) ---

329
330 /* NOTREACHED */
331 panic("smp_callin() AAAAaaaaahhhh....\n");
332}
333
334/*
335 * Bring one cpu online.
336 */
1/*
2** SMP Support
3**
4** Copyright (C) 1999 Walt Drummond <drummond@valinux.com>
5** Copyright (C) 1999 David Mosberger-Tang <davidm@hpl.hp.com>
6** Copyright (C) 2001,2004 Grant Grundler <grundler@parisc-linux.org>
7**
8** Lots of stuff stolen from arch/alpha/kernel/smp.c

--- 320 unchanged lines hidden (view full) ---

329
330 /* NOTREACHED */
331 panic("smp_callin() AAAAaaaaahhhh....\n");
332}
333
334/*
335 * Bring one cpu online.
336 */
337int __cpuinit smp_boot_one_cpu(int cpuid)
337int __cpuinit smp_boot_one_cpu(int cpuid, struct task_struct *idle)
338{
339 const struct cpuinfo_parisc *p = &per_cpu(cpu_data, cpuid);
338{
339 const struct cpuinfo_parisc *p = &per_cpu(cpu_data, cpuid);
340 struct task_struct *idle;
341 long timeout;
342
340 long timeout;
341
343 /*
344 * Create an idle task for this CPU. Note the address wed* give
345 * to kernel_thread is irrelevant -- it's going to start
346 * where OS_BOOT_RENDEVZ vector in SAL says to start. But
347 * this gets all the other task-y sort of data structures set
348 * up like we wish. We need to pull the just created idle task
349 * off the run queue and stuff it into the init_tasks[] array.
350 * Sheesh . . .
351 */
352
353 idle = fork_idle(cpuid);
354 if (IS_ERR(idle))
355 panic("SMP: fork failed for CPU:%d", cpuid);
356
357 task_thread_info(idle)->cpu = cpuid;
358
359 /* Let _start know what logical CPU we're booting
360 ** (offset into init_tasks[],cpu_data[])
361 */
362 cpu_now_booting = cpuid;
363
364 /*

--- 27 unchanged lines hidden (view full) ---

392 /* Which implies Slave has started up */
393 cpu_now_booting = 0;
394 smp_init_current_idle_task = NULL;
395 goto alive ;
396 }
397 udelay(100);
398 barrier();
399 }
342 task_thread_info(idle)->cpu = cpuid;
343
344 /* Let _start know what logical CPU we're booting
345 ** (offset into init_tasks[],cpu_data[])
346 */
347 cpu_now_booting = cpuid;
348
349 /*

--- 27 unchanged lines hidden (view full) ---

377 /* Which implies Slave has started up */
378 cpu_now_booting = 0;
379 smp_init_current_idle_task = NULL;
380 goto alive ;
381 }
382 udelay(100);
383 barrier();
384 }
400
401 put_task_struct(idle);
402 idle = NULL;
403
404 printk(KERN_CRIT "SMP: CPU:%d is stuck.\n", cpuid);
405 return -1;
406
407alive:
408 /* Remember the Slave data */
409 smp_debug(100, KERN_DEBUG "SMP: CPU:%d came alive after %ld _us\n",
410 cpuid, timeout * 100);
411 return 0;

--- 35 unchanged lines hidden (view full) ---

447{
448 return;
449}
450
451
452int __cpuinit __cpu_up(unsigned int cpu, struct task_struct *tidle)
453{
454 if (cpu != 0 && cpu < parisc_max_cpus)
385 printk(KERN_CRIT "SMP: CPU:%d is stuck.\n", cpuid);
386 return -1;
387
388alive:
389 /* Remember the Slave data */
390 smp_debug(100, KERN_DEBUG "SMP: CPU:%d came alive after %ld _us\n",
391 cpuid, timeout * 100);
392 return 0;

--- 35 unchanged lines hidden (view full) ---

428{
429 return;
430}
431
432
433int __cpuinit __cpu_up(unsigned int cpu, struct task_struct *tidle)
434{
435 if (cpu != 0 && cpu < parisc_max_cpus)
455 smp_boot_one_cpu(cpu);
436 smp_boot_one_cpu(cpu, tidle);
456
457 return cpu_online(cpu) ? 0 : -ENOSYS;
458}
459
460#ifdef CONFIG_PROC_FS
461int __init
462setup_profiling_timer(unsigned int multiplier)
463{
464 return -EINVAL;
465}
466#endif
437
438 return cpu_online(cpu) ? 0 : -ENOSYS;
439}
440
441#ifdef CONFIG_PROC_FS
442int __init
443setup_profiling_timer(unsigned int multiplier)
444{
445 return -EINVAL;
446}
447#endif