diff options
author | Bernhard Froehlich <decke@FreeBSD.org> | 2013-03-25 16:02:47 +0800 |
---|---|---|
committer | Bernhard Froehlich <decke@FreeBSD.org> | 2013-03-25 16:02:47 +0800 |
commit | e75961dd5b0e45d824b041187c3312c29378b216 (patch) | |
tree | 5a28b9b05115879481cd7f2027007163762af868 /emulators | |
parent | 0b8d52f9dfb5b320f65bd4692d095fa6405da164 (diff) | |
download | freebsd-ports-gnome-e75961dd5b0e45d824b041187c3312c29378b216.tar.gz freebsd-ports-gnome-e75961dd5b0e45d824b041187c3312c29378b216.tar.zst freebsd-ports-gnome-e75961dd5b0e45d824b041187c3312c29378b216.zip |
- Fix VM_OBJECT patch to properly use WLOCK/WUNLOCK.
Reported by: Ivan Klymenko <fidaj@ukr.net>
Thanks to: Konstantin Belousov <kib@FreeBSD.org>
See: http://lists.freebsd.org/pipermail/freebsd-ports/2013-March/082432.html
Diffstat (limited to 'emulators')
-rw-r--r-- | emulators/virtualbox-ose-kmod/Makefile | 2 | ||||
-rw-r--r-- | emulators/virtualbox-ose-kmod/files/patch-src-VBox-Runtime-r0drv-freebsd-memobj-r0drv-freebsd_VM_OBJECT_RENAME.c | 24 |
2 files changed, 13 insertions, 13 deletions
diff --git a/emulators/virtualbox-ose-kmod/Makefile b/emulators/virtualbox-ose-kmod/Makefile index 6331f86efc22..f4e6c2162559 100644 --- a/emulators/virtualbox-ose-kmod/Makefile +++ b/emulators/virtualbox-ose-kmod/Makefile @@ -3,7 +3,7 @@ PORTNAME= virtualbox-ose DISTVERSION= 4.2.6 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= emulators kld MASTER_SITES= http://download.virtualbox.org/virtualbox/${DISTVERSION}/ \ http://tmp.chruetertee.ch/ \ diff --git a/emulators/virtualbox-ose-kmod/files/patch-src-VBox-Runtime-r0drv-freebsd-memobj-r0drv-freebsd_VM_OBJECT_RENAME.c b/emulators/virtualbox-ose-kmod/files/patch-src-VBox-Runtime-r0drv-freebsd-memobj-r0drv-freebsd_VM_OBJECT_RENAME.c index 7975968886b6..82d7d1c297d6 100644 --- a/emulators/virtualbox-ose-kmod/files/patch-src-VBox-Runtime-r0drv-freebsd-memobj-r0drv-freebsd_VM_OBJECT_RENAME.c +++ b/emulators/virtualbox-ose-kmod/files/patch-src-VBox-Runtime-r0drv-freebsd-memobj-r0drv-freebsd_VM_OBJECT_RENAME.c @@ -7,7 +7,7 @@ $FreeBSD$ case RTR0MEMOBJTYPE_PHYS_NC: { +#if __FreeBSD_version >= 1000030 -+ VM_OBJECT_RLOCK(pMemFreeBSD->pObject); ++ VM_OBJECT_WLOCK(pMemFreeBSD->pObject); +#else VM_OBJECT_LOCK(pMemFreeBSD->pObject); +#endif @@ -19,7 +19,7 @@ $FreeBSD$ vm_page_unlock_queues(); #endif +#if __FreeBSD_version >= 1000030 -+ VM_OBJECT_RUNLOCK(pMemFreeBSD->pObject); ++ VM_OBJECT_WUNLOCK(pMemFreeBSD->pObject); +#else VM_OBJECT_UNLOCK(pMemFreeBSD->pObject); +#endif @@ -32,14 +32,14 @@ $FreeBSD$ while (cTries <= 1) { +#if __FreeBSD_version >= 1000030 -+ VM_OBJECT_RLOCK(pObject); ++ VM_OBJECT_WLOCK(pObject); +#else VM_OBJECT_LOCK(pObject); +#endif pPages = vm_page_alloc_contig(pObject, iPIndex, fFlags, cPages, 0, VmPhysAddrHigh, uAlignment, 0, VM_MEMATTR_DEFAULT); +#if __FreeBSD_version >= 1000030 -+ VM_OBJECT_RUNLOCK(pObject); ++ VM_OBJECT_WUNLOCK(pObject); +#else VM_OBJECT_UNLOCK(pObject); +#endif @@ -51,7 +51,7 @@ $FreeBSD$ if (!pPages) return pPages; +#if __FreeBSD_version >= 1000030 -+ VM_OBJECT_RLOCK(pObject); ++ VM_OBJECT_WLOCK(pObject); +#else VM_OBJECT_LOCK(pObject); +#endif @@ -63,7 +63,7 @@ $FreeBSD$ } } +#if __FreeBSD_version >= 1000030 -+ VM_OBJECT_RUNLOCK(pObject); ++ VM_OBJECT_WUNLOCK(pObject); +#else VM_OBJECT_UNLOCK(pObject); +#endif @@ -75,7 +75,7 @@ $FreeBSD$ { /* Free all allocated pages */ +#if __FreeBSD_version >= 1000030 -+ VM_OBJECT_RLOCK(pObject); ++ VM_OBJECT_WLOCK(pObject); +#else VM_OBJECT_LOCK(pObject); +#endif @@ -87,7 +87,7 @@ $FreeBSD$ #endif } +#if __FreeBSD_version >= 1000030 -+ VM_OBJECT_RUNLOCK(pObject); ++ VM_OBJECT_WUNLOCK(pObject); +#else VM_OBJECT_UNLOCK(pObject); +#endif @@ -99,13 +99,13 @@ $FreeBSD$ { Assert(enmType == RTR0MEMOBJTYPE_PHYS); +#if __FreeBSD_version >= 1000030 -+ VM_OBJECT_RLOCK(pMemFreeBSD->pObject); ++ VM_OBJECT_WLOCK(pMemFreeBSD->pObject); +#else VM_OBJECT_LOCK(pMemFreeBSD->pObject); +#endif pMemFreeBSD->Core.u.Phys.PhysBase = VM_PAGE_TO_PHYS(vm_page_find_least(pMemFreeBSD->pObject, 0)); +#if __FreeBSD_version >= 1000030 -+ VM_OBJECT_RUNLOCK(pMemFreeBSD->pObject); ++ VM_OBJECT_WUNLOCK(pMemFreeBSD->pObject); +#else VM_OBJECT_UNLOCK(pMemFreeBSD->pObject); +#endif @@ -117,13 +117,13 @@ $FreeBSD$ { RTHCPHYS addr; +#if __FreeBSD_version >= 1000030 -+ VM_OBJECT_RLOCK(pMemFreeBSD->pObject); ++ VM_OBJECT_WLOCK(pMemFreeBSD->pObject); +#else VM_OBJECT_LOCK(pMemFreeBSD->pObject); +#endif addr = VM_PAGE_TO_PHYS(vm_page_lookup(pMemFreeBSD->pObject, iPage)); +#if __FreeBSD_version >= 1000030 -+ VM_OBJECT_RUNLOCK(pMemFreeBSD->pObject); ++ VM_OBJECT_WUNLOCK(pMemFreeBSD->pObject); +#else VM_OBJECT_UNLOCK(pMemFreeBSD->pObject); +#endif |