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 Fix a couple of nits with savectx():



details:   https://anonhg.NetBSD.org/src/rev/94d6e7c4d16d
branches:  trunk
changeset: 368589:94d6e7c4d16d
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Wed Jul 20 18:25:10 2022 +0000

description:
Fix a couple of nits with savectx():
- Note that this function is only used by dumpsys().
- Don't safe the PS word; there isn't actually a spot for it in the PCB.
- Don't bother returning anything; savectx() is declared void.

diffstat:

 sys/arch/alpha/alpha/locore.s |  15 ++++-----------
 1 files changed, 4 insertions(+), 11 deletions(-)

diffs (45 lines):

diff -r 833cd7aeae77 -r 94d6e7c4d16d sys/arch/alpha/alpha/locore.s
--- a/sys/arch/alpha/alpha/locore.s     Wed Jul 20 17:03:10 2022 +0000
+++ b/sys/arch/alpha/alpha/locore.s     Wed Jul 20 18:25:10 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: locore.s,v 1.141 2021/07/22 15:48:40 thorpej Exp $ */
+/* $NetBSD: locore.s,v 1.142 2022/07/20 18:25:10 thorpej Exp $ */
 
 /*-
  * Copyright (c) 1999, 2000, 2019 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
 
 #include <machine/asm.h>
 
-__KERNEL_RCSID(0, "$NetBSD: locore.s,v 1.141 2021/07/22 15:48:40 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: locore.s,v 1.142 2022/07/20 18:25:10 thorpej Exp $");
 
 #include "assym.h"
 
@@ -651,13 +651,10 @@
  * sanely be used for curlwp iff cpu_switchto won't be called again, e.g.
  * if called from boot().)
  *
+ * N.B. this is actually only used by dumpsys().
+ *
  * Arguments:
  *     a0      'struct pcb *' of the process that needs its context saved
- *
- * Return:
- *     v0      0.  (note that for child processes, it seems
- *             like savectx() returns 1, because the return address
- *             in the PCB is set to the return address from savectx().)
  */
 
 LEAF(savectx, 1)
@@ -672,10 +669,6 @@
        stq     s5, PCB_CONTEXT+(5 * 8)(a0)
        stq     s6, PCB_CONTEXT+(6 * 8)(a0)
        stq     ra, PCB_CONTEXT+(7 * 8)(a0)     /* store ra */
-       call_pal PAL_OSF1_rdps                  /* NOTE: doesn't kill a0 */
-       stq     v0, PCB_CONTEXT+(8 * 8)(a0)     /* store ps, for ipl */
-
-       mov     zero, v0
        RET
        END(savectx)
 



Home | Main Index | Thread Index | Old Index