diff options
Diffstat (limited to 'arch/um/os-Linux/skas')
-rw-r--r-- | arch/um/os-Linux/skas/mem.c | 2 | ||||
-rw-r--r-- | arch/um/os-Linux/skas/process.c | 21 |
2 files changed, 15 insertions, 8 deletions
diff --git a/arch/um/os-Linux/skas/mem.c b/arch/um/os-Linux/skas/mem.c index 9890e9090f58..fbb080c2fc26 100644 --- a/arch/um/os-Linux/skas/mem.c +++ b/arch/um/os-Linux/skas/mem.c | |||
@@ -60,7 +60,7 @@ static inline long do_syscall_stub(struct mm_id * mm_idp, void **addr) | |||
60 | 60 | ||
61 | multi_count++; | 61 | multi_count++; |
62 | 62 | ||
63 | get_safe_registers(regs); | 63 | get_safe_registers(regs, NULL); |
64 | regs[REGS_IP_INDEX] = UML_CONFIG_STUB_CODE + | 64 | regs[REGS_IP_INDEX] = UML_CONFIG_STUB_CODE + |
65 | ((unsigned long) &batch_syscall_stub - | 65 | ((unsigned long) &batch_syscall_stub - |
66 | (unsigned long) &__syscall_stub_start); | 66 | (unsigned long) &__syscall_stub_start); |
diff --git a/arch/um/os-Linux/skas/process.c b/arch/um/os-Linux/skas/process.c index 120a21c5883f..bbf34cb91ce1 100644 --- a/arch/um/os-Linux/skas/process.c +++ b/arch/um/os-Linux/skas/process.c | |||
@@ -310,16 +310,12 @@ void userspace(union uml_pt_regs *regs) | |||
310 | } | 310 | } |
311 | } | 311 | } |
312 | } | 312 | } |
313 | #define INIT_JMP_NEW_THREAD 0 | ||
314 | #define INIT_JMP_REMOVE_SIGSTACK 1 | ||
315 | #define INIT_JMP_CALLBACK 2 | ||
316 | #define INIT_JMP_HALT 3 | ||
317 | #define INIT_JMP_REBOOT 4 | ||
318 | 313 | ||
319 | int copy_context_skas0(unsigned long new_stack, int pid) | 314 | int copy_context_skas0(unsigned long new_stack, int pid) |
320 | { | 315 | { |
321 | int err; | 316 | int err; |
322 | unsigned long regs[MAX_REG_NR]; | 317 | unsigned long regs[HOST_FRAME_SIZE]; |
318 | unsigned long fp_regs[HOST_FP_SIZE]; | ||
323 | unsigned long current_stack = current_stub_stack(); | 319 | unsigned long current_stack = current_stub_stack(); |
324 | struct stub_data *data = (struct stub_data *) current_stack; | 320 | struct stub_data *data = (struct stub_data *) current_stack; |
325 | struct stub_data *child_data = (struct stub_data *) new_stack; | 321 | struct stub_data *child_data = (struct stub_data *) new_stack; |
@@ -334,7 +330,7 @@ int copy_context_skas0(unsigned long new_stack, int pid) | |||
334 | .timer = ((struct itimerval) | 330 | .timer = ((struct itimerval) |
335 | { { 0, 1000000 / hz() }, | 331 | { { 0, 1000000 / hz() }, |
336 | { 0, 1000000 / hz() }})}); | 332 | { 0, 1000000 / hz() }})}); |
337 | get_safe_registers(regs); | 333 | get_safe_registers(regs, fp_regs); |
338 | 334 | ||
339 | /* Set parent's instruction pointer to start of clone-stub */ | 335 | /* Set parent's instruction pointer to start of clone-stub */ |
340 | regs[REGS_IP_INDEX] = UML_CONFIG_STUB_CODE + | 336 | regs[REGS_IP_INDEX] = UML_CONFIG_STUB_CODE + |
@@ -350,6 +346,11 @@ int copy_context_skas0(unsigned long new_stack, int pid) | |||
350 | panic("copy_context_skas0 : PTRACE_SETREGS failed, " | 346 | panic("copy_context_skas0 : PTRACE_SETREGS failed, " |
351 | "pid = %d, errno = %d\n", pid, errno); | 347 | "pid = %d, errno = %d\n", pid, errno); |
352 | 348 | ||
349 | err = ptrace_setfpregs(pid, fp_regs); | ||
350 | if(err < 0) | ||
351 | panic("copy_context_skas0 : PTRACE_SETFPREGS failed, " | ||
352 | "pid = %d, errno = %d\n", pid, errno); | ||
353 | |||
353 | /* set a well known return code for detection of child write failure */ | 354 | /* set a well known return code for detection of child write failure */ |
354 | child_data->err = 12345678; | 355 | child_data->err = 12345678; |
355 | 356 | ||
@@ -457,6 +458,12 @@ void new_thread(void *stack, void **switch_buf_ptr, void **fork_buf_ptr, | |||
457 | set_signals(flags); | 458 | set_signals(flags); |
458 | } | 459 | } |
459 | 460 | ||
461 | #define INIT_JMP_NEW_THREAD 0 | ||
462 | #define INIT_JMP_REMOVE_SIGSTACK 1 | ||
463 | #define INIT_JMP_CALLBACK 2 | ||
464 | #define INIT_JMP_HALT 3 | ||
465 | #define INIT_JMP_REBOOT 4 | ||
466 | |||
460 | void thread_wait(void *sw, void *fb) | 467 | void thread_wait(void *sw, void *fb) |
461 | { | 468 | { |
462 | sigjmp_buf buf, **switch_buf = sw, *fork_buf; | 469 | sigjmp_buf buf, **switch_buf = sw, *fork_buf; |