summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2001-12-30 09:34:51 +0000
committermarcel <marcel@FreeBSD.org>2001-12-30 09:34:51 +0000
commit7a0128afa01e2d5582630e594925f59d8990a24a (patch)
tree1792941ecd36e61366083358ef1e514330de63aa
parent3b3e08589b03552b648f4950664eb7822534a8fa (diff)
downloadFreeBSD-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.s25
-rw-r--r--sys/ia64/ia64/vm_machdep.c9
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.
*/
OpenPOWER on IntegriCloud