• Chen Yu's avatar
    tools/power turbostat: Do not print negative LPI residency · 227ed18f
    Chen Yu authored
    turbostat prints the abnormal SYS%LPI across suspend-to-idle:
    SYS%LPI = 114479815993277.50
    
    This is reproduced by:
    Run a freeze cycle, e.g. "sleepgraph -m freeze -rtcwake 15".
    Then do a reboot. After boot up, launch the suspend-idle-idle
    and check the SYS%LPI field.
    
    The slp_so residence counter is in LPIT table, and BIOS does not
    clears this register across reset. The PMC expects the OS to calculate
    the LPI residency based on the delta. However, there is an firmware
    issue that the LPIT gets cleared to 0 during the second suspend
    to idle after the reboot, which brings negative delta value.
    
    [lenb: updated to print "neg" upon this BIOS failure]
    Reported-by: default avatarTodd Brandt <todd.e.brandt@intel.com>
    Signed-off-by: default avatarChen Yu <yu.c.chen@intel.com>
    Signed-off-by: default avatarLen Brown <len.brown@intel.com>
    227ed18f
turbostat.c 180 KB