[vbox-dev] Patch for kernel 4.15-rc1
Gianfranco Costamagna
locutusofborg at debian.org
Fri Dec 1 13:50:37 UTC 2017
Hello,
>I had that part. It fails build because the parameter of
>rtTimerLinuxStdCallback() needs to be "struct timer_list *t". The part I have
>not gotten right is how one uses that "t" to get the correct value of pSubTimer
>from "t" using the from_timer() macro.
indeed...
maybe something like this? (sorry can't check right now)
@@ -720,10 +720,18 @@ static enum hrtimer_restart rtTimerLinuxHrCallback(struct hrtimer *pHrTimer)
*
* @param ulUser Address of the sub-timer structure.
*/
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
+static void rtTimerLinuxStdCallback(struct timer_list *ulUser)
+#else
static void rtTimerLinuxStdCallback(unsigned long ulUser)
+#endif
{
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
+ PRTTIMER pTimer = from_timer(pTimer, ulUser, aSubTimers[iCpu].u.Std.LnxTimer);
+#else
PRTTIMERLNXSUBTIMER pSubTimer = (PRTTIMERLNXSUBTIMER)ulUser;
PRTTIMER pTimer = pSubTimer->pParent;
+#endif
RTTIMERLNX_LOG(("stdcallback %p\n", pTimer));
if (RT_UNLIKELY(!rtTimerLnxChangeToCallbackState(pSubTimer)))
G.
More information about the vbox-dev
mailing list