Changeset 53473 in vbox
- Timestamp:
- Dec 6, 2014 4:01:02 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/Support/SUPDrv.c
r53469 r53473 6167 6167 if ( u64DeltaTsc < UINT64_MAX / RT_NS_1SEC 6168 6168 && u64DeltaNanoTS < UINT32_MAX) 6169 pGip->u64CpuHz = ASMMultU64ByU32DivByU32(u64DeltaTsc, RT_NS_1SEC, u64DeltaNanoTS);6169 pGip->u64CpuHz = ASMMultU64ByU32DivByU32(u64DeltaTsc, RT_NS_1SEC, (uint32_t)u64DeltaNanoTS); 6170 6170 else 6171 6171 { … … 6173 6173 if ( u64DeltaTsc < UINT64_MAX / RT_NS_100MS 6174 6174 && u64DeltaNanoTS / 10 < UINT32_MAX) 6175 pGip->u64CpuHz = ASMMultU64ByU32DivByU32(u64DeltaTsc, RT_NS_100MS, u64DeltaNanoTS / 10);6175 pGip->u64CpuHz = ASMMultU64ByU32DivByU32(u64DeltaTsc, RT_NS_100MS, (uint32_t)(u64DeltaNanoTS / 10)); 6176 6176 else if ( u64DeltaTsc < UINT64_MAX / RT_NS_10MS 6177 6177 && u64DeltaNanoTS / 100 < UINT32_MAX) 6178 pGip->u64CpuHz = ASMMultU64ByU32DivByU32(u64DeltaTsc, RT_NS_10MS, u64DeltaNanoTS / 100);6178 pGip->u64CpuHz = ASMMultU64ByU32DivByU32(u64DeltaTsc, RT_NS_10MS, (uint32_t)(u64DeltaNanoTS / 100)); 6179 6179 else if ( u64DeltaTsc < UINT64_MAX / RT_NS_1MS 6180 6180 && u64DeltaNanoTS / 1000 < UINT32_MAX) 6181 pGip->u64CpuHz = ASMMultU64ByU32DivByU32(u64DeltaTsc, RT_NS_1MS, u64DeltaNanoTS / 1000);6181 pGip->u64CpuHz = ASMMultU64ByU32DivByU32(u64DeltaTsc, RT_NS_1MS, (uint32_t)(u64DeltaNanoTS / 1000)); 6182 6182 else /* Screw it. */ 6183 6183 pGip->u64CpuHz = u64DeltaTsc / (u64DeltaNanoTS / RT_NS_1SEC_64); … … 7934 7934 while (cTries-- > 0) 7935 7935 { 7936 int rc2; 7937 uint16_t iCpu; 7938 7936 7939 rc = SUPGetTsc(&uTsc, &idApic); 7937 7940 if (RT_SUCCESS(rc)) … … 7943 7946 7944 7947 /* If we failed to have a TSC-delta, measurement the TSC-delta and retry. */ 7945 int rc2;7946 uint16_t iCpu;7947 7948 AssertMsgReturn(idApic < RT_ELEMENTS(pGip->aiCpuFromApicId), 7948 7949 ("idApic=%u ArraySize=%u\n", idApic, RT_ELEMENTS(pGip->aiCpuFromApicId)), VERR_INVALID_CPU_INDEX);
Note:
See TracChangeset
for help on using the changeset viewer.