[vbox-dev] Linus just broke something
walt
w41ter at gmail.com
Thu Jul 17 06:29:06 PDT 2008
There has been a recent change to one of the linux kernel header files,
include/linux/smp.h:
commit 15c8b6c1aaaf1c4edd67e2f02e4d8e1bd1a51c0d
Author: Jens Axboe <jens.axboe at oracle.com>
Date: Fri May 9 09:39:44 2008 +0200
on_each_cpu(): kill unused 'retry' parameter
It's not even passed on to smp_call_function() anymore, since that
was removed. So kill it.
That change breaks src/VBox/Runtime/r0drv/linux/mp-r0drv-linux.c.
This fixes the compilation problem, but I don't know if it's the right
way to do it. Also, the changes need to be #ifdef'd for the kernel
version >=(2, 6, 26), which I'll try to do after work today:
--- src/VBox/Runtime/r0drv/linux/mp-r0drv-linux.c (revision 10644)
+++ src/VBox/Runtime/r0drv/linux/mp-r0drv-linux.c (working copy)
@@ -194,14 +194,14 @@
Args.cHits = 0;
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0)
- rc = on_each_cpu(rtmpLinuxWrapper, &Args, 0 /* retry */, 1 /* wait */);
+ rc = on_each_cpu(rtmpLinuxWrapper, &Args, 1 /* wait */);
#else /* older kernels */
# ifdef preempt_disable
preempt_disable();
# endif
- rc = smp_call_function(rtmpLinuxWrapper, &Args, 0 /* retry */, 1 /* wait */);
+ rc = smp_call_function(rtmpLinuxWrapper, &Args, 1 /* wait */);
local_irq_disable();
rtmpLinuxWrapper(&Args);
local_irq_enable();
@@ -228,7 +228,7 @@
# ifdef preempt_disable
preempt_disable();
# endif
- rc = smp_call_function(rtmpLinuxWrapper, &Args, 0 /* retry */, 1 /* wait */);
+ rc = smp_call_function(rtmpLinuxWrapper, &Args, 1 /* wait */);
# ifdef preempt_enable
preempt_enable();
# endif
@@ -281,9 +281,9 @@
if (RTMpIsCpuOnline(idCpu))
{
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 19)
- rc = smp_call_function_single(idCpu, rtmpLinuxWrapper, &Args, 0 /* retry */, 1 /* wait */);
+ rc = smp_call_function_single(idCpu, rtmpLinuxWrapper, &Args, 1 /* wait */);
#else
- rc = smp_call_function(rtmpOnSpecificLinuxWrapper, &Args, 0 /* retry */, 1 /* wait */);
+ rc = smp_call_function(rtmpOnSpecificLinuxWrapper, &Args, 1 /* wait */);
#endif
Assert(rc == 0);
rc = Args.cHits ? VINF_SUCCESS : VERR_CPU_OFFLINE;
More information about the vbox-dev
mailing list