2.5.40 s390 (18/27): fpu registers.
PATCH 1/1 2.5.40 s390 (18/27): fpu registers.
Cleanup load/store of fpu register on s390.
arch/s390/kernel/Makefile +1 -1
@@ -8,7 +8,7 @@ export-objs := debug.o ebcdic.o s390_ext.o smp.o s390_ksyms.o obj-y := entry.o bitmap.o traps.o time.o process.o \ setup.o sys_s390.o ptrace.o signal.o cpcmd.o ebcdic.o \ - semaphore.o s390fpu.o reipl.o s390_ext.o debug.o + semaphore.o reipl.o s390_ext.o debug.o obj-$(CONFIG_MODULES) += s390_ksyms.o obj-$(CONFIG_SMP) += smp.o
arch/s390/kernel/process.c +19 -16
@@ -199,8 +199,13 @@/* fake return stack for resume(), don't go back to schedule */ frame->gprs[9 ] = (unsigned long ) frame; -/* save fprs, if used in last task */ -save_fp_regs (&p->thread.fp_regs); +/* +* save fprs to current->thread.fp_regs to merge them with +* the emulated registers and then copy the result to the child. +*/ +save_fp_regs (¤t->thread.fp_regs); +memcpy (&p->thread.fp_regs, ¤t->thread.fp_regs, +sizeof (s390_fp_regs)); p->thread.user_seg =__pa ((unsigned long ) p->mm->pgd) | _SEGMENT_TABLE;/* start process with ar4 pointing to the correct address space */ p->thread.ar4 =get_fs ().ar4;
@@ -262,20 +267,13 @@ error =PTR_ERR (filename);if (IS_ERR (filename)) goto out; - error =do_execve (filename, (char **) regs.gprs[3 ], (char **) regs.gprs[4 ], ®s); -if (error ==0 ) - { + error =do_execve (filename, (char **) regs.gprs[3 ], + (char **) regs.gprs[4 ], ®s); +if (error ==0 ) { current->ptrace &= ~PT_DTRACE ; - current->thread.fp_regs.fpc=0 ; -if (MACHINE_HAS_IEEE ) - { - __asm__ __volatile__ - ("sr 0,0\n\t" -"sfpc 0,0\n\t" - : - : - :"0" ); - } + current->thread.fp_regs.fpc =0 ; +if (MACHINE_HAS_IEEE ) + asmvolatile ("sfpc %0,%0" : :"d" (0 )); }putname (filename); out:
@@ -288,7 +286,12 @@*/ int dump_fpu (struct pt_regs * regs,s390_fp_regs *fpregs) { -save_fp_regs (fpregs); +/* +* save fprs to current->thread.fp_regs to merge them with +* the emulated registers and then copy the result to the dump. +*/ +save_fp_regs (¤t->thread.fp_regs); +memcpy (fpregs, ¤t->thread.fp_regs,sizeof (s390_fp_regs));return 1 ; }
arch/s390/kernel/s390fpu.c +0 -138
138 lines not on this page · raw message
arch/s390/kernel/signal.c +29 -26
79 lines not on this page · raw message
arch/s390x/kernel/Makefile +1 -1
@@ -10,7 +10,7 @@ obj-y := entry.o bitmap.o traps.o time.o process.o \ setup.o sys_s390.o ptrace.o signal.o cpcmd.o ebcdic.o \ - semaphore.o s390fpu.o reipl.o s390_ext.o debug.o + semaphore.o reipl.o s390_ext.o debug.o obj-$(CONFIG_MODULES) += s390_ksyms.o obj-$(CONFIG_SMP) += smp.o
arch/s390x/kernel/process.c +5 -8
@@ -257,15 +257,12 @@ error =PTR_ERR (filename);if (IS_ERR (filename)) goto out; - error =do_execve (filename, (char **) regs.gprs[3 ], (char **) regs.gprs[4 ], ®s); -if (error ==0 ) - { + error =do_execve (filename, (char **) regs.gprs[3 ], + (char **) regs.gprs[4 ], ®s); +if (error ==0 ) { current->ptrace &= ~PT_DTRACE ; - current->thread.fp_regs.fpc=0 ; - __asm__ __volatile__ - ("sr 0,0\n\t" -"sfpc 0,0\n\t" - : : :"0" ); + current->thread.fp_regs.fpc =0 ; + asmvolatile ("sfpc %0,%0" : :"d" (0 )); }putname (filename); out:
arch/s390x/kernel/s390fpu.c +0 -87
87 lines not on this page · raw message
arch/s390x/kernel/signal.c +23 -26
63 lines not on this page · raw message
arch/s390x/kernel/signal32.c +42 -45
104 lines not on this page · raw message
include/asm-s390/system.h +66 -19
111 lines not on this page · raw message
include/asm-s390x/system.h +56 -17
98 lines not on this page · raw message