Commit dca778c5 authored by Russell King's avatar Russell King

ARM: avoid saving and restoring registers unnecessarily

Avoid repeatedly saving and restoring registers around the calls to
trace_hardirqs_on() and context_tracking_user_exit().  With the
previous changes, we no longer need to preserve "lr" across these
calls, and if we re-load r0-r3 later, we can avoid preserving these
regsiters too.
Signed-off-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
parent fcea4523
...@@ -157,8 +157,9 @@ ENTRY(vector_swi) ...@@ -157,8 +157,9 @@ ENTRY(vector_swi)
#endif #endif
zero_fp zero_fp
alignment_trap r10, ip, __cr_alignment alignment_trap r10, ip, __cr_alignment
enable_irq asm_trace_hardirqs_on save=0
ct_user_exit enable_irq_notrace
ct_user_exit save=0
/* /*
* Get the system call number. * Get the system call number.
...@@ -216,6 +217,11 @@ ENTRY(vector_swi) ...@@ -216,6 +217,11 @@ ENTRY(vector_swi)
eor scno, scno, #__NR_SYSCALL_BASE @ check OS number eor scno, scno, #__NR_SYSCALL_BASE @ check OS number
#endif #endif
get_thread_info tsk get_thread_info tsk
/*
* Reload the registers that may have been corrupted on entry to
* the syscall assembly (by tracing or context tracking.)
*/
TRACE( ldmia sp, {r0 - r3} )
local_restart: local_restart:
ldr r10, [tsk, #TI_FLAGS] @ check for syscall tracing ldr r10, [tsk, #TI_FLAGS] @ check for syscall tracing
......
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