Changeset 83471 in vbox for trunk/src/VBox/Runtime/r0drv
- Timestamp:
- Mar 27, 2020 3:49:44 PM (5 years ago)
- Location:
- trunk/src/VBox/Runtime/r0drv/linux
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c
r82968 r83471 1462 1462 */ 1463 1463 Assert(pMemLnxToMap->Core.enmType == RTR0MEMOBJTYPE_PHYS && !pMemLnxToMap->Core.u.Phys.fAllocated); 1464 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 25) 1465 /* 1466 * ioremap() defaults to no caching since the 2.6 kernels. 1467 * ioremap_nocache() has been removed finally in 5.6-rc1. 1468 */ 1469 pMemLnx->Core.pv = pMemLnxToMap->Core.u.Phys.uCachePolicy == RTMEM_CACHE_POLICY_MMIO 1470 ? ioremap(pMemLnxToMap->Core.u.Phys.PhysBase + offSub, cbSub) 1471 : ioremap_cache(pMemLnxToMap->Core.u.Phys.PhysBase + offSub, cbSub); 1472 #else /* KERNEL_VERSION < 2.6.25 */ 1464 1473 pMemLnx->Core.pv = pMemLnxToMap->Core.u.Phys.uCachePolicy == RTMEM_CACHE_POLICY_MMIO 1465 1474 ? ioremap_nocache(pMemLnxToMap->Core.u.Phys.PhysBase + offSub, cbSub) 1466 1475 : ioremap(pMemLnxToMap->Core.u.Phys.PhysBase + offSub, cbSub); 1476 #endif /* KERNEL_VERSION < 2.6.25 */ 1467 1477 if (pMemLnx->Core.pv) 1468 1478 { -
trunk/src/VBox/Runtime/r0drv/linux/time-r0drv-linux.c
r82968 r83471 39 39 DECLINLINE(uint64_t) rtTimeGetSystemNanoTS(void) 40 40 { 41 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 16) /* This must match timer-r0drv-linux.c! */ 41 #if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0) 42 /* 43 * Starting with kernel version 5.6-rc3 only 64-bit time interfaces 44 * are allowed in the kernel. 45 */ 46 uint64_t u64; 47 struct timespec64 Ts = { 0, 0 }; 48 49 ktime_get_ts64(&Ts); 50 u64 = Ts.tv_sec * RT_NS_1SEC_64 + Ts.tv_nsec; 51 return u64; 52 53 #elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 16) /* This must match timer-r0drv-linux.c! */ 42 54 /* 43 55 * Use ktime_get_ts, this is also what clock_gettime(CLOCK_MONOTONIC,) is using. 44 56 */ 45 57 uint64_t u64; 46 struct timespec Ts ;58 struct timespec Ts = { 0, 0 }; 47 59 ktime_get_ts(&Ts); 48 60 u64 = Ts.tv_sec * RT_NS_1SEC_64 + Ts.tv_nsec;
Note:
See TracChangeset
for help on using the changeset viewer.