Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/alpha/alpha In cpu_switch(), load value *after* che...



details:   https://anonhg.NetBSD.org/src/rev/f711ee70c2d1
branches:  trunk
changeset: 495010:f711ee70c2d1
user:      nathanw <nathanw%NetBSD.org@localhost>
date:      Wed Jul 19 14:00:24 2000 +0000

description:
In cpu_switch(), load value *after* checking that the base register
is not NULL.

diffstat:

 sys/arch/alpha/alpha/locore.s |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (31 lines):

diff -r 644279eeca53 -r f711ee70c2d1 sys/arch/alpha/alpha/locore.s
--- a/sys/arch/alpha/alpha/locore.s     Wed Jul 19 13:44:24 2000 +0000
+++ b/sys/arch/alpha/alpha/locore.s     Wed Jul 19 14:00:24 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: locore.s,v 1.77 2000/06/05 21:47:13 thorpej Exp $ */
+/* $NetBSD: locore.s,v 1.78 2000/07/19 14:00:24 nathanw Exp $ */
 
 /*-
  * Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
@@ -76,7 +76,7 @@
 
 #include <machine/asm.h>
 
-__KERNEL_RCSID(0, "$NetBSD: locore.s,v 1.77 2000/06/05 21:47:13 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: locore.s,v 1.78 2000/07/19 14:00:24 nathanw Exp $");
 
 #include "assym.h"
 
@@ -844,11 +844,11 @@
        addq    t1, t0, t0                      /* t0 = qp = &qs[firstbit] */
 
        ldq     t4, PH_LINK(t0)                 /* t4 = p = highest pri proc */
-       ldq     t5, P_FORW(t4)                  /* t5 = p->p_forw */
        bne     t4, 4f                          /* make sure p != NULL */
        PANIC("cpu_switch",Lcpu_switch_pmsg)    /* nothing in queue! */
 
 4:
+       ldq     t5, P_FORW(t4)                  /* t5 = p->p_forw */
        stq     t5, PH_LINK(t0)                 /* qp->ph_link = p->p_forw */
        stq     t0, P_BACK(t5)                  /* p->p_forw->p_back = qp */
        stq     zero, P_BACK(t4)                /* firewall: p->p_back = NULL */



Home | Main Index | Thread Index | Old Index