• Paul Mackerras's avatar
    [PATCH] ppc64: Optimize exception/syscall entry/exit · 1ab196f3
    Paul Mackerras authored
    This rewrites the PPC64 exception entry/exit routines to make them
    smaller and faster.
    
    In particular we no longer save all of the registers for the common
    exceptions - system calls, hardware interrupts and decrementer (timer)
    interrupts - only the volatile registers.  The other registers are saved
    and restored (if used) by the C functions we call.  This involved
    changing the registers we use in early exception processing from r20-r23
    to r9-r12, which ended up changing quite a lot of code in head.S. 
    Overall this gives us about a 20% reduction in null syscall time. 
    
    Some system calls need all the registers (e.g.  fork/clone/vfork and
    [rt_]sigsuspend).  For these the syscall dispatch code calls a stub that
    saves the nonvolatile registers before calling the real handler.
    
    This also implements the force_successful_syscall_return() thing for
    ppc64.
    Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    1ab196f3
head.S 56.6 KB