diff options
author | David E. O'Brien <obrien@FreeBSD.org> | 2011-12-01 22:42:14 +0000 |
---|---|---|
committer | David E. O'Brien <obrien@FreeBSD.org> | 2011-12-01 22:42:14 +0000 |
commit | da296d403c72d7c180be30b2893b457415279bd8 (patch) | |
tree | 8994d700940da670ba912c034a6b84612d424d36 /sysutils | |
parent | 4ac40b5c977829b6eecb2fe8d4e9b629e37e0c0c (diff) | |
download | ports-da296d403c72d7c180be30b2893b457415279bd8.tar.gz ports-da296d403c72d7c180be30b2893b457415279bd8.zip |
Catch up with 9.0's r210923 [2010-08-06] and 8.2's MFC r212229
(new make_dev_p(9) flag MAKEDEV_ETERNAL).
PR: 157917
Feature safe: yes
Notes
Notes:
svn path=/head/; revision=286746
Diffstat (limited to 'sysutils')
-rw-r--r-- | sysutils/pmap/files/patch-pmap_helper.c | 35 |
1 files changed, 28 insertions, 7 deletions
diff --git a/sysutils/pmap/files/patch-pmap_helper.c b/sysutils/pmap/files/patch-pmap_helper.c index 167c68ca4147..06621bf8b597 100644 --- a/sysutils/pmap/files/patch-pmap_helper.c +++ b/sysutils/pmap/files/patch-pmap_helper.c @@ -1,6 +1,6 @@ --- pmap_helper/pmap_helper.c.orig 2006-06-22 15:55:17.000000000 +0400 -+++ pmap_helper/pmap_helper.c 2008-01-16 04:00:46.000000000 +0300 -@@ -43,6 +43,7 @@ ++++ pmap_helper/pmap_helper.c 2011-12-01 14:31:48.000000000 -0800 +@@ -43,6 +43,7 @@ __RCSID("$Id: pmap_helper.c,v 1.11 2006/ #include <sys/lock.h> #include <sys/vnode.h> #include <sys/malloc.h> @@ -8,7 +8,7 @@ #include <vm/vm.h> #include <vm/pmap.h> -@@ -77,7 +78,6 @@ +@@ -77,7 +78,6 @@ pmap_helper(struct proc *curp, struct pm struct proc *p; static struct vm_map *map; struct vm_map_entry *entry; @@ -16,7 +16,7 @@ int nmaps = 0; int error; struct pmh pmh; -@@ -91,17 +91,16 @@ +@@ -91,17 +91,16 @@ pmap_helper(struct proc *curp, struct pm return EINVAL; p = pfind(pmh.pid); /* XXX Locks p! */ @@ -37,7 +37,7 @@ error = 0; for (entry = map->header.next; entry != &map->header; -@@ -129,7 +128,7 @@ +@@ -129,7 +128,7 @@ pmap_helper(struct proc *curp, struct pm addr = entry->start; /* estimate number of phys. resident pages in map */ while (addr < entry->end) { @@ -46,7 +46,28 @@ resident++; addr += PAGE_SIZE; } -@@ -163,7 +162,9 @@ +@@ -149,10 +148,19 @@ pmap_helper(struct proc *curp, struct pm + + if (lobj->type == OBJT_DEVICE) { + struct cdevsw *csw; +- ++#ifdef VV_ETERNALDEV ++ int ref; ++ ++ csw = dev_refthread(lobj->handle, &ref); ++#else + csw = dev_refthread(lobj->handle); ++#endif /* __FreeBSD_version */ + copystr(csw->d_name, pmhm.fname, 254, &done); ++#ifdef VV_ETERNALDEV ++ dev_relthread(lobj->handle, ref); ++#else + dev_relthread(lobj->handle); ++#endif + } else if (lobj->type == OBJT_VNODE) { + char *fullpath = "[vnode pager]", *freepath = NULL; + +@@ -163,7 +171,9 @@ pmap_helper(struct proc *curp, struct pm free(freepath, M_TEMP); } } @@ -56,7 +77,7 @@ if (error) break; nmaps++; -@@ -171,10 +172,7 @@ +@@ -171,10 +181,7 @@ pmap_helper(struct proc *curp, struct pm break; } |