Module Name: src Committed By: mrg Date: Tue Mar 30 01:50:03 UTC 2010
Modified Files: src/sys/arch/sparc64/sparc64: pmap.c Log Message: fix a KASSERT() in the previous. add a couple of comments. To generate a diff of this commit: cvs rdiff -u -r1.262 -r1.263 src/sys/arch/sparc64/sparc64/pmap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/sparc64/sparc64/pmap.c diff -u src/sys/arch/sparc64/sparc64/pmap.c:1.262 src/sys/arch/sparc64/sparc64/pmap.c:1.263 --- src/sys/arch/sparc64/sparc64/pmap.c:1.262 Sun Mar 28 05:24:00 2010 +++ src/sys/arch/sparc64/sparc64/pmap.c Tue Mar 30 01:50:03 2010 @@ -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) {