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 Implement pmap_is_referenced()
details: https://anonhg.NetBSD.org/src/rev/420d70b16250
branches: trunk
changeset: 769029:420d70b16250
user: reinoud <reinoud%NetBSD.org@localhost>
date: Tue Aug 30 11:57:20 2011 +0000
description:
Implement pmap_is_referenced()
diffstat:
sys/arch/usermode/usermode/pmap.c | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
diffs (36 lines):
diff -r 5c23b5abd6be -r 420d70b16250 sys/arch/usermode/usermode/pmap.c
--- a/sys/arch/usermode/usermode/pmap.c Tue Aug 30 11:53:22 2011 +0000
+++ b/sys/arch/usermode/usermode/pmap.c Tue Aug 30 11:57:20 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.46 2011/08/30 11:53:22 reinoud Exp $ */
+/* $NetBSD: pmap.c,v 1.47 2011/08/30 11:57:20 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.46 2011/08/30 11:53:22 reinoud Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.47 2011/08/30 11:57:20 reinoud Exp $");
#include "opt_memsize.h"
#include "opt_kmempages.h"
@@ -929,10 +929,14 @@
}
bool
-pmap_is_referenced(struct vm_page *pg)
+pmap_is_referenced(struct vm_page *page)
{
-aprint_debug("pmap_is_referenced not implemented\n");
- return false;
+ intptr_t ppn;
+
+ ppn = atop(VM_PAGE_TO_PHYS(page));
+ aprint_debug("pmap_is_referenced page %"PRIiPTR"\n", ppn);
+
+ return (pv_table[ppn].pv_pflags & PV_REFERENCED) != 0;
}
paddr_t
Home |
Main Index |
Thread Index |
Old Index