Module Name: src
Committed By: uebayasi
Date: Thu Feb 25 03:30:22 UTC 2010
Modified Files:
src/sys/arch/arm/arm32 [uebayasi-xip]: mem.c pmap.c
src/sys/arch/arm/include/arm32 [uebayasi-xip]: pmap.h
Log Message:
A few more VM_PAGE_TO_MD().
To generate a diff of this commit:
cvs rdiff -u -r1.26.6.2 -r1.26.6.3 src/sys/arch/arm/arm32/mem.c
cvs rdiff -u -r1.211.2.8 -r1.211.2.9 src/sys/arch/arm/arm32/pmap.c
cvs rdiff -u -r1.94.2.1 -r1.94.2.2 src/sys/arch/arm/include/arm32/pmap.h
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/arm/arm32/mem.c
diff -u src/sys/arch/arm/arm32/mem.c:1.26.6.2 src/sys/arch/arm/arm32/mem.c:1.26.6.3
--- src/sys/arch/arm/arm32/mem.c:1.26.6.2 Thu Feb 25 03:19:51 2010
+++ src/sys/arch/arm/arm32/mem.c Thu Feb 25 03:30:22 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: mem.c,v 1.26.6.2 2010/02/25 03:19:51 uebayasi Exp $ */
+/* $NetBSD: mem.c,v 1.26.6.3 2010/02/25 03:30:22 uebayasi Exp $ */
/*
* Copyright (c) 1982, 1986, 1990, 1993
@@ -78,7 +78,7 @@
#include "opt_xip.h"
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mem.c,v 1.26.6.2 2010/02/25 03:19:51 uebayasi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mem.c,v 1.26.6.3 2010/02/25 03:30:22 uebayasi Exp $");
#include <sys/param.h>
#include <sys/conf.h>
@@ -147,7 +147,7 @@
struct vm_page *pg;
pg = PHYS_TO_VM_PAGE(trunc_page(v));
if (pg != NULL && pmap_is_page_colored_p(VM_PAGE_TO_MD(pg)))
- o = pg->mdpage.pvh_attrs;
+ o = VM_PAGE_TO_MD(pg)->pvh_attrs;
else
o = v;
m += o & arm_cache_prefer_mask;
Index: src/sys/arch/arm/arm32/pmap.c
diff -u src/sys/arch/arm/arm32/pmap.c:1.211.2.8 src/sys/arch/arm/arm32/pmap.c:1.211.2.9
--- src/sys/arch/arm/arm32/pmap.c:1.211.2.8 Sat Feb 20 16:48:57 2010
+++ src/sys/arch/arm/arm32/pmap.c Thu Feb 25 03:30:22 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.211.2.8 2010/02/20 16:48:57 uebayasi Exp $ */
+/* $NetBSD: pmap.c,v 1.211.2.9 2010/02/25 03:30:22 uebayasi Exp $ */
/*
* Copyright 2003 Wasabi Systems, Inc.
@@ -191,6 +191,8 @@
#include "opt_ddb.h"
#include "opt_lockdebug.h"
#include "opt_multiprocessor.h"
+#include "opt_device_page.h"
+#include "opt_xip.h"
#include <sys/param.h>
#include <sys/types.h>
@@ -211,7 +213,7 @@
#include <machine/param.h>
#include <arm/arm32/katelib.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.211.2.8 2010/02/20 16:48:57 uebayasi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.211.2.9 2010/02/25 03:30:22 uebayasi Exp $");
#ifdef PMAP_DEBUG
@@ -3343,8 +3345,8 @@
struct vm_page_md *md = VM_PAGE_TO_MD(pg);
NPDEBUG(PDB_KENTER,
- printf("pmap_kenter_pa: va 0x%08lx, pa 0x%08lx, prot 0x%x\n",
- va, pa, prot));
+ printf("pmap_kenter_pa: va 0x%08lx, pa 0x%08lx, prot 0x%x pg %p md %p\n",
+ va, pa, prot, pg, md));
l2b = pmap_get_l2_bucket(pmap_kernel(), va);
KDASSERT(l2b != NULL);
Index: src/sys/arch/arm/include/arm32/pmap.h
diff -u src/sys/arch/arm/include/arm32/pmap.h:1.94.2.1 src/sys/arch/arm/include/arm32/pmap.h:1.94.2.2
--- src/sys/arch/arm/include/arm32/pmap.h:1.94.2.1 Wed Feb 10 14:20:23 2010
+++ src/sys/arch/arm/include/arm32/pmap.h Thu Feb 25 03:30:22 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.h,v 1.94.2.1 2010/02/10 14:20:23 uebayasi Exp $ */
+/* $NetBSD: pmap.h,v 1.94.2.2 2010/02/25 03:30:22 uebayasi Exp $ */
/*
* Copyright (c) 2002, 2003 Wasabi Systems, Inc.
@@ -269,9 +269,10 @@
#define pmap_wired_count(pmap) ((pmap)->pm_stats.wired_count)
#define pmap_is_modified(pg) \
- (((pg)->mdpage.pvh_attrs & PVF_MOD) != 0)
+ ((VM_PAGE_TO_MD(pg)->pvh_attrs & PVF_MOD) != 0)
#define pmap_is_referenced(pg) \
- (((pg)->mdpage.pvh_attrs & PVF_REF) != 0)
+ ((VM_PAGE_TO_MD(pg)->pvh_attrs & PVF_REF) != 0)
+
#define pmap_is_page_colored_p(md) \
(((md)->pvh_attrs & PVF_COLORED) != 0)