diff options
Diffstat (limited to 'arch/microblaze/kernel/entry.S')
-rw-r--r-- | arch/microblaze/kernel/entry.S | 37 |
1 files changed, 17 insertions, 20 deletions
diff --git a/arch/microblaze/kernel/entry.S b/arch/microblaze/kernel/entry.S index 66e34a3bfe1b..03f7b8ce6b6b 100644 --- a/arch/microblaze/kernel/entry.S +++ b/arch/microblaze/kernel/entry.S @@ -430,13 +430,12 @@ C_ENTRY(ret_from_trap): 5: /* get thread info from current task*/ lwi r11, CURRENT_TASK, TS_THREAD_INFO; lwi r11, r11, TI_FLAGS; /* get flags in thread info */ - andi r11, r11, _TIF_SIGPENDING; + andi r11, r11, _TIF_SIGPENDING | _TIF_NOTIFY_RESUME; beqi r11, 1f; /* Signals to handle, handle them */ addik r5, r1, 0; /* Arg 1: struct pt_regs *regs */ - addi r7, r0, 1; /* Arg 3: int in_syscall */ - bralid r15, do_signal; /* Handle any signals */ - add r6, r0, r0; /* Arg 2: sigset_t *oldset */ + bralid r15, do_notify_resume; /* Handle any signals */ + addi r6, r0, 1; /* Arg 2: int in_syscall */ /* Finally, return to user state. */ 1: set_bip; /* Ints masked for state restore */ @@ -493,10 +492,11 @@ C_ENTRY(sys_clone): bnei r6, 1f; /* See if child SP arg (arg 1) is 0. */ lwi r6, r1, PT_R1; /* If so, use paret's stack ptr */ 1: addik r7, r1, 0; /* Arg 2: parent context */ - add r8, r0, r0; /* Arg 3: (unused) */ - add r9, r0, r0; /* Arg 4: (unused) */ + lwi r9, r1, PT_R8; /* parent tid. */ + lwi r10, r1, PT_R9; /* child tid. */ + /* do_fork will pick up TLS from regs->r10. */ brid do_fork /* Do real work (tail-call) */ - add r10, r0, r0; /* Arg 5: (unused) */ + add r8, r0, r0; /* Arg 3: (unused) */ C_ENTRY(sys_execve): brid microblaze_execve; /* Do real work (tail-call).*/ @@ -622,7 +622,7 @@ C_ENTRY(ret_from_exc): /* Maybe handle a signal */ 5: lwi r11, CURRENT_TASK, TS_THREAD_INFO; /* get thread info */ lwi r11, r11, TI_FLAGS; /* get flags in thread info */ - andi r11, r11, _TIF_SIGPENDING; + andi r11, r11, _TIF_SIGPENDING | _TIF_NOTIFY_RESUME; beqi r11, 1f; /* Signals to handle, handle them */ /* @@ -635,11 +635,10 @@ C_ENTRY(ret_from_exc): * traps), but signal handlers may want to examine or change the * complete register state. Here we save anything not saved by * the normal entry sequence, so that it may be safely restored - * (in a possibly modified form) after do_signal returns. */ + * (in a possibly modified form) after do_notify_resume returns. */ addik r5, r1, 0; /* Arg 1: struct pt_regs *regs */ - addi r7, r0, 0; /* Arg 3: int in_syscall */ - bralid r15, do_signal; /* Handle any signals */ - add r6, r0, r0; /* Arg 2: sigset_t *oldset */ + bralid r15, do_notify_resume; /* Handle any signals */ + addi r6, r0, 0; /* Arg 2: int in_syscall */ /* Finally, return to user state. */ 1: set_bip; /* Ints masked for state restore */ @@ -732,13 +731,12 @@ ret_from_irq: /* Maybe handle a signal */ 5: lwi r11, CURRENT_TASK, TS_THREAD_INFO; /* MS: get thread info */ lwi r11, r11, TI_FLAGS; /* get flags in thread info */ - andi r11, r11, _TIF_SIGPENDING; + andi r11, r11, _TIF_SIGPENDING | _TIF_NOTIFY_RESUME; beqid r11, no_intr_resched /* Handle a signal return; Pending signals should be in r18. */ - addi r7, r0, 0; /* Arg 3: int in_syscall */ addik r5, r1, 0; /* Arg 1: struct pt_regs *regs */ - bralid r15, do_signal; /* Handle any signals */ - add r6, r0, r0; /* Arg 2: sigset_t *oldset */ + bralid r15, do_notify_resume; /* Handle any signals */ + addi r6, r0, 0; /* Arg 2: int in_syscall */ /* Finally, return to user state. */ no_intr_resched: @@ -869,13 +867,12 @@ dbtrap_call: /* Return point for kernel/user entry + 8 because of rtsd r15, 8 */ /* Maybe handle a signal */ 5: lwi r11, CURRENT_TASK, TS_THREAD_INFO; /* get thread info */ lwi r11, r11, TI_FLAGS; /* get flags in thread info */ - andi r11, r11, _TIF_SIGPENDING; + andi r11, r11, _TIF_SIGPENDING | _TIF_NOTIFY_RESUME; beqi r11, 1f; /* Signals to handle, handle them */ addik r5, r1, 0; /* Arg 1: struct pt_regs *regs */ - addi r7, r0, 0; /* Arg 3: int in_syscall */ - bralid r15, do_signal; /* Handle any signals */ - add r6, r0, r0; /* Arg 2: sigset_t *oldset */ + bralid r15, do_notify_resume; /* Handle any signals */ + addi r6, r0, 0; /* Arg 2: int in_syscall */ /* Finally, return to user state. */ 1: swi CURRENT_TASK, r0, PER_CPU(CURRENT_SAVE); /* save current */ |