diff options
author | Bernhard Froehlich <decke@FreeBSD.org> | 2011-07-01 13:21:51 +0000 |
---|---|---|
committer | Bernhard Froehlich <decke@FreeBSD.org> | 2011-07-01 13:21:51 +0000 |
commit | dd59c8b8a3bba413976ae357743eeab0b4dd24d1 (patch) | |
tree | e296535757b17f37e1a9b0da3d1953ce358b3d2c /emulators/virtualbox-ose-kmod-legacy | |
parent | 215e1e9925c476c98efd3155d55f8ce94a1a9ba4 (diff) | |
download | ports-dd59c8b8a3bba413976ae357743eeab0b4dd24d1.tar.gz ports-dd59c8b8a3bba413976ae357743eeab0b4dd24d1.zip |
Notes
Diffstat (limited to 'emulators/virtualbox-ose-kmod-legacy')
-rw-r--r-- | emulators/virtualbox-ose-kmod-legacy/Makefile | 2 | ||||
-rw-r--r-- | emulators/virtualbox-ose-kmod-legacy/files/patch-src-VBox-Runtime-r0drv-freebsd-mp-r0drv-freebsd.c | 79 |
2 files changed, 80 insertions, 1 deletions
diff --git a/emulators/virtualbox-ose-kmod-legacy/Makefile b/emulators/virtualbox-ose-kmod-legacy/Makefile index 3297d0cfe35c..c9564778be53 100644 --- a/emulators/virtualbox-ose-kmod-legacy/Makefile +++ b/emulators/virtualbox-ose-kmod-legacy/Makefile @@ -7,7 +7,7 @@ PORTNAME= virtualbox-ose DISTVERSION= 3.2.12 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= emulators kld MASTER_SITES= http://tmp.chruetertee.ch/ \ http://freebsd.unixfreunde.de/sources/ \ diff --git a/emulators/virtualbox-ose-kmod-legacy/files/patch-src-VBox-Runtime-r0drv-freebsd-mp-r0drv-freebsd.c b/emulators/virtualbox-ose-kmod-legacy/files/patch-src-VBox-Runtime-r0drv-freebsd-mp-r0drv-freebsd.c new file mode 100644 index 000000000000..b089715a27ec --- /dev/null +++ b/emulators/virtualbox-ose-kmod-legacy/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 2010-12-01 18:09:43.000000000 +0100 ++++ src/VBox/Runtime/r0drv/freebsd/mp-r0drv-freebsd.c 2011-06-27 16:13:16.000000000 +0200 +@@ -163,17 +163,26 @@ + /* Will panic if no rendezvouing 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 @@ + + 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 @@ + 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 @@ + + RTDECL(int) RTMpPokeCpu(RTCPUID idCpu) + { ++#if __FreeBSD_version >= 900000 ++ cpuset_t Mask; ++#else + cpumask_t Mask; ++#endif + + /* Will panic if no rendezvouing 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; |