From f7d48e35713adb5289b137d7ff13eaa98d9dad2b Mon Sep 17 00:00:00 2001 From: yamt Date: Sat, 29 Nov 2003 19:06:48 +0000 Subject: [PATCH] mincore: don't treat an aobj as a device mapping. --- sys/uvm/uvm_mmap.c | 6 +++--- sys/uvm/uvm_object.h | 5 ++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/sys/uvm/uvm_mmap.c b/sys/uvm/uvm_mmap.c index e25af21f3ca7..9b2fcddc44b3 100644 --- a/sys/uvm/uvm_mmap.c +++ b/sys/uvm/uvm_mmap.c @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_mmap.c,v 1.78 2003/10/07 00:17:09 thorpej Exp $ */ +/* $NetBSD: uvm_mmap.c,v 1.79 2003/11/29 19:06:48 yamt Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -51,7 +51,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uvm_mmap.c,v 1.78 2003/10/07 00:17:09 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uvm_mmap.c,v 1.79 2003/11/29 19:06:48 yamt Exp $"); #include #include @@ -200,7 +200,7 @@ sys_mincore(l, v, retval) if (UVM_ET_ISOBJ(entry)) { KASSERT(!UVM_OBJ_IS_KERN_OBJECT(entry->object.uvm_obj)); - if (!UVM_OBJ_IS_VNODE(entry->object.uvm_obj)) { + if (UVM_OBJ_IS_DEVICE(entry->object.uvm_obj)) { for (/* nothing */; start < lim; start += PAGE_SIZE, vec++) subyte(vec, 1); diff --git a/sys/uvm/uvm_object.h b/sys/uvm/uvm_object.h index 4fb78f6a9e12..d5a49a0e2c15 100644 --- a/sys/uvm/uvm_object.h +++ b/sys/uvm/uvm_object.h @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_object.h,v 1.16 2002/06/20 15:05:29 chs Exp $ */ +/* $NetBSD: uvm_object.h,v 1.17 2003/11/29 19:06:48 yamt Exp $ */ /* * @@ -80,6 +80,9 @@ extern struct uvm_pagerops aobj_pager; #define UVM_OBJ_IS_VNODE(uobj) \ ((uobj)->pgops == &uvm_vnodeops) +#define UVM_OBJ_IS_DEVICE(uobj) \ + ((uobj)->pgops == &uvm_deviceops) + #define UVM_OBJ_IS_VTEXT(uobj) \ ((uobj)->pgops == &uvm_vnodeops && \ ((struct vnode *)uobj)->v_flag & VEXECMAP)