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 Garbage-collect the SWITCH_CONTEXT macr...



details:   https://anonhg.NetBSD.org/src/rev/0b06cb8aaeb9
branches:  trunk
changeset: 938173:0b06cb8aaeb9
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Thu Sep 03 15:38:17 2020 +0000

description:
Garbage-collect the SWITCH_CONTEXT macro, since it now expands to
just "call_pal PAL_OSF1_swpctx".

diffstat:

 sys/arch/alpha/alpha/locore.s    |  20 ++++++--------------
 sys/arch/alpha/alpha/multiproc.s |   6 +++---
 2 files changed, 9 insertions(+), 17 deletions(-)

diffs (81 lines):

diff -r 1011374c962e -r 0b06cb8aaeb9 sys/arch/alpha/alpha/locore.s
--- a/sys/arch/alpha/alpha/locore.s     Thu Sep 03 14:27:47 2020 +0000
+++ b/sys/arch/alpha/alpha/locore.s     Thu Sep 03 15:38:17 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: locore.s,v 1.127 2020/09/03 04:18:30 thorpej Exp $ */
+/* $NetBSD: locore.s,v 1.128 2020/09/03 15:38:17 thorpej Exp $ */
 
 /*-
  * Copyright (c) 1999, 2000, 2019 The NetBSD Foundation, Inc.
@@ -67,21 +67,12 @@
 
 #include <machine/asm.h>
 
-__KERNEL_RCSID(0, "$NetBSD: locore.s,v 1.127 2020/09/03 04:18:30 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: locore.s,v 1.128 2020/09/03 15:38:17 thorpej Exp $");
 
 #include "assym.h"
 
 .stabs __FILE__,132,0,0,kernel_text
 
-/*
- * Perform actions necessary to switch to a new context.  The
- * hwpcb should be in a0.  Clobbers v0, t0, t8..t11, a0.
- */
-#define        SWITCH_CONTEXT                                                  \
-       /* Swap in the new context. */                                  \
-       call_pal PAL_OSF1_swpctx
-
-
        /* don't reorder instructions; paranoia. */
        .set noreorder
        .text
@@ -152,7 +143,7 @@
         */
        lda     a0, lwp0
        ldq     a0, L_MD_PCBPADDR(a0)           /* phys addr of PCB */
-       SWITCH_CONTEXT
+       call_pal PAL_OSF1_swpctx        /* clobbers a0, t0, t8-t11, a0 */
 
        /* PROM is no longer mapped. */
        lda     t0, prom_mapped
@@ -680,9 +671,10 @@
 
        mov     a0, s4                          /* save old curlwp */
        mov     a1, s2                          /* save new lwp */
-       ldq     a0, L_MD_PCBPADDR(s2)           /* save new pcbpaddr */
 
-       SWITCH_CONTEXT                          /* swap the context */
+       /* Switch to the new PCB. */
+       ldq     a0, L_MD_PCBPADDR(s2)
+       call_pal PAL_OSF1_swpctx        /* clobbers a0, t0, t8-t11, a0 */
 
        GET_CPUINFO
        stq     s2, CPU_INFO_CURLWP(v0)         /* curlwp = l */
diff -r 1011374c962e -r 0b06cb8aaeb9 sys/arch/alpha/alpha/multiproc.s
--- a/sys/arch/alpha/alpha/multiproc.s  Thu Sep 03 14:27:47 2020 +0000
+++ b/sys/arch/alpha/alpha/multiproc.s  Thu Sep 03 15:38:17 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: multiproc.s,v 1.13 2008/04/28 20:23:10 martin Exp $ */
+/* $NetBSD: multiproc.s,v 1.14 2020/09/03 15:38:17 thorpej Exp $ */
 
 /*-
  * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
-__KERNEL_RCSID(5, "$NetBSD: multiproc.s,v 1.13 2008/04/28 20:23:10 martin Exp $")
+__KERNEL_RCSID(5, "$NetBSD: multiproc.s,v 1.14 2020/09/03 15:38:17 thorpej Exp $")
 
 /*
  * Multiprocessor glue code.
@@ -67,7 +67,7 @@
        ldq     a0, CPU_INFO_IDLE_LWP(s0)
        stq     a0, CPU_INFO_CURLWP(s0) /* set curlwp */
        ldq     a0, L_MD_PCBPADDR(a0)
-       SWITCH_CONTEXT
+       call_pal PAL_OSF1_swpctx
 
        /* Invalidate TLB and I-stream. */
        ldiq    a0, -2                  /* TBIA */



Home | Main Index | Thread Index | Old Index