From: David Howells Date: Tue, 1 May 2012 20:31:42 +0000 (+0100) Subject: FRV: Optimise the system call exit path in entry.S [ver #2] X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a2eddc7c491c916ff9ba39b3563cd779e7b58320;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git FRV: Optimise the system call exit path in entry.S [ver #2] Optimise the system call exit path in entry.S by packing some instructions. Suggested-by: Al Viro Signed-off-by: David Howells Signed-off-by: Al Viro --- diff --git a/arch/frv/kernel/entry.S b/arch/frv/kernel/entry.S index 03da263e112a..7d5e000fd32e 100644 --- a/arch/frv/kernel/entry.S +++ b/arch/frv/kernel/entry.S @@ -905,18 +905,19 @@ __syscall_call: __syscall_exit: LEDS 0x6300 - sti gr8,@(gr28,#REG_GR(8)) ; save return value + # keep current PSR in GR23 + movsg psr,gr23 - # rebuild saved psr - execve will change it for init/main.c ldi @(gr28,#REG_PSR),gr22 + + sti.p gr8,@(gr28,#REG_GR(8)) ; save return value + + # rebuild saved psr - execve will change it for init/main.c srli gr22,#1,gr5 andi.p gr22,#~PSR_PS,gr22 andi gr5,#PSR_PS,gr5 or gr5,gr22,gr22 - ori gr22,#PSR_S,gr22 - - # keep current PSR in GR23 - movsg psr,gr23 + ori.p gr22,#PSR_S,gr22 # make sure we don't miss an interrupt setting need_resched or sigpending between # sampling and the RETT