diff options
| author | Bruce Evans <bde@FreeBSD.org> | 1999-02-28 10:53:29 +0000 |
|---|---|---|
| committer | Bruce Evans <bde@FreeBSD.org> | 1999-02-28 10:53:29 +0000 |
| commit | e7ba67f27485aafd7de82a338405f1930ba60c09 (patch) | |
| tree | f1e7da3dd15d7030487b9716c9646301244fc73e /sys/amd64 | |
| parent | 5419aa3ecf3adc54fb13111cd24ff94ab92fda95 (diff) | |
Notes
Diffstat (limited to 'sys/amd64')
| -rw-r--r-- | sys/amd64/amd64/exception.S | 20 | ||||
| -rw-r--r-- | sys/amd64/amd64/exception.s | 20 | ||||
| -rw-r--r-- | sys/amd64/amd64/genassym.c | 3 |
3 files changed, 15 insertions, 28 deletions
diff --git a/sys/amd64/amd64/exception.S b/sys/amd64/amd64/exception.S index 1b4663cd78c24..79e1d1a7d0ac1 100644 --- a/sys/amd64/amd64/exception.S +++ b/sys/amd64/amd64/exception.S @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: exception.s,v 1.55 1998/08/10 19:41:07 bde Exp $ + * $Id: exception.s,v 1.56 1999/02/25 11:03:08 bde Exp $ */ #include "npx.h" @@ -312,23 +312,17 @@ IDTVEC(int0x80_syscall) ENTRY(fork_trampoline) call _spl0 - movl _curproc,%eax - addl $P_SWITCHTIME,%eax - movl _switchtime,%ecx - testl %ecx,%ecx + +#ifdef SMP + cmpl $0,_switchtime jne 1f - /* XXX unreachable except in the SMP case? */ - pushl %eax + pushl $_switchtime call _microuptime - popl %eax + popl %edx movl _ticks,%eax movl %eax,_switchticks - jmp 2f 1: - movl %ecx,(%eax) - movl _switchtime+4,%edx - movl %edx,4(%eax) -2: +#endif /* * cpu_set_fork_handler intercepts this function call to diff --git a/sys/amd64/amd64/exception.s b/sys/amd64/amd64/exception.s index 1b4663cd78c24..79e1d1a7d0ac1 100644 --- a/sys/amd64/amd64/exception.s +++ b/sys/amd64/amd64/exception.s @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: exception.s,v 1.55 1998/08/10 19:41:07 bde Exp $ + * $Id: exception.s,v 1.56 1999/02/25 11:03:08 bde Exp $ */ #include "npx.h" @@ -312,23 +312,17 @@ IDTVEC(int0x80_syscall) ENTRY(fork_trampoline) call _spl0 - movl _curproc,%eax - addl $P_SWITCHTIME,%eax - movl _switchtime,%ecx - testl %ecx,%ecx + +#ifdef SMP + cmpl $0,_switchtime jne 1f - /* XXX unreachable except in the SMP case? */ - pushl %eax + pushl $_switchtime call _microuptime - popl %eax + popl %edx movl _ticks,%eax movl %eax,_switchticks - jmp 2f 1: - movl %ecx,(%eax) - movl _switchtime+4,%edx - movl %edx,4(%eax) -2: +#endif /* * cpu_set_fork_handler intercepts this function call to diff --git a/sys/amd64/amd64/genassym.c b/sys/amd64/amd64/genassym.c index 0da064fcf974c..25ea72f4800e7 100644 --- a/sys/amd64/amd64/genassym.c +++ b/sys/amd64/amd64/genassym.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)genassym.c 5.11 (Berkeley) 5/10/91 - * $Id: genassym.c,v 1.62 1998/10/08 21:03:41 msmith Exp $ + * $Id: genassym.c,v 1.63 1999/02/22 15:13:34 bde Exp $ */ #include "opt_vm86.h" @@ -92,7 +92,6 @@ main() printf("#define\tP_WCHAN %#x\n", OS(proc, p_wchan)); printf("#define\tP_FLAG %#x\n", OS(proc, p_flag)); printf("#define\tP_PID %#x\n", OS(proc, p_pid)); - printf("#define\tP_SWITCHTIME %#x\n", OS(proc, p_switchtime)); #ifdef SMP printf("#define\tP_ONCPU %#x\n", OS(proc, p_oncpu)); printf("#define\tP_LASTCPU %#x\n", OS(proc, p_lastcpu)); |
