diff options
author | marcel <marcel@FreeBSD.org> | 2001-12-30 09:34:51 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 2001-12-30 09:34:51 +0000 |
commit | 7a0128afa01e2d5582630e594925f59d8990a24a (patch) | |
tree | 1792941ecd36e61366083358ef1e514330de63aa | |
parent | 3b3e08589b03552b648f4950664eb7822534a8fa (diff) | |
download | FreeBSD-src-7a0128afa01e2d5582630e594925f59d8990a24a.zip FreeBSD-src-7a0128afa01e2d5582630e594925f59d8990a24a.tar.gz |
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().
-rw-r--r-- | sys/ia64/ia64/swtch.s | 25 | ||||
-rw-r--r-- | sys/ia64/ia64/vm_machdep.c | 9 |
2 files changed, 24 insertions, 10 deletions
diff --git a/sys/ia64/ia64/swtch.s b/sys/ia64/ia64/swtch.s index fcbe786..24b305c 100644 --- a/sys/ia64/ia64/swtch.s +++ b/sys/ia64/ia64/swtch.s @@ -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 ;; diff --git a/sys/ia64/ia64/vm_machdep.c b/sys/ia64/ia64/vm_machdep.c index cd21b2a2..6505507 100644 --- a/sys/ia64/ia64/vm_machdep.c +++ b/sys/ia64/ia64/vm_machdep.c @@ -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. */ |