aboutsummaryrefslogtreecommitdiffstats
path: root/arch/frv
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2012-05-01 16:31:42 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2012-06-01 12:59:38 -0400
commita2eddc7c491c916ff9ba39b3563cd779e7b58320 (patch)
tree773f6313bcbe9682a70c28c943d0a5b417f687b1 /arch/frv
parent1e5ef91556d0985e765252754ca90595deafb793 (diff)
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 <viro@zeniv.linux.org.uk> Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/frv')
-rw-r--r--arch/frv/kernel/entry.S13
1 files changed, 7 insertions, 6 deletions
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:
905__syscall_exit: 905__syscall_exit:
906 LEDS 0x6300 906 LEDS 0x6300
907 907
908 sti gr8,@(gr28,#REG_GR(8)) ; save return value 908 # keep current PSR in GR23
909 movsg psr,gr23
909 910
910 # rebuild saved psr - execve will change it for init/main.c
911 ldi @(gr28,#REG_PSR),gr22 911 ldi @(gr28,#REG_PSR),gr22
912
913 sti.p gr8,@(gr28,#REG_GR(8)) ; save return value
914
915 # rebuild saved psr - execve will change it for init/main.c
912 srli gr22,#1,gr5 916 srli gr22,#1,gr5
913 andi.p gr22,#~PSR_PS,gr22 917 andi.p gr22,#~PSR_PS,gr22
914 andi gr5,#PSR_PS,gr5 918 andi gr5,#PSR_PS,gr5
915 or gr5,gr22,gr22 919 or gr5,gr22,gr22
916 ori gr22,#PSR_S,gr22 920 ori.p gr22,#PSR_S,gr22
917
918 # keep current PSR in GR23
919 movsg psr,gr23
920 921
921 # make sure we don't miss an interrupt setting need_resched or sigpending between 922 # make sure we don't miss an interrupt setting need_resched or sigpending between
922 # sampling and the RETT 923 # sampling and the RETT