summaryrefslogtreecommitdiff
path: root/sys/src/9/ppc
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@gmx.de>2013-05-30 23:26:21 +0200
committercinap_lenrek <cinap_lenrek@gmx.de>2013-05-30 23:26:21 +0200
commitd94ffb4808670993b2c434d612d432548c693832 (patch)
treeded3f05af0c1c46b5c8a7e5bfae405fe76b34ad2 /sys/src/9/ppc
parent9652f5bec54d946775892249c83059c9ca0c6440 (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/ppc')
-rw-r--r--sys/src/9/ppc/trap.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/sys/src/9/ppc/trap.c b/sys/src/9/ppc/trap.c
index ab3e713a4..eaf1f2a52 100644
--- a/sys/src/9/ppc/trap.c
+++ b/sys/src/9/ppc/trap.c
@@ -633,10 +633,6 @@ syscall(Ureg* ureg)
scallnr = ureg->r3;
up->scallnr = ureg->r3;
- if(scallnr == RFORK && up->fpstate == FPactive){
- fpsave(&up->fpsave);
- up->fpstate = FPinactive;
- }
spllo();
sp = ureg->usp;
@@ -714,6 +710,12 @@ notify(Ureg* ur)
if(up->nnote == 0)
return 0;
+ if(up->fpstate == FPactive){
+ fpsave(&up->fpsave);
+ up->fpstate = FPinactive;
+ }
+ up->fpstate |= FPillegal;
+
s = spllo();
qlock(&up->debug);
up->notepending = 0;
@@ -743,12 +745,6 @@ notify(Ureg* ur)
pexit(n->msg, n->flag!=NDebug);
}
- if(up->fpstate == FPactive){
- fpsave(&up->fpsave);
- up->fpstate = FPinactive;
- }
- up->fpstate |= FPillegal;
-
sp = ur->usp & ~(BY2V-1);
sp -= sizeof(Ureg);