diff options
author | decke <decke@FreeBSD.org> | 2011-08-12 22:45:17 +0800 |
---|---|---|
committer | decke <decke@FreeBSD.org> | 2011-08-12 22:45:17 +0800 |
commit | e43dd0a707bf2b1a674bc0fd5bcb931d0e13eff9 (patch) | |
tree | 6489aadf1fcd5ce272258e6caecb507054e10140 | |
parent | f496fdc4a33d8fa3db4ae2206a932033242bab11 (diff) | |
download | freebsd-ports-gnome-e43dd0a707bf2b1a674bc0fd5bcb931d0e13eff9.tar.gz freebsd-ports-gnome-e43dd0a707bf2b1a674bc0fd5bcb931d0e13eff9.tar.zst freebsd-ports-gnome-e43dd0a707bf2b1a674bc0fd5bcb931d0e13eff9.zip |
- Fix PG_UNMANAGED compile problem on HEAD after r224746.
Remove explicit initialization of m->flags and m->oflags because per
default vm_phys_alloc_contig() already initializes the page as unmanaged.
Chase move of PG_UNMANAGED flag from m->flags to m->oflags and renaming
to VPO_UNMANAGED for an additional assert.
PR: ports/159675
Reported by: Kyryll A Mirnenko <xmirya@gmail.com>,
Michael Butler <imb@protected-networks.net>
Thanks to: beat
3 files changed, 75 insertions, 0 deletions
diff --git a/emulators/virtualbox-ose-additions/files/patch-src-VBox-Runtime-r0drv-freebsd-memobj-r0drv-freebsd.c b/emulators/virtualbox-ose-additions/files/patch-src-VBox-Runtime-r0drv-freebsd-memobj-r0drv-freebsd.c new file mode 100644 index 000000000000..fd376f9b528b --- /dev/null +++ b/emulators/virtualbox-ose-additions/files/patch-src-VBox-Runtime-r0drv-freebsd-memobj-r0drv-freebsd.c @@ -0,0 +1,25 @@ +Remove explicit initialization of m->flags and m->oflags because per +default vm_phys_alloc_contig() already initializes the page as unmanaged. +Chase move of PG_UNMANAGED flag from m->flags to m->oflags and renaming +to VPO_UNMANAGED for an additional assert. + +Reviewed by: kib +See: http://svnweb.freebsd.org/base?view=revision&revision=224746 +--- src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c.orig 2011-04-05 14:34:09.000000000 +0200 ++++ src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c 2011-08-11 15:06:46.000000000 +0200 +@@ -394,9 +394,13 @@ + pPage->wire_count = 1; + pPage->pindex = iPage; + pPage->act_count = 0; +- pPage->oflags = 0; +- pPage->flags = PG_UNMANAGED; + atomic_add_int(&cnt.v_wire_count, 1); ++ ++#if __FreeBSD_version >= 900040 ++ Assert(pPage->oflags & VPO_UNMANAGED != 0); ++#else ++ Assert(pPage->flags & PG_UNMANAGED != 0); ++#endif + } + + diff --git a/emulators/virtualbox-ose-kmod-legacy/files/patch-src-VBox-Runtime-r0drv-freebsd-memobj-r0drv-freebsd.c b/emulators/virtualbox-ose-kmod-legacy/files/patch-src-VBox-Runtime-r0drv-freebsd-memobj-r0drv-freebsd.c new file mode 100644 index 000000000000..fd376f9b528b --- /dev/null +++ b/emulators/virtualbox-ose-kmod-legacy/files/patch-src-VBox-Runtime-r0drv-freebsd-memobj-r0drv-freebsd.c @@ -0,0 +1,25 @@ +Remove explicit initialization of m->flags and m->oflags because per +default vm_phys_alloc_contig() already initializes the page as unmanaged. +Chase move of PG_UNMANAGED flag from m->flags to m->oflags and renaming +to VPO_UNMANAGED for an additional assert. + +Reviewed by: kib +See: http://svnweb.freebsd.org/base?view=revision&revision=224746 +--- src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c.orig 2011-04-05 14:34:09.000000000 +0200 ++++ src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c 2011-08-11 15:06:46.000000000 +0200 +@@ -394,9 +394,13 @@ + pPage->wire_count = 1; + pPage->pindex = iPage; + pPage->act_count = 0; +- pPage->oflags = 0; +- pPage->flags = PG_UNMANAGED; + atomic_add_int(&cnt.v_wire_count, 1); ++ ++#if __FreeBSD_version >= 900040 ++ Assert(pPage->oflags & VPO_UNMANAGED != 0); ++#else ++ Assert(pPage->flags & PG_UNMANAGED != 0); ++#endif + } + + diff --git a/emulators/virtualbox-ose-kmod/files/patch-src-VBox-Runtime-r0drv-freebsd-memobj-r0drv-freebsd.c b/emulators/virtualbox-ose-kmod/files/patch-src-VBox-Runtime-r0drv-freebsd-memobj-r0drv-freebsd.c new file mode 100644 index 000000000000..fd376f9b528b --- /dev/null +++ b/emulators/virtualbox-ose-kmod/files/patch-src-VBox-Runtime-r0drv-freebsd-memobj-r0drv-freebsd.c @@ -0,0 +1,25 @@ +Remove explicit initialization of m->flags and m->oflags because per +default vm_phys_alloc_contig() already initializes the page as unmanaged. +Chase move of PG_UNMANAGED flag from m->flags to m->oflags and renaming +to VPO_UNMANAGED for an additional assert. + +Reviewed by: kib +See: http://svnweb.freebsd.org/base?view=revision&revision=224746 +--- src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c.orig 2011-04-05 14:34:09.000000000 +0200 ++++ src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c 2011-08-11 15:06:46.000000000 +0200 +@@ -394,9 +394,13 @@ + pPage->wire_count = 1; + pPage->pindex = iPage; + pPage->act_count = 0; +- pPage->oflags = 0; +- pPage->flags = PG_UNMANAGED; + atomic_add_int(&cnt.v_wire_count, 1); ++ ++#if __FreeBSD_version >= 900040 ++ Assert(pPage->oflags & VPO_UNMANAGED != 0); ++#else ++ Assert(pPage->flags & PG_UNMANAGED != 0); ++#endif + } + + |