Commit 04a24ae4 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'for-3.14' of git://openrisc.net/~jonas/linux

Pull OpenRISC updates from Jonas Bonn:
 "The interesting change here is a rework of the OpenRISC signal
  handling to make it more like other architectures in the hopes that
  this makes it easier for others to comment on and understand.  This
  rework fixes some real bugs, like the fact that syscall restart did
  not work reliably"

* tag 'for-3.14' of git://openrisc.net/~jonas/linux:
  openrisc: Use get_signal() signal_setup_done()
  openrisc: Rework signal handling
parents 4bcec913 548dafe8
...@@ -853,37 +853,44 @@ UNHANDLED_EXCEPTION(_vector_0x1f00,0x1f00) ...@@ -853,37 +853,44 @@ UNHANDLED_EXCEPTION(_vector_0x1f00,0x1f00)
/* ========================================================[ return ] === */ /* ========================================================[ return ] === */
_work_pending: _resume_userspace:
/* DISABLE_INTERRUPTS(r3,r4)
* if (current_thread_info->flags & _TIF_NEED_RESCHED) l.lwz r4,TI_FLAGS(r10)
* schedule(); l.andi r13,r4,_TIF_WORK_MASK
*/ l.sfeqi r13,0
l.lwz r5,TI_FLAGS(r10) l.bf _restore_all
l.andi r3,r5,_TIF_NEED_RESCHED
l.sfnei r3,0
l.bnf _work_notifysig
l.nop
l.jal schedule
l.nop
l.j _resume_userspace
l.nop l.nop
/* Handle pending signals and notify-resume requests. _work_pending:
* do_notify_resume must be passed the latest pushed pt_regs, not l.lwz r5,PT_ORIG_GPR11(r1)
* necessarily the "userspace" ones. Also, pt_regs->syscallno l.sfltsi r5,0
* must be set so that the syscall restart functionality works. l.bnf 1f
*/ l.nop
_work_notifysig: l.andi r5,r5,0
l.jal do_notify_resume 1:
l.jal do_work_pending
l.ori r3,r1,0 /* pt_regs */ l.ori r3,r1,0 /* pt_regs */
_resume_userspace: l.sfeqi r11,0
DISABLE_INTERRUPTS(r3,r4) l.bf _restore_all
l.lwz r3,TI_FLAGS(r10) l.nop
l.andi r3,r3,_TIF_WORK_MASK l.sfltsi r11,0
l.sfnei r3,0 l.bnf 1f
l.bf _work_pending l.nop
l.and r11,r11,r0
l.ori r11,r11,__NR_restart_syscall
l.j _syscall_check_trace_enter
l.nop l.nop
1:
l.lwz r11,PT_ORIG_GPR11(r1)
/* Restore arg registers */
l.lwz r3,PT_GPR3(r1)
l.lwz r4,PT_GPR4(r1)
l.lwz r5,PT_GPR5(r1)
l.lwz r6,PT_GPR6(r1)
l.lwz r7,PT_GPR7(r1)
l.j _syscall_check_trace_enter
l.lwz r8,PT_GPR8(r1)
_restore_all: _restore_all:
RESTORE_ALL RESTORE_ALL
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment