diff options
author | cinap_lenrek <cinap_lenrek@gmx.de> | 2013-05-30 23:26:21 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@gmx.de> | 2013-05-30 23:26:21 +0200 |
commit | d94ffb4808670993b2c434d612d432548c693832 (patch) | |
tree | ded3f05af0c1c46b5c8a7e5bfae405fe76b34ad2 /sys/src/9/teg2 | |
parent | 9652f5bec54d946775892249c83059c9ca0c6440 (diff) |
kernel: do all fp state fork from procfork() (like pc kernel)
this simplifies the arm ports and keeps all the stuff in one place
instead of spreading it thru notify(), trap() and syscall() functions
and prevents useless fp state copying for kernel procs.
also make sure to save fp in notify while still splhi().
Diffstat (limited to 'sys/src/9/teg2')
-rw-r--r-- | sys/src/9/teg2/fns.h | 2 | ||||
-rw-r--r-- | sys/src/9/teg2/softfpu.c | 21 | ||||
-rw-r--r-- | sys/src/9/teg2/syscall.c | 4 | ||||
-rw-r--r-- | sys/src/9/teg2/vfp3.c | 27 |
4 files changed, 0 insertions, 54 deletions
diff --git a/sys/src/9/teg2/fns.h b/sys/src/9/teg2/fns.h index 1e2e55fe5..5e740176c 100644 --- a/sys/src/9/teg2/fns.h +++ b/sys/src/9/teg2/fns.h @@ -172,8 +172,6 @@ extern void fpunotify(Ureg*); extern void fpuprocrestore(Proc*); extern void fpuprocsave(Proc*); extern void fpusysprocsetup(Proc*); -extern void fpusysrfork(Ureg*); -extern void fpusysrforkchild(Proc*, Ureg*, Proc*); extern int fpuemu(Ureg*); /* diff --git a/sys/src/9/teg2/softfpu.c b/sys/src/9/teg2/softfpu.c index 752391f2c..0966bc18a 100644 --- a/sys/src/9/teg2/softfpu.c +++ b/sys/src/9/teg2/softfpu.c @@ -42,27 +42,6 @@ fpunoted(void) } void -fpusysrfork(Ureg*) -{ - /* - * Called early in the non-interruptible path of - * sysrfork() via the machine-dependent syscall() routine. - * Save the state so that it can be easily copied - * to the child process later. - */ -} - -void -fpusysrforkchild(Proc*, Ureg *, Proc*) -{ - /* - * Called later in sysrfork() via the machine-dependent - * sysrforkchild() routine. - * Copy the parent FPU state to the child. - */ -} - -void fpuprocsave(Proc*) { /* diff --git a/sys/src/9/teg2/syscall.c b/sys/src/9/teg2/syscall.c index adaa39962..4cf83093a 100644 --- a/sys/src/9/teg2/syscall.c +++ b/sys/src/9/teg2/syscall.c @@ -209,8 +209,6 @@ syscall(Ureg* ureg) scallnr = ureg->r0; up->scallnr = scallnr; - if(scallnr == RFORK) - fpusysrfork(ureg); spllo(); sp = ureg->sp; @@ -361,6 +359,4 @@ forkchild(Proc *p, Ureg *ureg) /* Things from bottom of syscall which were never executed */ p->psstate = 0; p->insyscall = 0; - - fpusysrforkchild(p, cureg, up); } diff --git a/sys/src/9/teg2/vfp3.c b/sys/src/9/teg2/vfp3.c index 16d45490e..6d14f34cf 100644 --- a/sys/src/9/teg2/vfp3.c +++ b/sys/src/9/teg2/vfp3.c @@ -239,33 +239,6 @@ fpunoted(void) up->fpstate &= ~FPillegal; } -/* - * Called early in the non-interruptible path of - * sysrfork() via the machine-dependent syscall() routine. - * Save the state so that it can be easily copied - * to the child process later. - */ -void -fpusysrfork(Ureg*) -{ - if(up->fpstate == FPactive){ - fpsave(&up->fpsave); - up->fpstate = FPinactive; - } -} - -/* - * Called later in sysrfork() via the machine-dependent - * sysrforkchild() routine. - * Copy the parent FPU state to the child. - */ -void -fpusysrforkchild(Proc *p, Ureg *, Proc *up) -{ - /* don't penalize the child, it hasn't done FP in a note handler. */ - p->fpstate = up->fpstate & ~FPillegal; -} - /* should only be called if p->fpstate == FPactive */ void fpsave(FPsave *fps) |