From badb73a5ba04e72c75c30432cbf3205dfb4e7da2 Mon Sep 17 00:00:00 2001 From: Marcel Moolenaar Date: Sun, 30 Dec 2001 09:34:51 +0000 Subject: [PATCH] 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(). --- sys/ia64/ia64/swtch.s | 25 ++++++++++++++++++++++++- 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 fcbe7860918..24b305c5908 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 cd21b2a2fc7..6505507687a 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. */