Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/sparc64/sparc64 fix a KASSERT() in the previous. a...



details:   https://anonhg.NetBSD.org/src/rev/fa6fdbbf3732
branches:  trunk
changeset: 753479:fa6fdbbf3732
user:      mrg <mrg%NetBSD.org@localhost>
date:      Tue Mar 30 01:50:03 2010 +0000

description:
fix a KASSERT() in the previous.  add a couple of comments.

diffstat:

 sys/arch/sparc64/sparc64/pmap.c |  13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diffs (52 lines):

diff -r 7e32778079af -r fa6fdbbf3732 sys/arch/sparc64/sparc64/pmap.c
--- a/sys/arch/sparc64/sparc64/pmap.c   Tue Mar 30 01:40:29 2010 +0000
+++ b/sys/arch/sparc64/sparc64/pmap.c   Tue Mar 30 01:50:03 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap.c,v 1.262 2010/03/28 05:24:00 mrg Exp $   */
+/*     $NetBSD: pmap.c,v 1.263 2010/03/30 01:50:03 mrg Exp $   */
 /*
  *
  * Copyright (C) 1996-1999 Eduardo Horvath.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.262 2010/03/28 05:24:00 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.263 2010/03/30 01:50:03 mrg Exp $");
 
 #undef NO_VCACHE /* Don't forget the locked TLB in dostart */
 #define        HWREF
@@ -484,12 +484,11 @@
 
 static void pmap_alloc_bootargs(void)
 {
-/*     extern struct cpu_bootargs *cpu_args; */
        char *v;
 
        v = OF_claim(NULL, 2*PAGE_SIZE, PAGE_SIZE);
        if ((v == NULL) || (v == (void*)-1))
-               panic("Can't claim a page of memory.");
+               panic("Can't claim two pages of memory.");
 
        memset(v, 0, 2*PAGE_SIZE);
 
@@ -3145,7 +3144,7 @@
        int oldctx;
        int cpunum;
 
-       KASSERT(mutex_owned(&curcpu()->ci_ctx_lock));
+       KASSERT(mutex_owned(&ci->ci_ctx_lock));
 
 #ifdef MULTIPROCESSOR
        cpunum = ci->ci_index;
@@ -3381,7 +3380,9 @@
        }
 }
 
-
+/*
+ * Some routines to allocate and free PTPs.
+ */
 static int
 pmap_get_page(paddr_t *p)
 {



Home | Main Index | Thread Index | Old Index