Changeset 54448 in vbox
- Timestamp:
- Feb 24, 2015 2:06:20 PM (10 years ago)
- svn:sync-xref-src-repo-rev:
- 98551
- Location:
- trunk/src/VBox/HostDrivers/Support
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/Support/SUPDrvGip.cpp
r54447 r54448 773 773 774 774 /* 775 * If we got a power event, stop the refinement process. 776 */ 777 if (pDevExt->fInvTscRefinePowerEvent) 778 { 779 int rc = RTTimerStop(pTimer); AssertRC(rc); 780 return; 781 } 782 783 /* 775 784 * Try get close to the next clock tick as usual. 776 785 * … … 846 855 SUPR0Printf("vboxdrv: start: %u, %u, %#llx stop: %u, %u, %#llx\n", 847 856 iStartCpuSet, iStartGipCpu, iStartTscDelta, iStopCpuSet, iStopGipCpu, iStopTscDelta); 848 int rc = RTTimerStop(pTimer); 849 AssertRC(rc); 857 int rc = RTTimerStop(pTimer); AssertRC(rc); 850 858 return; 851 859 } … … 882 890 883 891 /** 892 * @callback_method_impl{FNRTPOWERNOTIFICATION} 893 */ 894 static DECLCALLBACK(void) supdrvGipPowerNotificationCallback(RTPOWEREVENT enmEvent, void *pvUser) 895 { 896 PSUPDRVDEVEXT pDevExt = (PSUPDRVDEVEXT)pvUser; 897 898 /* 899 * If the TSC frequency refinement timer we need to cancel it so it doesn't screw 900 * up the frequency after a long suspend. 901 */ 902 if ( enmEvent == RTPOWEREVENT_SUSPEND 903 || enmEvent == RTPOWEREVENT_RESUME) 904 ASMAtomicWriteBool(&pDevExt->fInvTscRefinePowerEvent, true); 905 } 906 907 908 /** 884 909 * Start the TSC-frequency refinment timer for the invariant TSC GIP mode. 885 910 * … … 896 921 RTCCUINTREG uFlags; 897 922 int rc; 923 924 /* 925 * Register a power management callback. 926 */ 927 pDevExt->fInvTscRefinePowerEvent = true; 928 rc = RTPowerNotificationRegister(supdrvGipPowerNotificationCallback, pDevExt); 929 AssertRC(rc); /* ignore */ 898 930 899 931 /* -
trunk/src/VBox/HostDrivers/Support/SUPDrvInternal.h
r54375 r54448 708 708 /** Pointer to the timer used to refine the TSC frequency. */ 709 709 PRTTIMER pInvarTscRefineTimer; 710 /** Stop the timer on the next tick because we saw a power event. */ 711 bool volatile fInvTscRefinePowerEvent; 710 712 /** @} */ 711 713 712 714 /** @name TSC-delta measurement. 713 715 * @{ */ 716 /** Number of online/offline events, incremented each time a CPU goes online 717 * or offline. */ 718 uint32_t volatile cMpOnOffEvents; 714 719 /** TSC-delta measurement mutext. 715 720 * At the moment, we don't want to have more than one measurement going on at … … 721 726 RTSEMFASTMUTEX mtxTscDelta; 722 727 #endif 723 /** Number of online/offline events, incremented each time a CPU goes online724 * or offline. */725 uint32_t volatile cMpOnOffEvents;726 728 /** The set of CPUs we need to take measurements for. */ 727 729 RTCPUSET TscDeltaCpuSet;
Note:
See TracChangeset
for help on using the changeset viewer.