diff options
author | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2013-04-24 06:58:39 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2013-04-26 03:07:05 -0400 |
commit | 616498813b11ffefe1ed36b9f2e4fd2cdbd22f15 (patch) | |
tree | 1748b3171ab5cf1ada0c0bbeef285352c37edfcd /arch/s390/kernel/entry64.S | |
parent | dc7ee00d4771b3218b10e09e1071ee6eb176d381 (diff) |
s390: system call path micro optimization
Add a pointer to the system call table to the thread_info structure.
The TIF_31BIT bit is set or cleared by SET_PERSONALITY exactly once
for the lifetime of a process. With the pointer to the correct system
call table in thread_info the system call code in entry64.S path can
drop the check for TIF_31BIT which saves a couple of instructions.
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel/entry64.S')
-rw-r--r-- | arch/s390/kernel/entry64.S | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/arch/s390/kernel/entry64.S b/arch/s390/kernel/entry64.S index 72f230baf5d1..4c17eece707e 100644 --- a/arch/s390/kernel/entry64.S +++ b/arch/s390/kernel/entry64.S | |||
@@ -216,6 +216,7 @@ sysc_vtime: | |||
216 | mvc __PT_INT_CODE(4,%r11),__LC_SVC_ILC | 216 | mvc __PT_INT_CODE(4,%r11),__LC_SVC_ILC |
217 | sysc_do_svc: | 217 | sysc_do_svc: |
218 | oi __TI_flags+7(%r12),_TIF_SYSCALL | 218 | oi __TI_flags+7(%r12),_TIF_SYSCALL |
219 | lg %r10,__TI_sysc_table(%r12) # address of system call table | ||
219 | llgh %r8,__PT_INT_CODE+2(%r11) | 220 | llgh %r8,__PT_INT_CODE+2(%r11) |
220 | slag %r8,%r8,2 # shift and test for svc 0 | 221 | slag %r8,%r8,2 # shift and test for svc 0 |
221 | jnz sysc_nr_ok | 222 | jnz sysc_nr_ok |
@@ -226,13 +227,6 @@ sysc_do_svc: | |||
226 | sth %r1,__PT_INT_CODE+2(%r11) | 227 | sth %r1,__PT_INT_CODE+2(%r11) |
227 | slag %r8,%r1,2 | 228 | slag %r8,%r1,2 |
228 | sysc_nr_ok: | 229 | sysc_nr_ok: |
229 | larl %r10,sys_call_table # 64 bit system call table | ||
230 | #ifdef CONFIG_COMPAT | ||
231 | tm __TI_flags+5(%r12),(_TIF_31BIT>>16) | ||
232 | jno sysc_noemu | ||
233 | larl %r10,sys_call_table_emu # 31 bit system call table | ||
234 | sysc_noemu: | ||
235 | #endif | ||
236 | xc __SF_BACKCHAIN(8,%r15),__SF_BACKCHAIN(%r15) | 230 | xc __SF_BACKCHAIN(8,%r15),__SF_BACKCHAIN(%r15) |
237 | stg %r2,__PT_ORIG_GPR2(%r11) | 231 | stg %r2,__PT_ORIG_GPR2(%r11) |
238 | stg %r7,STACK_FRAME_OVERHEAD(%r15) | 232 | stg %r7,STACK_FRAME_OVERHEAD(%r15) |
@@ -1005,6 +999,7 @@ sys_call_table: | |||
1005 | #ifdef CONFIG_COMPAT | 999 | #ifdef CONFIG_COMPAT |
1006 | 1000 | ||
1007 | #define SYSCALL(esa,esame,emu) .long emu | 1001 | #define SYSCALL(esa,esame,emu) .long emu |
1002 | .globl sys_call_table_emu | ||
1008 | sys_call_table_emu: | 1003 | sys_call_table_emu: |
1009 | #include "syscalls.S" | 1004 | #include "syscalls.S" |
1010 | #undef SYSCALL | 1005 | #undef SYSCALL |