11 #include <linux/errno.h>
12 #include <linux/module.h>
13 #include <linux/sched.h>
14 #include <linux/kernel.h>
17 #include <linux/stddef.h>
19 #include <linux/ptrace.h>
21 #include <linux/time.h>
23 #include <linux/stat.h>
25 #include <linux/mman.h>
26 #include <linux/elfcore.h>
27 #include <linux/reboot.h>
28 #include <linux/tty.h>
30 #include <linux/slab.h>
34 #include <asm/uaccess.h>
36 #include <asm/pgtable.h>
59 while (!need_resched())
74 common_shutdown_1(
void *generic_ptr)
78 unsigned long *pflags,
flags;
85 ((
unsigned long)
hwrpb +
hwrpb->processor_offset
87 pflags = &cpup->
flags;
91 flags &= ~0x00ff0001
UL;
96 flags |= 0x00040000
UL;
106 flags |= 0x00020000
UL;
116 flags |= 0x00030000
UL;
119 flags |= 0x00040000
UL;
127 while (cpumask_weight(cpu_present_mask))
132 if (alpha_using_srm) {
133 #ifdef CONFIG_DUMMY_CONSOLE
145 if (alpha_mv.kill_arch)
146 alpha_mv.kill_arch(how->
mode);
162 common_shutdown(
int mode,
char *restart_cmd)
248 int __user *parent_tid,
int __user *child_tid,
254 return do_fork(clone_flags, usp, regs, 0, parent_tid, child_tid);
279 unsigned long settls;
286 childstack->
r26 = (
unsigned long) ret_from_kernel_thread;
287 childstack->
r9 = usp;
289 childregs->
hae = alpha_mv.hae_cache,
290 childti->pcb.usp = 0;
291 childti->pcb.ksp = (
unsigned long) childstack;
292 childti->pcb.
flags = 1;
302 *childstack = *
stack;
303 childstack->
r26 = (
unsigned long) ret_from_fork;
304 childti->pcb.usp = usp;
305 childti->pcb.ksp = (
unsigned long) childstack;
306 childti->pcb.
flags = 1;
318 childti->pcb.unique = settls;
368 dest[32] = ti->pcb.unique;
409 if (sp > base && sp+6*8 < base + 16*1024) {
410 fp = ((
unsigned long*)sp)[6];
411 if (fp > sp && fp < base + 16*1024)
412 return *(
unsigned long *)fp;
421 unsigned long schedule_frame;
438 return ((
unsigned long *)schedule_frame)[12];