Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/sparc/sparc in pmap_writetext(), restore the contex...



details:   https://anonhg.NetBSD.org/src/rev/2a6a52836815
branches:  trunk
changeset: 958606:2a6a52836815
user:      chs <chs%NetBSD.org@localhost>
date:      Wed Jan 13 16:42:17 2021 +0000

description:
in pmap_writetext(), restore the context also when we return early.

diffstat:

 sys/arch/sparc/sparc/pmap.c |  12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diffs (47 lines):

diff -r 3898b1385084 -r 2a6a52836815 sys/arch/sparc/sparc/pmap.c
--- a/sys/arch/sparc/sparc/pmap.c       Wed Jan 13 15:51:49 2021 +0000
+++ b/sys/arch/sparc/sparc/pmap.c       Wed Jan 13 16:42:17 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap.c,v 1.370 2021/01/11 06:12:43 chs Exp $ */
+/*     $NetBSD: pmap.c,v 1.371 2021/01/13 16:42:17 chs Exp $ */
 
 /*
  * Copyright (c) 1996
@@ -56,7 +56,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.370 2021/01/11 06:12:43 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.371 2021/01/13 16:42:17 chs Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -7868,8 +7868,7 @@
        if (CPU_HAS_SRMMU) {
                pte0 = getpte4m(va);
                if ((pte0 & SRMMU_TETYPE) != SRMMU_TEPTE) {
-                       splx(s);
-                       return;
+                       goto out;
                }
                pte = pte0 | PPROT_WRITE;
                setpte4m(va, pte);
@@ -7882,8 +7881,7 @@
        if (CPU_ISSUN4C || CPU_ISSUN4) {
                pte0 = getpte4(va);
                if ((pte0 & PG_V) == 0) {
-                       splx(s);
-                       return;
+                       goto out;
                }
                pte = pte0 | PG_W;
                setpte4(va, pte);
@@ -7892,6 +7890,8 @@
        }
 #endif
        cache_flush(dst, 1);
+
+out:
        setcontext(ctx);
        splx(s);
 }



Home | Main Index | Thread Index | Old Index