diff options
author | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2007-07-10 05:24:18 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2007-07-10 05:24:51 -0400 |
commit | 987ad70a4d90cf0e70dba43ece02c2e2219e092c (patch) | |
tree | 5597a511a31647acd7a11160d9db60a53f388d80 /arch/s390 | |
parent | 3d62149f025134cd69c2fef2a2ccfac3c3c2054f (diff) |
[S390] system call optimization.
After the in-kernel system call has been remove the system call path
can be optimized. The problem state bit of the old psw is always set
between system_call and sysc_do_svc. SAVE_ALL_SVC uses this information
to avoid two instructions.
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390')
-rw-r--r-- | arch/s390/kernel/entry.S | 7 | ||||
-rw-r--r-- | arch/s390/kernel/entry64.S | 7 |
2 files changed, 12 insertions, 2 deletions
diff --git a/arch/s390/kernel/entry.S b/arch/s390/kernel/entry.S index 6234c6978a1f..bc7ff3658c3d 100644 --- a/arch/s390/kernel/entry.S +++ b/arch/s390/kernel/entry.S | |||
@@ -107,6 +107,11 @@ STACK_SIZE = 1 << STACK_SHIFT | |||
107 | l %r13,__LC_SVC_NEW_PSW+4 # load &system_call to %r13 | 107 | l %r13,__LC_SVC_NEW_PSW+4 # load &system_call to %r13 |
108 | .endm | 108 | .endm |
109 | 109 | ||
110 | .macro SAVE_ALL_SVC psworg,savearea | ||
111 | la %r12,\psworg | ||
112 | l %r15,__LC_KERNEL_STACK # problem state -> load ksp | ||
113 | .endm | ||
114 | |||
110 | .macro SAVE_ALL_SYNC psworg,savearea | 115 | .macro SAVE_ALL_SYNC psworg,savearea |
111 | la %r12,\psworg | 116 | la %r12,\psworg |
112 | tm \psworg+1,0x01 # test problem state bit | 117 | tm \psworg+1,0x01 # test problem state bit |
@@ -218,7 +223,7 @@ system_call: | |||
218 | STORE_TIMER __LC_SYNC_ENTER_TIMER | 223 | STORE_TIMER __LC_SYNC_ENTER_TIMER |
219 | sysc_saveall: | 224 | sysc_saveall: |
220 | SAVE_ALL_BASE __LC_SAVE_AREA | 225 | SAVE_ALL_BASE __LC_SAVE_AREA |
221 | SAVE_ALL_SYNC __LC_SVC_OLD_PSW,__LC_SAVE_AREA | 226 | SAVE_ALL_SVC __LC_SVC_OLD_PSW,__LC_SAVE_AREA |
222 | CREATE_STACK_FRAME __LC_SVC_OLD_PSW,__LC_SAVE_AREA | 227 | CREATE_STACK_FRAME __LC_SVC_OLD_PSW,__LC_SAVE_AREA |
223 | lh %r7,0x8a # get svc number from lowcore | 228 | lh %r7,0x8a # get svc number from lowcore |
224 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING | 229 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING |
diff --git a/arch/s390/kernel/entry64.S b/arch/s390/kernel/entry64.S index 685f11faa4bc..2a7b1304418b 100644 --- a/arch/s390/kernel/entry64.S +++ b/arch/s390/kernel/entry64.S | |||
@@ -99,6 +99,11 @@ _TIF_WORK_INT = (_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK | _TIF_NEED_RESCHED | \ | |||
99 | larl %r13,system_call | 99 | larl %r13,system_call |
100 | .endm | 100 | .endm |
101 | 101 | ||
102 | .macro SAVE_ALL_SVC psworg,savearea | ||
103 | la %r12,\psworg | ||
104 | lg %r15,__LC_KERNEL_STACK # problem state -> load ksp | ||
105 | .endm | ||
106 | |||
102 | .macro SAVE_ALL_SYNC psworg,savearea | 107 | .macro SAVE_ALL_SYNC psworg,savearea |
103 | la %r12,\psworg | 108 | la %r12,\psworg |
104 | tm \psworg+1,0x01 # test problem state bit | 109 | tm \psworg+1,0x01 # test problem state bit |
@@ -207,7 +212,7 @@ system_call: | |||
207 | STORE_TIMER __LC_SYNC_ENTER_TIMER | 212 | STORE_TIMER __LC_SYNC_ENTER_TIMER |
208 | sysc_saveall: | 213 | sysc_saveall: |
209 | SAVE_ALL_BASE __LC_SAVE_AREA | 214 | SAVE_ALL_BASE __LC_SAVE_AREA |
210 | SAVE_ALL_SYNC __LC_SVC_OLD_PSW,__LC_SAVE_AREA | 215 | SAVE_ALL_SVC __LC_SVC_OLD_PSW,__LC_SAVE_AREA |
211 | CREATE_STACK_FRAME __LC_SVC_OLD_PSW,__LC_SAVE_AREA | 216 | CREATE_STACK_FRAME __LC_SVC_OLD_PSW,__LC_SAVE_AREA |
212 | llgh %r7,__LC_SVC_INT_CODE # get svc number from lowcore | 217 | llgh %r7,__LC_SVC_INT_CODE # get svc number from lowcore |
213 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING | 218 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING |