diff options
author | decke <decke@FreeBSD.org> | 2013-03-25 16:02:47 +0800 |
---|---|---|
committer | decke <decke@FreeBSD.org> | 2013-03-25 16:02:47 +0800 |
commit | ca2df6dfdbcb02f0063348d136d96f6b5cfcaf1d (patch) | |
tree | 5a28b9b05115879481cd7f2027007163762af868 /emulators/virtualbox-ose-kmod | |
parent | d5ae32ca8d338c1ad0eb758d98c2b7509bc22a0c (diff) | |
download | freebsd-ports-graphics-ca2df6dfdbcb02f0063348d136d96f6b5cfcaf1d.tar.gz freebsd-ports-graphics-ca2df6dfdbcb02f0063348d136d96f6b5cfcaf1d.tar.zst freebsd-ports-graphics-ca2df6dfdbcb02f0063348d136d96f6b5cfcaf1d.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/virtualbox-ose-kmod')
-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 6331f86efc2..f4e6c216255 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 7975968886b..82d7d1c297d 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 |