intel_cstates: ignore negative time-delta values
I have no idea why this can happen or if there is a deeper problem. Should fix #16546. Change-Id: Ia160e293eabefae636ce4c861864c99b0aaa68db Reviewed-on: https://review.haiku-os.org/c/haiku/+/3717 Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
This commit is contained in:
parent
e03da2bd84
commit
5504fc757c
@ -100,7 +100,9 @@ cstates_idle(void)
|
||||
bigtime_t delta = system_time() - start;
|
||||
locker.Unlock();
|
||||
|
||||
sIdleTime[cpu] = (idleTime + delta) / 2;
|
||||
// Negative delta shouldn't happen, but apparently it does...
|
||||
if (delta >= 0)
|
||||
sIdleTime[cpu] = (idleTime + delta) / 2;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user