u64 next_check;
unsigned long throttle_count;
+ unsigned long last_throttle_count;
};
static DEFINE_PER_CPU(struct thermal_state, thermal_state);
if (is_throttled)
state->throttle_count++;
- if (!(was_throttled ^ is_throttled) &&
- time_before64(now, state->next_check))
+ if (time_before64(now, state->next_check) &&
+ state->throttle_count != state->last_throttle_count)
return 0;
state->next_check = now + CHECK_INTERVAL;
+ state->last_throttle_count = state->throttle_count;
/* if we just entered the thermal event */
if (is_throttled) {