7 #include <linux/stddef.h>
11 #include <linux/module.h>
12 #include <linux/personality.h>
14 #include <linux/ptrace.h>
15 #include <linux/random.h>
16 #include <linux/slab.h>
17 #include <linux/sched.h>
22 #include <asm/current.h>
23 #include <asm/pgtable.h>
24 #include <asm/mmu_context.h>
25 #include <asm/uaccess.h>
38 static inline int external_pid(
void)
48 for (i = 0; i <
ncpus; i++) {
49 if (cpu_tasks[i].pid == pid)
75 { external_pid(), task });
95 to =
current->thread.saved_task;
97 }
while (
current->thread.saved_task);
99 return current->thread.prev_sched;
109 tracehook_notify_resume(&
current->thread.regs);
134 fn =
current->thread.request.u.thread.proc;
135 arg =
current->thread.request.u.thread.arg;
175 sizeof(p->
thread.regs.regs));
185 p->
thread.request.u.thread.proc = (
int (*)(
void *))
sp;
186 p->
thread.request.u.thread.arg = (
void *)arg;
216 unsigned long long nsecs;
228 tick_nohz_idle_enter();
233 tick_nohz_idle_exit();
252 stack = sp & (
PAGE_MASK << CONFIG_KERNEL_STACK_ORDER);
262 call = &__uml_exitcall_end;
263 while (--call >= &__uml_exitcall_begin)
314 if (value > sysemu_supported)
324 static int sysemu_proc_show(
struct seq_file *
m,
void *
v)
343 if (tmp[0] >=
'0' && tmp[0] <=
'2')
351 .open = sysemu_proc_open,
355 .write = sysemu_proc_write,
361 if (!sysemu_supported)
364 ent = proc_create(
"sysemu", 0600,
NULL, &sysemu_proc_fops);
384 if (task->
thread.singlestep_syscall)
397 #ifndef arch_align_stack
408 unsigned long stack_page,
sp,
ip;
419 sp = p->
thread.switch_buf->JB_SP;
428 ip = *((
unsigned long *) sp);
435 sp +=
sizeof(
unsigned long);