o Remove temporary implementation of cpu_throw in vm_machdep.c

and instead make it an alternate entry-point of cpu_switch()
   in swtch.s
o  Add SMP support to cpu_switch().
This commit is contained in:
marcel 2001-12-30 09:34:51 +00:00
parent 3b3e08589b
commit 7a0128afa0
2 changed files with 24 additions and 10 deletions

View File

@ -209,12 +209,35 @@ ENTRY(cpu_switch, 0)
mov ar.rsc=3 // turn RSE back on
XENTRY(cpu_throw)
#ifdef SMP
add r17 = PC_CPUID, r13
movl r16 = smp_active
;;
ld4 r16 = [r16]
ld4 r17 = [r17]
;;
cmp.ne p1, p0 = 0, r16
(p1) br.dptk 1f
;;
cmp.eq p1, p0 = 0, r17
(p1) br.dptk 1f
;;
add r16 = PC_IDLETHREAD, r13
;;
ld8 ret0 = [r16]
br.sptk 2f
1:
#endif
br.call.sptk.few rp=choosethread
2:
add r14=PC_CURTHREAD,r13 ;;
ld8 r15=[r14] ;;
#if 0
ld8 r15 = [r14]
;;
cmp.ne p6,p0=r15,ret0 // chooseproc() == curthread ?
(p6) br.dptk.few 1f
;;

View File

@ -301,15 +301,6 @@ cpu_wait(p)
{
}
/* Temporary helper */
void
cpu_throw(void)
{
cpu_switch();
panic("cpu_throw() didn't");
}
/*
* Dump the machine specific header information at the start of a core dump.
*/