aboutsummaryrefslogtreecommitdiff
path: root/emulators/virtualbox-ose-kmod/files
diff options
context:
space:
mode:
Diffstat (limited to 'emulators/virtualbox-ose-kmod/files')
-rw-r--r--emulators/virtualbox-ose-kmod/files/patch-src-VBox-HostDrivers-Support-freebsd-Makefile11
-rw-r--r--emulators/virtualbox-ose-kmod/files/patch-src-VBox-HostDrivers-Support-freebsd-files-vboxdrv11
-rw-r--r--emulators/virtualbox-ose-kmod/files/patch-src-VBox-Runtime-r0drv-freebsd-mp-r0drv-freebsd.c79
-rw-r--r--emulators/virtualbox-ose-kmod/files/patch-src-VBox-Runtime-r0drv-freebsd-sleepqueue-r0drv-freebsd.h12
4 files changed, 79 insertions, 34 deletions
diff --git a/emulators/virtualbox-ose-kmod/files/patch-src-VBox-HostDrivers-Support-freebsd-Makefile b/emulators/virtualbox-ose-kmod/files/patch-src-VBox-HostDrivers-Support-freebsd-Makefile
deleted file mode 100644
index f259dc7212aa..000000000000
--- a/emulators/virtualbox-ose-kmod/files/patch-src-VBox-HostDrivers-Support-freebsd-Makefile
+++ /dev/null
@@ -1,11 +0,0 @@
---- ./src/VBox/HostDrivers/Support/freebsd/Makefile.orig 2011-05-16 18:33:40.000000000 +0200
-+++ ./src/VBox/HostDrivers/Support/freebsd/Makefile 2011-05-17 15:13:48.000000000 +0200
-@@ -84,6 +84,8 @@
-
- .PATH: ${.CURDIR}/common/string
- SRCS += \
-+ RTStrNCmp.c \
-+ RTStrCopy.c \
- RTStrCopyP.c \
- strformat.c \
- strformatrt.c \
diff --git a/emulators/virtualbox-ose-kmod/files/patch-src-VBox-HostDrivers-Support-freebsd-files-vboxdrv b/emulators/virtualbox-ose-kmod/files/patch-src-VBox-HostDrivers-Support-freebsd-files-vboxdrv
deleted file mode 100644
index 166b8d40bf62..000000000000
--- a/emulators/virtualbox-ose-kmod/files/patch-src-VBox-HostDrivers-Support-freebsd-files-vboxdrv
+++ /dev/null
@@ -1,11 +0,0 @@
---- ./src/VBox/HostDrivers/Support/freebsd/files_vboxdrv.orig 2011-05-16 18:33:40.000000000 +0200
-+++ ./src/VBox/HostDrivers/Support/freebsd/files_vboxdrv 2011-05-17 15:14:05.000000000 +0200
-@@ -110,6 +110,8 @@
- ${PATH_ROOT}/src/VBox/Runtime/common/misc/once.cpp=>common/misc/once.c \
- ${PATH_ROOT}/src/VBox/Runtime/common/misc/thread.cpp=>common/misc/thread.c \
- ${PATH_ROOT}/src/VBox/Runtime/common/string/RTStrCopyP.cpp=>common/string/RTStrCopyP.c \
-+ ${PATH_ROOT}/src/VBox/Runtime/common/string/RTStrCopy.cpp=>common/string/RTStrCopy.c \
-+ ${PATH_ROOT}/src/VBox/Runtime/common/string/RTStrNCmp.cpp=>common/string/RTStrNCmp.c \
- ${PATH_ROOT}/src/VBox/Runtime/common/string/strformat.cpp=>common/string/strformat.c \
- ${PATH_ROOT}/src/VBox/Runtime/common/string/strformatrt.cpp=>common/string/strformatrt.c \
- ${PATH_ROOT}/src/VBox/Runtime/common/string/strformattype.cpp=>common/string/strformattype.c \
diff --git a/emulators/virtualbox-ose-kmod/files/patch-src-VBox-Runtime-r0drv-freebsd-mp-r0drv-freebsd.c b/emulators/virtualbox-ose-kmod/files/patch-src-VBox-Runtime-r0drv-freebsd-mp-r0drv-freebsd.c
new file mode 100644
index 000000000000..c298f52fd501
--- /dev/null
+++ b/emulators/virtualbox-ose-kmod/files/patch-src-VBox-Runtime-r0drv-freebsd-mp-r0drv-freebsd.c
@@ -0,0 +1,79 @@
+--- src/VBox/Runtime/r0drv/freebsd/mp-r0drv-freebsd.c.orig 2011-05-16 12:33:52.000000000 -0400
++++ src/VBox/Runtime/r0drv/freebsd/mp-r0drv-freebsd.c 2011-06-24 13:57:31.000000000 -0400
+@@ -163,17 +163,26 @@ RTDECL(int) RTMpOnOthers(PFNRTMPWORKER p
+ /* Will panic if no rendezvousing cpus, so check up front. */
+ if (RTMpGetOnlineCount() > 1)
+ {
+-#if __FreeBSD_version >= 700000
+- cpumask_t Mask = ~(cpumask_t)curcpu;
++#if __FreeBSD_version >= 900000
++ cpuset_t Mask;
++#elif __FreeBSD_version >= 700000
++ cpumask_t Mask;
+ #endif
++ RTCPUID idCpu = curcpu;
+ RTMPARGS Args;
+
+ Args.pfnWorker = pfnWorker;
+ Args.pvUser1 = pvUser1;
+ Args.pvUser2 = pvUser2;
+- Args.idCpu = RTMpCpuId();
++ Args.idCpu = idCpu;
+ Args.cHits = 0;
+ #if __FreeBSD_version >= 700000
++ Mask = all_cpus;
++#if __FreeBSD_version >= 900000
++ CPU_CLR(idCpu, &Mask);
++#else
++ Mask &= ~((cpumask_t)1 << idCpu);
++#endif
+ smp_rendezvous_cpus(Mask, NULL, rtmpOnOthersFreeBSDWrapper, smp_no_rendevous_barrier, &Args);
+ #else
+ smp_rendezvous(NULL, rtmpOnOthersFreeBSDWrapper, NULL, &Args);
+@@ -203,8 +212,10 @@ static void rtmpOnSpecificFreeBSDWrapper
+
+ RTDECL(int) RTMpOnSpecific(RTCPUID idCpu, PFNRTMPWORKER pfnWorker, void *pvUser1, void *pvUser2)
+ {
+-#if __FreeBSD_version >= 700000
+- cpumask_t Mask = 1 << idCpu;
++#if __FreeBSD_version >= 900000
++ cpuset_t Mask;
++#elif __FreeBSD_version >= 700000
++ cpumask_t Mask;
+ #endif
+ RTMPARGS Args;
+
+@@ -218,7 +229,11 @@ RTDECL(int) RTMpOnSpecific(RTCPUID idCpu
+ Args.idCpu = idCpu;
+ Args.cHits = 0;
+ #if __FreeBSD_version >= 700000
++#if __FreeBSD_version >= 900000
++ CPU_SETOF(idCpu, &Mask);
++#else
+ Mask = (cpumask_t)1 << idCpu;
++#endif
+ smp_rendezvous_cpus(Mask, NULL, rtmpOnSpecificFreeBSDWrapper, smp_no_rendevous_barrier, &Args);
+ #else
+ smp_rendezvous(NULL, rtmpOnSpecificFreeBSDWrapper, NULL, &Args);
+@@ -242,13 +257,21 @@ static void rtmpFreeBSDPokeCallback(void
+
+ RTDECL(int) RTMpPokeCpu(RTCPUID idCpu)
+ {
++#if __FreeBSD_version >= 900000
++ cpuset_t Mask;
++#else
+ cpumask_t Mask;
++#endif
+
+ /* Will panic if no rendezvousing cpus, so make sure the cpu is online. */
+ if (!RTMpIsCpuOnline(idCpu))
+ return VERR_CPU_NOT_FOUND;
+
++#if __FreeBSD_version >= 900000
++ CPU_SETOF(idCpu, &Mask);
++#else
+ Mask = (cpumask_t)1 << idCpu;
++#endif
+ smp_rendezvous_cpus(Mask, NULL, rtmpFreeBSDPokeCallback, smp_no_rendevous_barrier, NULL);
+
+ return VINF_SUCCESS;
diff --git a/emulators/virtualbox-ose-kmod/files/patch-src-VBox-Runtime-r0drv-freebsd-sleepqueue-r0drv-freebsd.h b/emulators/virtualbox-ose-kmod/files/patch-src-VBox-Runtime-r0drv-freebsd-sleepqueue-r0drv-freebsd.h
deleted file mode 100644
index e745733bdee2..000000000000
--- a/emulators/virtualbox-ose-kmod/files/patch-src-VBox-Runtime-r0drv-freebsd-sleepqueue-r0drv-freebsd.h
+++ /dev/null
@@ -1,12 +0,0 @@
---- src/VBox/Runtime/r0drv/freebsd/sleepqueue-r0drv-freebsd.h.orig 2011-05-16 18:33:52.000000000 +0200
-+++ src/VBox/Runtime/r0drv/freebsd/sleepqueue-r0drv-freebsd.h 2011-06-02 18:26:49.000000000 +0200
-@@ -313,7 +313,9 @@
- {
- sleepq_lock(pvWaitChan);
- sleepq_broadcast(pvWaitChan, SLEEPQ_CONDVAR, 0, 0);
-+#if __FreeBSD_version >= 800000 /* Broadcast releases the sleep queue lock on FreeBSD 7.x */
- sleepq_release(pvWaitChan);
-+#endif
- }
-
- /**