mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-29 01:13:08 +00:00
Fix port after breakage on src commit svn r248084 on
March 9th, 2013. Patch kmod to include rwlock.h Patch kmod to change VM_OBJECT_LOCK to VM_OBJECT_RLOCK Patch kmod to change VM_OBJECT_UNLOCK to VM_OBJECT_RUNLOCK
This commit is contained in:
parent
b2ac5f0650
commit
d600c214cc
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=314794
@ -3,7 +3,7 @@
|
||||
|
||||
PORTNAME= virtualbox-ose
|
||||
DISTVERSION= 4.2.6
|
||||
PORTREVISION= 1
|
||||
PORTREVISION= 2
|
||||
CATEGORIES= emulators kld
|
||||
MASTER_SITES= http://download.virtualbox.org/virtualbox/${DISTVERSION}/ \
|
||||
http://tmp.chruetertee.ch/ \
|
||||
|
@ -0,0 +1,95 @@
|
||||
$FreeBSD$
|
||||
|
||||
--- src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c 2013-03-20 14:45:46.594643103 -0700
|
||||
+++ src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c 2013-03-20 14:33:00.483697105 -0700
|
||||
@@ -162,7 +162,7 @@
|
||||
case RTR0MEMOBJTYPE_PHYS:
|
||||
case RTR0MEMOBJTYPE_PHYS_NC:
|
||||
{
|
||||
- VM_OBJECT_LOCK(pMemFreeBSD->pObject);
|
||||
+ VM_OBJECT_RLOCK(pMemFreeBSD->pObject);
|
||||
vm_page_t pPage = vm_page_find_least(pMemFreeBSD->pObject, 0);
|
||||
#if __FreeBSD_version < 900000
|
||||
/* See http://lists.freebsd.org/pipermail/freebsd-current/2012-November/037963.html */
|
||||
@@ -177,7 +177,7 @@
|
||||
#if __FreeBSD_version < 900000
|
||||
vm_page_unlock_queues();
|
||||
#endif
|
||||
- VM_OBJECT_UNLOCK(pMemFreeBSD->pObject);
|
||||
+ VM_OBJECT_RUNLOCK(pMemFreeBSD->pObject);
|
||||
vm_object_deallocate(pMemFreeBSD->pObject);
|
||||
break;
|
||||
}
|
||||
@@ -205,10 +205,10 @@
|
||||
|
||||
while (cTries <= 1)
|
||||
{
|
||||
- VM_OBJECT_LOCK(pObject);
|
||||
+ VM_OBJECT_RLOCK(pObject);
|
||||
pPages = vm_page_alloc_contig(pObject, iPIndex, fFlags, cPages, 0,
|
||||
VmPhysAddrHigh, uAlignment, 0, VM_MEMATTR_DEFAULT);
|
||||
- VM_OBJECT_UNLOCK(pObject);
|
||||
+ VM_OBJECT_RUNLOCK(pObject);
|
||||
if (pPages)
|
||||
break;
|
||||
vm_pageout_grow_cache(cTries, 0, VmPhysAddrHigh);
|
||||
@@ -228,7 +228,7 @@
|
||||
|
||||
if (!pPages)
|
||||
return pPages;
|
||||
- VM_OBJECT_LOCK(pObject);
|
||||
+ VM_OBJECT_RLOCK(pObject);
|
||||
for (vm_pindex_t iPage = 0; iPage < cPages; iPage++)
|
||||
{
|
||||
vm_page_t pPage = pPages + iPage;
|
||||
@@ -240,7 +240,7 @@
|
||||
atomic_add_int(&cnt.v_wire_count, 1);
|
||||
}
|
||||
}
|
||||
- VM_OBJECT_UNLOCK(pObject);
|
||||
+ VM_OBJECT_RUNLOCK(pObject);
|
||||
return pPages;
|
||||
#endif
|
||||
}
|
||||
@@ -264,7 +264,7 @@
|
||||
if (!pPage)
|
||||
{
|
||||
/* Free all allocated pages */
|
||||
- VM_OBJECT_LOCK(pObject);
|
||||
+ VM_OBJECT_RLOCK(pObject);
|
||||
while (iPage-- > 0)
|
||||
{
|
||||
pPage = vm_page_lookup(pObject, iPage);
|
||||
@@ -278,7 +278,7 @@
|
||||
vm_page_unlock_queues();
|
||||
#endif
|
||||
}
|
||||
- VM_OBJECT_UNLOCK(pObject);
|
||||
+ VM_OBJECT_RUNLOCK(pObject);
|
||||
return rcNoMem;
|
||||
}
|
||||
}
|
||||
@@ -411,9 +411,9 @@
|
||||
if (fContiguous)
|
||||
{
|
||||
Assert(enmType == RTR0MEMOBJTYPE_PHYS);
|
||||
- VM_OBJECT_LOCK(pMemFreeBSD->pObject);
|
||||
+ VM_OBJECT_RLOCK(pMemFreeBSD->pObject);
|
||||
pMemFreeBSD->Core.u.Phys.PhysBase = VM_PAGE_TO_PHYS(vm_page_find_least(pMemFreeBSD->pObject, 0));
|
||||
- VM_OBJECT_UNLOCK(pMemFreeBSD->pObject);
|
||||
+ VM_OBJECT_RUNLOCK(pMemFreeBSD->pObject);
|
||||
pMemFreeBSD->Core.u.Phys.fAllocated = true;
|
||||
}
|
||||
|
||||
@@ -823,9 +823,9 @@
|
||||
case RTR0MEMOBJTYPE_PHYS_NC:
|
||||
{
|
||||
RTHCPHYS addr;
|
||||
- VM_OBJECT_LOCK(pMemFreeBSD->pObject);
|
||||
+ VM_OBJECT_RLOCK(pMemFreeBSD->pObject);
|
||||
addr = VM_PAGE_TO_PHYS(vm_page_lookup(pMemFreeBSD->pObject, iPage));
|
||||
- VM_OBJECT_UNLOCK(pMemFreeBSD->pObject);
|
||||
+ VM_OBJECT_RUNLOCK(pMemFreeBSD->pObject);
|
||||
return addr;
|
||||
}
|
||||
|
@ -0,0 +1,12 @@
|
||||
$FreeBSD$
|
||||
|
||||
--- src/VBox/Runtime/r0drv/freebsd/the-freebsd-kernel.h 2012-12-19 10:27:29.000000000 -0800
|
||||
+++ src/VBox/Runtime/r0drv/freebsd/the-freebsd-kernel.h 2013-03-20 14:50:35.330638254 -0700
|
||||
@@ -50,6 +50,7 @@
|
||||
#include <sys/unistd.h>
|
||||
#include <sys/kthread.h>
|
||||
#include <sys/lock.h>
|
||||
+#include <sys/rwlock.h>
|
||||
#include <sys/mutex.h>
|
||||
#include <sys/sched.h>
|
||||
#include <sys/callout.h>
|
Loading…
Reference in New Issue
Block a user