Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/uebayasi-xip]: src/sys/uvm Introduce VM_PAGE_TO_MD(); lookup vm_page_md ...



details:   https://anonhg.NetBSD.org/src/rev/92a27461c54a
branches:  uebayasi-xip
changeset: 751558:92a27461c54a
user:      uebayasi <uebayasi%NetBSD.org@localhost>
date:      Wed Feb 10 14:07:23 2010 +0000

description:
Introduce VM_PAGE_TO_MD(); lookup vm_page_md from a given vm_page.

diffstat:

 sys/uvm/uvm_page.h |  9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diffs (23 lines):

diff -r bbb0d526b010 -r 92a27461c54a sys/uvm/uvm_page.h
--- a/sys/uvm/uvm_page.h        Wed Feb 10 13:58:08 2010 +0000
+++ b/sys/uvm/uvm_page.h        Wed Feb 10 14:07:23 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uvm_page.h,v 1.59.2.7 2010/02/10 02:12:39 uebayasi Exp $       */
+/*     $NetBSD: uvm_page.h,v 1.59.2.8 2010/02/10 14:07:23 uebayasi Exp $       */
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -316,6 +316,13 @@
 
 #define VM_PAGE_TO_PHYS(entry) uvm_vm_page_to_phys(entry)
 
+#ifndef XIP
+#define        VM_PAGE_TO_MD(pg)       
+#else
+#define        VM_PAGE_TO_MD(pg) \
+    (uvm_pageisdevice_p(pg) ? vm_page_device_mdpage_lookup(pg) ; &(pg)->mdpage)
+#endif
+
 /*
  * Compute the page color bucket for a given page.
  */



Home | Main Index | Thread Index | Old Index