summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2009-03-31 08:49:19 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2009-03-31 08:49:19 +0000
commitcbec2d7db896cb69945c76003177cf61c46993b5 (patch)
tree0f736e6dc8f84671db0d9ec02ef1f4999d9d0b27 /sys/arch
parent9b8762ea1c5c78bbf72d0c3b709ccfcae7e6ca5f (diff)
- remove obsolete comment
- remove dead (#if 0) code - move switch_error panics to after cpu_switchto to make branch prediction happier and the code more readable. no functional change
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/amd64/amd64/locore.S57
1 files changed, 20 insertions, 37 deletions
diff --git a/sys/arch/amd64/amd64/locore.S b/sys/arch/amd64/amd64/locore.S
index 89d9800b590..352944238a3 100644
--- a/sys/arch/amd64/amd64/locore.S
+++ b/sys/arch/amd64/amd64/locore.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: locore.S,v 1.31 2009/02/15 17:06:30 mikeb Exp $ */
+/* $OpenBSD: locore.S,v 1.32 2009/03/31 08:49:18 art Exp $ */
/* $NetBSD: locore.S,v 1.13 2004/03/25 18:33:17 drochner Exp $ */
/*
@@ -715,35 +715,6 @@ ENTRY(longjmp)
/*****************************************************************************/
/*
- * The following primitives manipulate the run queues.
- * _whichqs tells which of the 32 queues _qs
- * have processes in them. Setrq puts processes into queues, Remrq
- * removes them from queues. The running process is on no queue,
- * other processes are on a queue related to p->p_pri, divided by 4
- * actually to shrink the 0-127 range of priorities into the 32 available
- * queues.
- */
- .globl _C_LABEL(uvmexp),_C_LABEL(panic)
-
-#ifdef DIAGNOSTIC
-NENTRY(switch_error1)
- movabsq $1f,%rdi
- call _C_LABEL(panic)
- /* NOTREACHED */
-1: .asciz "cpu_switch 1"
-NENTRY(switch_error2)
- movabsq $1f,%rdi
- call _C_LABEL(panic)
- /* NOTREACHED */
-1: .asciz "cpu_switch 2"
-NENTRY(switch_error3)
- movabsq $1f,%rdi
- call _C_LABEL(panic)
- /* NOTREACHED */
-1: .asciz "cpu_switch 3"
-#endif /* DIAGNOSTIC */
-
-/*
* int cpu_switchto(struct proc *old, struct proc *new)
* Switch from "old" proc to "new".
*/
@@ -852,13 +823,6 @@ switch_restored:
switch_return:
-#if 0
- /* Violation of lock ordering, since we're holding the sched_lock */
- movl $IPL_NONE,%edi
- call _C_LABEL(Xspllower)
- movl $IPL_HIGH,CPUVAR(ILEVEL)
-#endif
-
popq %r15
popq %r14
popq %r13
@@ -877,6 +841,25 @@ ENTRY(cpu_idle_cycle)
ENTRY(cpu_idle_leave)
ret
+ .globl _C_LABEL(panic)
+
+#ifdef DIAGNOSTIC
+NENTRY(switch_error1)
+ movabsq $1f,%rdi
+ call _C_LABEL(panic)
+ /* NOTREACHED */
+1: .asciz "cpu_switch 1"
+NENTRY(switch_error2)
+ movabsq $1f,%rdi
+ call _C_LABEL(panic)
+ /* NOTREACHED */
+1: .asciz "cpu_switch 2"
+NENTRY(switch_error3)
+ movabsq $1f,%rdi
+ call _C_LABEL(panic)
+ /* NOTREACHED */
+1: .asciz "cpu_switch 3"
+#endif /* DIAGNOSTIC */
/*
* savectx(struct pcb *pcb);