Module Name: src
Committed By: uebayasi
Date: Fri Feb 12 16:06:50 UTC 2010
Modified Files:
src/sys/uvm [uebayasi-xip]: uvm_fault.c
Log Message:
uvmfault_promote: For promotion from a "lower" page, pass the belonging struct
uvm_object * from callers, because device page struct vm_page * doesn't have
a back-pointer to the uvm_object.
To generate a diff of this commit:
cvs rdiff -u -r1.166 -r1.166.2.1 src/sys/uvm/uvm_fault.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/uvm/uvm_fault.c
diff -u src/sys/uvm/uvm_fault.c:1.166 src/sys/uvm/uvm_fault.c:1.166.2.1
--- src/sys/uvm/uvm_fault.c:1.166 Mon Feb 8 00:02:50 2010
+++ src/sys/uvm/uvm_fault.c Fri Feb 12 16:06:50 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_fault.c,v 1.166 2010/02/08 00:02:50 mlelstv Exp $ */
+/* $NetBSD: uvm_fault.c,v 1.166.2.1 2010/02/12 16:06:50 uebayasi Exp $ */
/*
*
@@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_fault.c,v 1.166 2010/02/08 00:02:50 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_fault.c,v 1.166.2.1 2010/02/12 16:06:50 uebayasi Exp $");
#include "opt_uvmhist.h"
@@ -546,12 +546,12 @@
static int
uvmfault_promote(struct uvm_faultinfo *ufi,
struct vm_anon *oanon,
+ struct uvm_object *uobj,
struct vm_page *uobjpage,
struct vm_anon **nanon, /* OUT: allocated anon */
struct vm_anon **spare)
{
struct vm_amap *amap = ufi->entry->aref.ar_amap;
- struct uvm_object *uobj;
struct vm_anon *anon;
struct vm_page *pg;
struct vm_page *opg;
@@ -570,11 +570,6 @@
/* ZFOD */
opg = NULL;
}
- if (opg != NULL) {
- uobj = opg->uobject;
- } else {
- uobj = NULL;
- }
KASSERT(amap != NULL);
KASSERT(uobjpage != NULL);
@@ -1534,7 +1529,7 @@
UVMHIST_LOG(maphist, " case 1B: COW fault",0,0,0,0);
uvmexp.flt_acow++;
- error = uvmfault_promote(ufi, oanon, PGO_DONTCARE,
+ error = uvmfault_promote(ufi, oanon, NULL, PGO_DONTCARE,
&anon, &flt->anon_spare);
switch (error) {
case 0:
@@ -1986,7 +1981,7 @@
if (amap == NULL)
panic("uvm_fault: want to promote data, but no anon");
#endif
- error = uvmfault_promote(ufi, NULL, uobjpage,
+ error = uvmfault_promote(ufi, NULL, uobj, uobjpage,
&anon, &flt->anon_spare);
switch (error) {
case 0: