diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2002-01-24 20:31:09 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2002-01-24 20:31:09 +0000 |
commit | 701cab6ad134872a50a5d48a28e23beb916f649e (patch) | |
tree | 095743a230f9bf361f594ba9b84d818152192b3f | |
parent | 0574cc51eda4632ebdd7f4be5a402da7517cca71 (diff) |
Don't provide a duplicate addupc_task() routine.
-rw-r--r-- | sys/arch/amiga/amiga/locore.s | 41 | ||||
-rw-r--r-- | sys/arch/amiga/dev/clock.c | 6 |
2 files changed, 4 insertions, 43 deletions
diff --git a/sys/arch/amiga/amiga/locore.s b/sys/arch/amiga/amiga/locore.s index 6b1da1e1365..be6e86f56fe 100644 --- a/sys/arch/amiga/amiga/locore.s +++ b/sys/arch/amiga/amiga/locore.s @@ -1,4 +1,4 @@ -/* $OpenBSD: locore.s,v 1.35 2001/12/20 19:02:24 miod Exp $ */ +/* $OpenBSD: locore.s,v 1.36 2002/01/24 20:31:07 miod Exp $ */ /* $NetBSD: locore.s,v 1.89 1997/07/17 16:22:54 is Exp $ */ /* @@ -1108,45 +1108,6 @@ _proc_trampoline: */ #include <m68k/m68k/support.s> -/* - * update profiling information for the user - * addupc(pc, &u.u_prof, ticks) - */ -ENTRY(addupc) - movl a2,sp@- | scratch register - movl sp@(12),a2 | get &u.u_prof - movl sp@(8),d0 | get user pc - subl a2@(8),d0 | pc -= pr->pr_off - jlt Lauexit | less than 0, skip it - movl a2@(12),d1 | get pr->pr_scale - lsrl #1,d0 | pc /= 2 - lsrl #1,d1 | scale /= 2 - mulul d1,d0 | pc /= scale - moveq #14,d1 - lsrl d1,d0 | pc >>= 14 - bclr #0,d0 | pc &= ~1 - cmpl a2@(4),d0 | too big for buffer? - jge Lauexit | yes, screw it - addl a2@,d0 | no, add base - movl d0,sp@- | push address - jbsr _fusword | grab old value - movl sp@+,a0 | grab address back - cmpl #-1,d0 | access ok - jeq Lauerror | no, skip out - addw sp@(18),d0 | add tick to current value - movl d0,sp@- | push value - movl a0,sp@- | push address - jbsr _susword | write back new value - addql #8,sp | pop params - tstl d0 | fault? - jeq Lauexit | no, all done -Lauerror: - clrl a2@(12) | clear scale (turn off prof) -Lauexit: - movl sp@+,a2 | restore scratch reg - rts - - .globl _whichqs,_qs,_panic .globl _curproc .comm _want_resched,4 diff --git a/sys/arch/amiga/dev/clock.c b/sys/arch/amiga/dev/clock.c index a9665e25289..a31a6a786c9 100644 --- a/sys/arch/amiga/dev/clock.c +++ b/sys/arch/amiga/dev/clock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: clock.c,v 1.13 2001/12/19 08:58:05 art Exp $ */ +/* $OpenBSD: clock.c,v 1.14 2002/01/24 20:31:08 miod Exp $ */ /* $NetBSD: clock.c,v 1.25 1997/01/02 20:59:42 is Exp $ */ /* @@ -559,7 +559,7 @@ stopclock() * The advantage of this is that the profiling timer can be turned up to * a higher interrupt rate, giving finer resolution timing. The profclock * routine is called from the lev6intr in locore, and is a specialized - * routine that calls addupc. The overhead then is far less than if + * routine that calls addupc_task. The overhead then is far less than if * hardclock/softclock was called. Further, the context switch code in * locore has been changed to turn the profile clock on/off when switching * into/out of a process that is profiling (startprofclock/stopprofclock). @@ -658,7 +658,7 @@ profclock(pc, ps) */ if (USERMODE(ps)) { if (p->p_stats.p_prof.pr_scale) - addupc(pc, &curproc->p_stats.p_prof, 1); + addupc_task(&curproc, pc, 1); } /* * Came from kernel (supervisor) mode. |