Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/uebayasi-xip]: src/sys/uvm Enable the newly added VM_PAGE_TO_MD() only #...
details: https://anonhg.NetBSD.org/src/rev/bd56d4f89642
branches: uebayasi-xip
changeset: 751573:bd56d4f89642
user: uebayasi <uebayasi%NetBSD.org@localhost>
date: Fri Feb 12 04:33:05 2010 +0000
description:
Enable the newly added VM_PAGE_TO_MD() only #ifdef __HAVE_VM_PAGE_MD.
Pointed out by mrg@.
diffstat:
sys/uvm/uvm_page.c | 10 +++++++---
sys/uvm/uvm_page.h | 4 +++-
2 files changed, 10 insertions(+), 4 deletions(-)
diffs (75 lines):
diff -r 8ec29af4a43e -r bd56d4f89642 sys/uvm/uvm_page.c
--- a/sys/uvm/uvm_page.c Fri Feb 12 01:36:02 2010 +0000
+++ b/sys/uvm/uvm_page.c Fri Feb 12 04:33:05 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_page.c,v 1.153.2.11 2010/02/10 14:18:31 uebayasi Exp $ */
+/* $NetBSD: uvm_page.c,v 1.153.2.12 2010/02/12 04:33:05 uebayasi Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -71,7 +71,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_page.c,v 1.153.2.11 2010/02/10 14:18:31 uebayasi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_page.c,v 1.153.2.12 2010/02/12 04:33:05 uebayasi Exp $");
#include "opt_ddb.h"
#include "opt_uvmhist.h"
@@ -1047,6 +1047,7 @@
*/
/* Assume struct vm_page * is aligned to 4 bytes. */
+/* XXXUEBS Consider to improve this. */
#define VM_PAGE_DEVICE_MAGIC 0x2
#define VM_PAGE_DEVICE_MAGIC_MASK 0x3
#define VM_PAGE_DEVICE_MAGIC_SHIFT 2
@@ -1117,13 +1118,15 @@
}
+#ifdef __HAVE_VM_PAGE_MD
#ifdef XIP
/*
* Device page's mdpage lookup.
*
+ * - Needed when promoting an XIP vnode page and invalidating its old mapping.
+ *
* - Hashing code is based on sys/arch/x86/x86/pmap.c.
*
- * -
* XXX Consider to allocate slots on-demand.
*/
@@ -1236,6 +1239,7 @@
return &mde->mde_mdpage;
}
#endif
+#endif
/*
diff -r 8ec29af4a43e -r bd56d4f89642 sys/uvm/uvm_page.h
--- a/sys/uvm/uvm_page.h Fri Feb 12 01:36:02 2010 +0000
+++ b/sys/uvm/uvm_page.h Fri Feb 12 04:33:05 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_page.h,v 1.59.2.10 2010/02/10 14:18:31 uebayasi Exp $ */
+/* $NetBSD: uvm_page.h,v 1.59.2.11 2010/02/12 04:33:05 uebayasi Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -322,12 +322,14 @@
#define VM_PAGE_TO_PHYS(entry) uvm_vm_page_to_phys(entry)
+#ifdef __HAVE_VM_PAGE_MD
#ifndef XIP
#define VM_PAGE_TO_MD(pg) (&(pg)->mdpage)
#else
#define VM_PAGE_TO_MD(pg) \
(uvm_pageisdevice_p(pg) ? vm_page_device_mdpage_lookup(pg) : &(pg)->mdpage)
#endif
+#endif
/*
* Compute the page color bucket for a given page.
Home |
Main Index |
Thread Index |
Old Index