in the MI code.
-/* $OpenBSD: locore.s,v 1.33 2008/06/26 05:42:08 ray Exp $ */
+/* $OpenBSD: locore.s,v 1.34 2008/07/28 19:08:43 miod Exp $ */
/* $NetBSD: locore.s,v 1.94 2001/04/26 03:10:44 ross Exp $ */
/*-
stq v0, P_CPU(s2) /* p->p_cpu = curcpu() */
#endif
stq s2, CPU_INFO_CURPROC(v0) /* curproc = p */
- stq zero, CPU_INFO_WANT_RESCHED(v0) /* we've rescheduled */
/*
* Now running on the new u struct.
-/* $OpenBSD: locore.S,v 1.26 2008/06/27 06:03:07 ray Exp $ */
+/* $OpenBSD: locore.S,v 1.27 2008/07/28 19:08:46 miod Exp $ */
/* $NetBSD: locore.S,v 1.13 2004/03/25 18:33:17 drochner Exp $ */
/*
movq %rdi, %r13
movq %rsi, %r12
- xorq %rax,%rax
- movl %eax,CPUVAR(RESCHED)
-
switch_resume:
#ifdef DIAGNOSTIC
+ xorq %rax,%rax
cmpq %rax,P_WCHAN(%r12)
jne _C_LABEL(switch_error2)
cmpb $SRUN,P_STAT(%r12)
-/* $OpenBSD: cpuswitch.S,v 1.9 2007/10/13 12:46:17 miod Exp $ */
+/* $OpenBSD: cpuswitch.S,v 1.10 2008/07/28 19:08:46 miod Exp $ */
/* $NetBSD: cpuswitch.S,v 1.41 2003/11/15 08:44:18 scw Exp $ */
/*
.Lcurproc:
.word _C_LABEL(cpu_info_store) + CI_CURPROC
-.Lwant_resched:
- .word _C_LABEL(want_resched)
-
.Lcpufuncs:
.word _C_LABEL(cpufuncs)
ENTRY(cpu_switchto)
stmfd sp!, {r4-r7, lr}
- /* Clear the want_resched flag */
- ldr r7, .Lwant_resched
- mov r2, #0x00000000
- str r2, [r7]
-
#ifdef MULTIPROCESSOR
/* XXX use curcpu() */
ldr r2, .Lcpu_info_store
-/* $OpenBSD: locore.S,v 1.157 2008/05/21 19:42:05 miod Exp $ */
+/* $OpenBSD: locore.S,v 1.158 2008/07/28 19:08:46 miod Exp $ */
/*
* Copyright (c) 1998-2004 Michael Shalayeff
.import esym, data
.import curproc, data
.import cpu_info_primary, data
- .import want_resched, data
.import virtual_avail, data
.import proc0, data
.import proc0paddr, data
nop
kstack_ok
#endif
- ldil L%want_resched, t4
- stw r0, R%want_resched(t4)
/* Record new proc. */
ldi SONPROC, t1
-/* $OpenBSD: locore.S,v 1.8 2008/05/21 19:42:07 miod Exp $ */
+/* $OpenBSD: locore.S,v 1.9 2008/07/28 19:08:46 miod Exp $ */
/*
* Copyright (c) 2005 Michael Shalayeff
.import boothowto, data
.import bootdev, data
.import esym, data
- .import want_resched, data
.import proc0, data
.import proc0paddr, data
nop
kstack_ok
#endif
- ldil L%want_resched, %r1
- stw %r0, R%want_resched(%r1)
/* Record new proc. */
ldi SONPROC, %r1
-/* $OpenBSD: locore.s,v 1.123 2008/06/09 20:43:43 miod Exp $ */
+/* $OpenBSD: locore.s,v 1.124 2008/07/28 19:08:46 miod Exp $ */
/* $NetBSD: locore.s,v 1.145 1996/05/03 19:41:19 christos Exp $ */
/*-
movl 16(%esp), %esi
movl 20(%esp), %edi
- xorl %eax, %eax
-
- movl %eax, CPUVAR(RESCHED)
-
#ifdef DIAGNOSTIC
+ xorl %eax, %eax
cmpl %eax,P_WCHAN(%edi) # Waiting for something?
jne _C_LABEL(switch_error1) # Yes; shouldn't be queued.
cmpb $SRUN,P_STAT(%edi) # In run state?
-/* $OpenBSD: locore.S,v 1.40 2008/06/10 18:38:59 drahn Exp $ */
+/* $OpenBSD: locore.S,v 1.41 2008/07/28 19:08:46 miod Exp $ */
/* $NetBSD: locore.S,v 1.2 1996/10/16 19:33:09 ws Exp $ */
/*
* r5 - cpuinfo
*/
GET_CPUINFO(%r5)
- li %r31,0
- /* just did this resched thing, clear resched */
- stw %r31,CI_WANT_RESCHED(%r5)
li %r31,SONPROC
stb %r31,P_STAT(%r4)
-/* $OpenBSD: context.S,v 1.19 2008/02/16 18:43:27 miod Exp $ */
+/* $OpenBSD: context.S,v 1.20 2008/07/28 19:08:46 miod Exp $ */
/*
* Copyright (c) 2002-2003 Opsycon AB (www.opsycon.se / www.opsycon.com)
* Switch to new context
*/
move s0, a1 # save p
- sw zero, want_resched
jal pmap_activate
move a0, s0
-/* $OpenBSD: locore.S,v 1.12 2005/11/24 12:08:16 pedro Exp $ */
+/* $OpenBSD: locore.S,v 1.13 2008/07/28 19:08:46 miod Exp $ */
/* $NetBSD: locore.S,v 1.2 1996/10/16 19:33:09 ws Exp $ */
/*
stw %r9,_C_LABEL(whichqs)@l(%r8) /* mark it empty */
1:
- /* just did this resched thing, clear resched */
- li %r3,0
- lis %r4,_C_LABEL(want_resched)@ha
- stw %r3,_C_LABEL(want_resched)@l(%r4)
-
stw %r3,P_BACK(%r31) /* probably superfluous */
lis %r4,_C_LABEL(curproc)@ha
-/* $OpenBSD: locore.S,v 1.5 2008/05/14 22:23:48 kettenis Exp $ */
+/* $OpenBSD: locore.S,v 1.6 2008/07/28 19:08:46 miod Exp $ */
/* $NetBSD: locore.S,v 1.2 1996/10/16 19:33:09 ws Exp $ */
/*
* r5 - cpuinfo
*/
GET_CPUINFO(%r5)
- li %r31,0
- /* just did this resched thing, clear resched */
- stw %r31,CI_WANT_RESCHED(%r5)
li %r31,SONPROC
stb %r31,P_STAT(%r4)
-/* $OpenBSD: locore.s,v 1.11 2008/07/14 13:13:18 art Exp $ */
+/* $OpenBSD: locore.s,v 1.12 2008/07/28 19:08:46 miod Exp $ */
/* OpenBSD: locore.s,v 1.64 2005/04/17 18:47:50 miod Exp */
/*
mov SONPROC, %o0 ! p->p_stat = SONPROC
stb %o0, [%g3 + P_STAT]
- sethi %hi(_C_LABEL(want_resched)), %o0
- st %g0, [%o0 + %lo(_C_LABEL(want_resched))] ! want_resched = 0;
ld [%g3 + P_ADDR], %g5 ! newpcb = p->p_addr;
ld [%g5 + PCB_PSR], %g2 ! newpsr = newpcb->pcb_psr;
st %g3, [%g7 + %lo(_C_LABEL(curproc))] ! curproc = p;
-/* $OpenBSD: locore.s,v 1.80 2008/07/16 16:40:05 miod Exp $ */
+/* $OpenBSD: locore.s,v 1.81 2008/07/28 19:08:46 miod Exp $ */
/* $NetBSD: locore.s,v 1.73 1997/09/13 20:36:48 pk Exp $ */
/*
mov SONPROC, %o0 ! p->p_stat = SONPROC
stb %o0, [%g3 + P_STAT]
- sethi %hi(_C_LABEL(want_resched)), %o0
- st %g0, [%o0 + %lo(_C_LABEL(want_resched))] ! want_resched = 0;
ld [%g3 + P_ADDR], %g5 ! newpcb = p->p_addr;
ld [%g5 + PCB_PSR], %g2 ! newpsr = newpcb->pcb_psr;
st %g3, [%g7 + %lo(_C_LABEL(curproc))] ! curproc = p;
-/* $OpenBSD: locore.s,v 1.148 2008/07/25 14:53:38 kettenis Exp $ */
+/* $OpenBSD: locore.s,v 1.149 2008/07/28 19:08:46 miod Exp $ */
/* $NetBSD: locore.s,v 1.137 2001/08/13 06:10:10 jdolecek Exp $ */
/*
#endif /* defined(MULTIPROCESSOR) */
mov SONPROC, %o0 ! newproc->p_stat = SONPROC
stb %o0, [%i1 + P_STAT]
- st %g0, [%g7 + CI_WANT_RESCHED] ! want_resched = 0;
ldx [%i1 + P_ADDR], %l1 ! newpcb = newpeoc->p_addr;
flushw ! save all register windows except this one