Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 716524
Collapse All | Expand All

(-)a/vboxdrv/include/iprt/time.h (-3 / +7 lines)
Lines 366-371 Link Here
366
 * @param   pTime       The time spec to interpret.
366
 * @param   pTime       The time spec to interpret.
367
 * @param   pTimeval    Where to store the time as POSIX timeval.
367
 * @param   pTimeval    Where to store the time as POSIX timeval.
368
 */
368
 */
369
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 5, 99)
369
DECLINLINE(struct timeval *) RTTimeSpecGetTimeval(PCRTTIMESPEC pTime, struct timeval *pTimeval)
370
DECLINLINE(struct timeval *) RTTimeSpecGetTimeval(PCRTTIMESPEC pTime, struct timeval *pTimeval)
370
{
371
{
371
    int64_t i64 = RTTimeSpecGetMicro(pTime);
372
    int64_t i64 = RTTimeSpecGetMicro(pTime);
Lines 392-403 Link Here
392
{
393
{
393
    return RTTimeSpecAddMicro(RTTimeSpecSetSeconds(pTime, pTimeval->tv_sec), pTimeval->tv_usec);
394
    return RTTimeSpecAddMicro(RTTimeSpecSetSeconds(pTime, pTimeval->tv_sec), pTimeval->tv_usec);
394
}
395
}
396
#endif
395
#endif /* various ways of detecting struct timeval */
397
#endif /* various ways of detecting struct timeval */
396
398
397
399
398
/* PORTME: Add struct timespec guard macro here. */
400
/* PORTME: Add struct timespec guard macro here. */
399
#if defined(RTTIME_INCL_TIMESPEC) || defined(_STRUCT_TIMESPEC) || defined(_SYS__TIMESPEC_H_) || defined(TIMEVAL_TO_TIMESPEC) || defined(_TIMESPEC) \
401
#if defined(RTTIME_INCL_TIMESPEC) || defined(_STRUCT_TIMESPEC) || defined(_SYS__TIMESPEC_H_) || defined(TIMEVAL_TO_TIMESPEC) || defined(_TIMESPEC) \
400
 || (defined(RT_OS_NETBSD) && defined(_SYS_TIME_H_))
402
 || (defined(RT_OS_NETBSD) && defined(_SYS_TIME_H_))
403
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 5, 99)
401
/**
404
/**
402
 * Gets the time as POSIX timespec.
405
 * Gets the time as POSIX timespec.
403
 *
406
 *
Lines 431-446 Link Here
431
{
434
{
432
    return RTTimeSpecAddNano(RTTimeSpecSetSeconds(pTime, pTimespec->tv_sec), pTimespec->tv_nsec);
435
    return RTTimeSpecAddNano(RTTimeSpecSetSeconds(pTime, pTimespec->tv_sec), pTimespec->tv_nsec);
433
}
436
}
437
#endif
434
438
435
439
440
#endif /* various ways of detecting struct timespec */
441
436
# ifdef _LINUX_TIME64_H
442
# ifdef _LINUX_TIME64_H
437
DECLINLINE(PRTTIMESPEC) RTTimeSpecSetTimespec64(PRTTIMESPEC pTime, const struct timespec64 *pTimeval)
443
DECLINLINE(PRTTIMESPEC) RTTimeSpecSetTimespec64(PRTTIMESPEC pTime, const struct timespec64 *pTimeval)
438
{
444
{
439
    return RTTimeSpecAddNano(RTTimeSpecSetSeconds(pTime, pTimeval->tv_sec), pTimeval->tv_nsec);
445
    return RTTimeSpecAddNano(RTTimeSpecSetSeconds(pTime, pTimeval->tv_sec), pTimeval->tv_nsec);
440
}
446
}
441
# endif
447
#endif
442
#endif /* various ways of detecting struct timespec */
443
444
448
445
449
446
/** The offset of the unix epoch and the base for NT time (in 100ns units).
450
/** The offset of the unix epoch and the base for NT time (in 100ns units).
(-)a/vboxdrv/r0drv/linux/time-r0drv-linux.c (-2 / +2 lines)
Lines 43-50 Link Here
43
     * Use ktime_get_ts, this is also what clock_gettime(CLOCK_MONOTONIC,) is using.
43
     * Use ktime_get_ts, this is also what clock_gettime(CLOCK_MONOTONIC,) is using.
44
     */
44
     */
45
    uint64_t u64;
45
    uint64_t u64;
46
    struct timespec Ts;
46
    struct timespec64 Ts;
47
    ktime_get_ts(&Ts);
47
    ktime_get_ts64(&Ts);
48
    u64 = Ts.tv_sec * RT_NS_1SEC_64 + Ts.tv_nsec;
48
    u64 = Ts.tv_sec * RT_NS_1SEC_64 + Ts.tv_nsec;
49
    return u64;
49
    return u64;
50
50
(-)a/vboxnetadp/include/iprt/time.h (-3 / +7 lines)
Lines 366-371 Link Here
366
 * @param   pTime       The time spec to interpret.
366
 * @param   pTime       The time spec to interpret.
367
 * @param   pTimeval    Where to store the time as POSIX timeval.
367
 * @param   pTimeval    Where to store the time as POSIX timeval.
368
 */
368
 */
369
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 5, 99)
369
DECLINLINE(struct timeval *) RTTimeSpecGetTimeval(PCRTTIMESPEC pTime, struct timeval *pTimeval)
370
DECLINLINE(struct timeval *) RTTimeSpecGetTimeval(PCRTTIMESPEC pTime, struct timeval *pTimeval)
370
{
371
{
371
    int64_t i64 = RTTimeSpecGetMicro(pTime);
372
    int64_t i64 = RTTimeSpecGetMicro(pTime);
Lines 392-403 Link Here
392
{
393
{
393
    return RTTimeSpecAddMicro(RTTimeSpecSetSeconds(pTime, pTimeval->tv_sec), pTimeval->tv_usec);
394
    return RTTimeSpecAddMicro(RTTimeSpecSetSeconds(pTime, pTimeval->tv_sec), pTimeval->tv_usec);
394
}
395
}
396
#endif
395
#endif /* various ways of detecting struct timeval */
397
#endif /* various ways of detecting struct timeval */
396
398
397
399
398
/* PORTME: Add struct timespec guard macro here. */
400
/* PORTME: Add struct timespec guard macro here. */
399
#if defined(RTTIME_INCL_TIMESPEC) || defined(_STRUCT_TIMESPEC) || defined(_SYS__TIMESPEC_H_) || defined(TIMEVAL_TO_TIMESPEC) || defined(_TIMESPEC) \
401
#if defined(RTTIME_INCL_TIMESPEC) || defined(_STRUCT_TIMESPEC) || defined(_SYS__TIMESPEC_H_) || defined(TIMEVAL_TO_TIMESPEC) || defined(_TIMESPEC) \
400
 || (defined(RT_OS_NETBSD) && defined(_SYS_TIME_H_))
402
 || (defined(RT_OS_NETBSD) && defined(_SYS_TIME_H_))
403
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 5, 99)
401
/**
404
/**
402
 * Gets the time as POSIX timespec.
405
 * Gets the time as POSIX timespec.
403
 *
406
 *
Lines 431-446 Link Here
431
{
434
{
432
    return RTTimeSpecAddNano(RTTimeSpecSetSeconds(pTime, pTimespec->tv_sec), pTimespec->tv_nsec);
435
    return RTTimeSpecAddNano(RTTimeSpecSetSeconds(pTime, pTimespec->tv_sec), pTimespec->tv_nsec);
433
}
436
}
437
#endif
434
438
435
439
440
#endif /* various ways of detecting struct timespec */
441
436
# ifdef _LINUX_TIME64_H
442
# ifdef _LINUX_TIME64_H
437
DECLINLINE(PRTTIMESPEC) RTTimeSpecSetTimespec64(PRTTIMESPEC pTime, const struct timespec64 *pTimeval)
443
DECLINLINE(PRTTIMESPEC) RTTimeSpecSetTimespec64(PRTTIMESPEC pTime, const struct timespec64 *pTimeval)
438
{
444
{
439
    return RTTimeSpecAddNano(RTTimeSpecSetSeconds(pTime, pTimeval->tv_sec), pTimeval->tv_nsec);
445
    return RTTimeSpecAddNano(RTTimeSpecSetSeconds(pTime, pTimeval->tv_sec), pTimeval->tv_nsec);
440
}
446
}
441
# endif
447
#endif
442
#endif /* various ways of detecting struct timespec */
443
444
448
445
449
446
/** The offset of the unix epoch and the base for NT time (in 100ns units).
450
/** The offset of the unix epoch and the base for NT time (in 100ns units).
(-)a/vboxnetflt/include/iprt/time.h (-3 / +7 lines)
Lines 366-371 Link Here
366
 * @param   pTime       The time spec to interpret.
366
 * @param   pTime       The time spec to interpret.
367
 * @param   pTimeval    Where to store the time as POSIX timeval.
367
 * @param   pTimeval    Where to store the time as POSIX timeval.
368
 */
368
 */
369
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 5, 99)
369
DECLINLINE(struct timeval *) RTTimeSpecGetTimeval(PCRTTIMESPEC pTime, struct timeval *pTimeval)
370
DECLINLINE(struct timeval *) RTTimeSpecGetTimeval(PCRTTIMESPEC pTime, struct timeval *pTimeval)
370
{
371
{
371
    int64_t i64 = RTTimeSpecGetMicro(pTime);
372
    int64_t i64 = RTTimeSpecGetMicro(pTime);
Lines 392-403 Link Here
392
{
393
{
393
    return RTTimeSpecAddMicro(RTTimeSpecSetSeconds(pTime, pTimeval->tv_sec), pTimeval->tv_usec);
394
    return RTTimeSpecAddMicro(RTTimeSpecSetSeconds(pTime, pTimeval->tv_sec), pTimeval->tv_usec);
394
}
395
}
396
#endif
395
#endif /* various ways of detecting struct timeval */
397
#endif /* various ways of detecting struct timeval */
396
398
397
399
398
/* PORTME: Add struct timespec guard macro here. */
400
/* PORTME: Add struct timespec guard macro here. */
399
#if defined(RTTIME_INCL_TIMESPEC) || defined(_STRUCT_TIMESPEC) || defined(_SYS__TIMESPEC_H_) || defined(TIMEVAL_TO_TIMESPEC) || defined(_TIMESPEC) \
401
#if defined(RTTIME_INCL_TIMESPEC) || defined(_STRUCT_TIMESPEC) || defined(_SYS__TIMESPEC_H_) || defined(TIMEVAL_TO_TIMESPEC) || defined(_TIMESPEC) \
400
 || (defined(RT_OS_NETBSD) && defined(_SYS_TIME_H_))
402
 || (defined(RT_OS_NETBSD) && defined(_SYS_TIME_H_))
403
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 5, 99)
401
/**
404
/**
402
 * Gets the time as POSIX timespec.
405
 * Gets the time as POSIX timespec.
403
 *
406
 *
Lines 431-446 Link Here
431
{
434
{
432
    return RTTimeSpecAddNano(RTTimeSpecSetSeconds(pTime, pTimespec->tv_sec), pTimespec->tv_nsec);
435
    return RTTimeSpecAddNano(RTTimeSpecSetSeconds(pTime, pTimespec->tv_sec), pTimespec->tv_nsec);
433
}
436
}
437
#endif
434
438
435
439
440
#endif /* various ways of detecting struct timespec */
441
436
# ifdef _LINUX_TIME64_H
442
# ifdef _LINUX_TIME64_H
437
DECLINLINE(PRTTIMESPEC) RTTimeSpecSetTimespec64(PRTTIMESPEC pTime, const struct timespec64 *pTimeval)
443
DECLINLINE(PRTTIMESPEC) RTTimeSpecSetTimespec64(PRTTIMESPEC pTime, const struct timespec64 *pTimeval)
438
{
444
{
439
    return RTTimeSpecAddNano(RTTimeSpecSetSeconds(pTime, pTimeval->tv_sec), pTimeval->tv_nsec);
445
    return RTTimeSpecAddNano(RTTimeSpecSetSeconds(pTime, pTimeval->tv_sec), pTimeval->tv_nsec);
440
}
446
}
441
# endif
447
#endif
442
#endif /* various ways of detecting struct timespec */
443
444
448
445
449
446
/** The offset of the unix epoch and the base for NT time (in 100ns units).
450
/** The offset of the unix epoch and the base for NT time (in 100ns units).
(-)a/vboxdrv/r0drv/linux/memobj-r0drv-linux.c (-3 / +7 lines)
Lines 1461-1469 Link Here
1461
             * MMIO / physical memory.
1461
             * MMIO / physical memory.
1462
             */
1462
             */
1463
            Assert(pMemLnxToMap->Core.enmType == RTR0MEMOBJTYPE_PHYS && !pMemLnxToMap->Core.u.Phys.fAllocated);
1463
            Assert(pMemLnxToMap->Core.enmType == RTR0MEMOBJTYPE_PHYS && !pMemLnxToMap->Core.u.Phys.fAllocated);
1464
            pMemLnx->Core.pv = pMemLnxToMap->Core.u.Phys.uCachePolicy == RTMEM_CACHE_POLICY_MMIO
1464
            #if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0)
1465
                             ? ioremap_nocache(pMemLnxToMap->Core.u.Phys.PhysBase + offSub, cbSub)
1465
                pMemLnx->Core.pv = ioremap(pMemLnxToMap->Core.u.Phys.PhysBase + offSub, cbSub);
1466
                             : ioremap(pMemLnxToMap->Core.u.Phys.PhysBase + offSub, cbSub);
1466
            #else
1467
                pMemLnx->Core.pv = pMemLnxToMap->Core.u.Phys.uCachePolicy == RTMEM_CACHE_POLICY_MMIO
1468
                  ? ioremap_nocache(pMemLnxToMap->Core.u.Phys.PhysBase + offSub, cbSub)
1469
                  : ioremap(pMemLnxToMap->Core.u.Phys.PhysBase + offSub, cbSub);
1470
            #endif
1467
            if (pMemLnx->Core.pv)
1471
            if (pMemLnx->Core.pv)
1468
            {
1472
            {
1469
                /** @todo fix protection. */
1473
                /** @todo fix protection. */

Return to bug 716524