Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/mips/mips handle pmap_procwr() on kernel procs (MIP...



details:   https://anonhg.NetBSD.org/src/rev/4179129690a3
branches:  trunk
changeset: 551814:4179129690a3
user:      chs <chs%NetBSD.org@localhost>
date:      Fri Sep 12 15:29:16 2003 +0000

description:
handle pmap_procwr() on kernel procs (MIPS1).
needed for new signal trampoline stuff.

diffstat:

 sys/arch/mips/mips/pmap.c |  16 +++++++++++-----
 1 files changed, 11 insertions(+), 5 deletions(-)

diffs (40 lines):

diff -r d66a6a0ae879 -r 4179129690a3 sys/arch/mips/mips/pmap.c
--- a/sys/arch/mips/mips/pmap.c Fri Sep 12 15:03:24 2003 +0000
+++ b/sys/arch/mips/mips/pmap.c Fri Sep 12 15:29:16 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap.c,v 1.149 2003/08/07 16:28:33 agc Exp $   */
+/*     $NetBSD: pmap.c,v 1.150 2003/09/12 15:29:16 chs Exp $   */
 
 /*-
  * Copyright (c) 1998, 2001 The NetBSD Foundation, Inc.
@@ -74,7 +74,7 @@
 
 #include <sys/cdefs.h>
 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.149 2003/08/07 16:28:33 agc Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.150 2003/09/12 15:29:16 chs Exp $");
 
 /*
  *     Manages physical address maps.
@@ -995,12 +995,18 @@
                pt_entry_t *pte;
                unsigned entry;
 
-               if (!(pte = pmap_segmap(pmap, va)))
-                       return;
-               pte += (va >> PGSHIFT) & (NPTEPG - 1);
+               if (pmap == pmap_kernel()) {
+                       pte = kvtopte(va);
+               } else {
+                       if (!(pte = pmap_segmap(pmap, va))) {
+                               return;
+                       }
+                       pte += (va >> PGSHIFT) & (NPTEPG - 1);
+               }
                entry = pte->pt_entry;
                if (!mips_pg_v(entry))
                        return;
+
                /*
                 * XXXJRT -- Wrong -- since page is physically-indexed, we
                 * XXXJRT need to loop.



Home | Main Index | Thread Index | Old Index