Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/usermode/usermode Cleanup pmap_extract(); no functi...
details: https://anonhg.NetBSD.org/src/rev/3c628da178aa
branches: trunk
changeset: 769599:3c628da178aa
user: reinoud <reinoud%NetBSD.org@localhost>
date: Thu Sep 15 15:20:17 2011 +0000
description:
Cleanup pmap_extract(); no functional change
diffstat:
sys/arch/usermode/usermode/pmap.c | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diffs (48 lines):
diff -r cea6ba27e41c -r 3c628da178aa sys/arch/usermode/usermode/pmap.c
--- a/sys/arch/usermode/usermode/pmap.c Thu Sep 15 15:08:51 2011 +0000
+++ b/sys/arch/usermode/usermode/pmap.c Thu Sep 15 15:20:17 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.67 2011/09/15 15:08:51 reinoud Exp $ */
+/* $NetBSD: pmap.c,v 1.68 2011/09/15 15:20:17 reinoud Exp $ */
/*-
* Copyright (c) 2011 Reinoud Zandijk <reinoud%NetBSD.org@localhost>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.67 2011/09/15 15:08:51 reinoud Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.68 2011/09/15 15:20:17 reinoud Exp $");
#include "opt_memsize.h"
#include "opt_kmempages.h"
@@ -911,23 +911,23 @@
}
bool
-pmap_extract(pmap_t pmap, vaddr_t va, paddr_t *pap)
+pmap_extract(pmap_t pmap, vaddr_t va, paddr_t *ppa)
{
struct pv_entry *pv;
+ intptr_t lpn;
- /* TODO protect against roque values */
dprintf_debug("pmap_extract: extracting va %p\n", (void *) va);
#ifdef DIAGNOSTIC
if ((va < VM_MIN_ADDRESS) || (va > VM_MAX_ADDRESS))
panic("pmap_extract: invalid va isued\n");
#endif
- pv = pmap->pm_entries[atop(va - VM_MIN_ADDRESS)]; /* V->L */
+ lpn = atop(va - VM_MIN_ADDRESS); /* V->L */
+ pv = pmap->pm_entries[lpn];
if (pv == NULL)
return false;
-
- if (pap)
- *pap = ptoa(pv->pv_ppn);
+ if (ppa)
+ *ppa = ptoa(pv->pv_ppn);
return true;
}
Home |
Main Index |
Thread Index |
Old Index