lkml.org 
[lkml]   [2014]   [Oct]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4 04/29] nios2: Exception handling

> +Lsignal_return:
> + ANDI32 r1, r10, _TIF_SIGPENDING | _TIF_NOTIFY_RESUME
> + beq r1, r0, restore_all
> + mov r4, sp /* pt_regs */
> + SAVE_SWITCH_STACK
> + call do_notify_resume
> + beq r2, r0, no_work_pending
> + RESTORE_SWITCH_STACK
> + /* prepare restart syscall here without leaving kernel */
> + ldw r2, PT_R2(sp) /* reload syscall number in r2 */
> + ldw r4, PT_R4(sp) /* reload syscall arguments r4-r9 */
> + ldw r5, PT_R5(sp)
> + ldw r6, PT_R6(sp)
> + ldw r7, PT_R7(sp)
> + ldw r8, PT_R8(sp)
> + ldw r9, PT_R9(sp)
> + br local_restart /* restart syscall */
> +
> +no_work_pending:
> + RESTORE_SWITCH_STACK
> + br restore_all

Umm... Branch to no_work_pending will be usuall taken. How well does
branch predictor on that processor cope with such things?

Another thing is the point Richard made - multiple pending signals need to be
handled. IOW, that should be a branch to ret_from_exception, not restore_all.


\
 
 \ /
  Last update: 2014-10-09 01:01    [W:0.263 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site