27 Jul, 2016

1 commit

  • Pull ACPI updates from Rafael Wysocki:
    "The new feaures here are the support for ACPI overlays (allowing ACPI
    tables to be loaded at any time from EFI variables or via configfs)
    and the LPI (Low-Power Idle) support. Also notable is the ACPI-based
    NUMA support for ARM64.

    Apart from that we have two new drivers, for the DPTF (Dynamic Power
    and Thermal Framework) power participant device and for the Intel
    Broxton WhiskeyCove PMIC, some more PMIC-related changes, support for
    the Boot Error Record Table (BERT) in APEI and support for
    platform-initiated graceful shutdown.

    Plus two new pieces of documentation and usual assorted fixes and
    cleanups in quite a few places.

    Specifics:

    - Support for ACPI SSDT overlays allowing Secondary System
    Description Tables (SSDTs) to be loaded at any time from EFI
    variables or via configfs (Octavian Purdila, Mika Westerberg).

    - Support for the ACPI LPI (Low-Power Idle) feature introduced in
    ACPI 6.0 and allowing processor idle states to be represented in
    ACPI tables in a hierarchical way (with the help of Processor
    Container objects) and support for ACPI idle states management on
    ARM64, based on LPI (Sudeep Holla).

    - General improvements of ACPI support for NUMA and ARM64 support for
    ACPI-based NUMA (Hanjun Guo, David Daney, Robert Richter).

    - General improvements of the ACPI table upgrade mechanism and ARM64
    support for that feature (Aleksey Makarov, Jon Masters).

    - Support for the Boot Error Record Table (BERT) in APEI and
    improvements of kernel messages printed by the error injection code
    (Huang Ying, Borislav Petkov).

    - New driver for the Intel Broxton WhiskeyCove PMIC operation region
    and support for the REGS operation region on Broxton, PMIC code
    cleanups (Bin Gao, Felipe Balbi, Paul Gortmaker).

    - New driver for the power participant device which is part of the
    Dynamic Power and Thermal Framework (DPTF) and DPTF-related code
    reorganization (Srinivas Pandruvada).

    - Support for the platform-initiated graceful shutdown feature
    introduced in ACPI 6.1 (Prashanth Prakash).

    - ACPI button driver update related to lid input events generated
    automatically on initialization and system resume that have been
    problematic for some time (Lv Zheng).

    - ACPI EC driver cleanups (Lv Zheng).

    - Documentation of the ACPICA release automation process and the
    in-kernel ACPI AML debugger (Lv Zheng).

    - New blacklist entry and two fixes for the ACPI backlight driver
    (Alex Hung, Arvind Yadav, Ralf Gerbig).

    - Cleanups of the ACPI pci_slot driver (Joe Perches, Paul Gortmaker).

    - ACPI CPPC code changes to make it more robust against possible
    defects in ACPI tables and new symbol definitions for PCC (Hoan
    Tran).

    - System reboot code modification to execute the ACPI _PTS (Prepare
    To Sleep) method in addition to _TTS (Ocean He).

    - ACPICA-related change to carry out lock ordering checks in ACPICA
    if ACPICA debug is enabled in the kernel (Lv Zheng).

    - Assorted minor fixes and cleanups (Andy Shevchenko, Baoquan He,
    Bhaktipriya Shridhar, Paul Gortmaker, Rafael Wysocki)"

    * tag 'acpi-4.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (71 commits)
    ACPI: enable ACPI_PROCESSOR_IDLE on ARM64
    arm64: add support for ACPI Low Power Idle(LPI)
    drivers: firmware: psci: initialise idle states using ACPI LPI
    cpuidle: introduce CPU_PM_CPU_IDLE_ENTER macro for ARM{32, 64}
    arm64: cpuidle: drop __init section marker to arm_cpuidle_init
    ACPI / processor_idle: Add support for Low Power Idle(LPI) states
    ACPI / processor_idle: introduce ACPI_PROCESSOR_CSTATE
    ACPI / DPTF: move int340x_thermal.c to the DPTF folder
    ACPI / DPTF: Add DPTF power participant driver
    ACPI / lpat: make it explicitly non-modular
    ACPI / dock: make dock explicitly non-modular
    ACPI / PCI: make pci_slot explicitly non-modular
    ACPI / PMIC: remove modular references from non-modular code
    ACPICA: Linux: Enable ACPI_MUTEX_DEBUG for Linux kernel
    ACPI: Rename configfs.c to acpi_configfs.c to prevent link error
    ACPI / debugger: Add AML debugger documentation
    ACPI: Add documentation describing ACPICA release automation
    ACPI: add support for loading SSDTs via configfs
    ACPI: add support for configfs
    efi / ACPI: load SSTDs from EFI variables
    ...

    Linus Torvalds
     

07 Jul, 2016

1 commit


28 Jun, 2016

1 commit


23 Jun, 2016

1 commit


17 May, 2016

1 commit

  • Pull ACPI updates from Rafael Wysocki:
    "The new features here are ACPI 6.1 support (and some previously
    missing bits of ACPI 6.0 support) in ACPICA and two new drivers, a
    driver for the ACPI Generic Event Device (GED) feature introduced by
    ACPI 6.1 and the INT3406 thermal driver for display thermal
    management. Also the value returned by the _HRV (hardware revision)
    ACPI object will be exported to user space via sysfs now.

    In addition to that, ACPI on ARM64 will not depend on EXPERT any more.

    The rest is mostly fixes and cleanups and some code reorganization.

    Specifics:

    - In-kernel ACPICA code update to the upstream release 20160422
    adding support for ACPI 6.1 along with some previously missing bits
    of ACPI 6.0 support, making a fair amount of fixes and cleanups and
    reducing divergences between the upstream ACPICA and the in-kernel
    code (Bob Moore, Lv Zheng, Al Stone, Aleksey Makarov, Will Miles)

    - ACPI Generic Event Device (GED) support and a fix for it (Sinan
    Kaya, Paul Gortmaker)

    - INT3406 thermal driver for display thermal management and ACPI
    backlight support code reorganization related to it (Aaron Lu, Arnd
    Bergmann)

    - Support for exporting the value returned by the _HRV (hardware
    revision) ACPI object via sysfs (Betty Dall)

    - Removal of the EXPERT dependency for ACPI on ARM64 (Mark Brown)

    - Rework of the handling of ACPI _OSI mechanism allowing the
    _OSI("Darwin") support to be overridden from the kernel command
    line among other things (Lv Zheng, Chen Yu)

    - Rework of the ACPI tables override mechanism to prepare it for the
    introduction of overlays support going forward (Lv Zheng, Rafael
    Wysocki)

    - Fixes related to the ECDT support and module-level execution of AML
    (Lv Zheng)

    - ACPI PCI interrupts management update to make it work better on
    ARM64 mostly (Sinan Kaya)

    - ACPI SRAT handling update to make the code process all entires in
    the table order regardless of the entry type (Lukasz Anaczkowski)

    - EFI power off support for full-hardware ACPI platforms that don't
    support ACPI S5 (Chen Yu)

    - Fixes and cleanups related to the ACPI core's sysfs interface (Dan
    Carpenter, Betty Dall)

    - acpi_dev_present() API rework to reduce possible confusion related
    to it (Lukas Wunner)

    - Removal of CLK_IS_ROOT from two ACPI drivers (Stephen Boyd)"

    * tag 'acpi-4.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (82 commits)
    ACPI / video: mark acpi_video_get_levels() inline
    Thermal / ACPI / video: add INT3406 thermal driver
    ACPI / GED: make evged.c explicitly non-modular
    ACPI / tables: Fix DSDT override mechanism
    ACPI / sysfs: fix error code in get_status()
    ACPICA: Update version to 20160422
    ACPICA: Move all ASCII utilities to a common file
    ACPICA: ACPI 2.0, Hardware: Add access_width/bit_offset support for acpi_hw_write()
    ACPICA: ACPI 2.0, Hardware: Add access_width/bit_offset support in acpi_hw_read()
    ACPICA: Executer: Introduce a set of macros to handle bit width mask generation
    ACPICA: Hardware: Add optimized access bit width support
    ACPICA: Utilities: Add ACPI_IS_ALIGNED() macro
    ACPICA: Renamed some #defined flag constants for clarity
    ACPICA: ACPI 6.0, tools/iasl: Add support for new resource descriptors
    ACPICA: ACPI 6.0: Update _BIX support for new package element
    ACPICA: ACPI 6.1: Support for new PCCT subtable
    ACPICA: Refactor evaluate_object to reduce nesting
    ACPICA: Divergence: remove unwanted spaces for typedef
    ACPI,PCI,IRQ: remove SCI penalize function
    ACPI,PCI,IRQ: remove redundant code in acpi_irq_penalty_init()
    ..

    Linus Torvalds
     

16 May, 2016

1 commit

  • * acpi-pci:
    ACPI,PCI,IRQ: remove SCI penalize function
    ACPI,PCI,IRQ: remove redundant code in acpi_irq_penalty_init()
    ACPI,PCI,IRQ: reduce static IRQ array size to 16
    ACPI,PCI,IRQ: reduce resource requirements

    * acpi-misc:
    ACPI / sysfs: fix error code in get_status()
    ACPI / device_sysfs: Clean up checkpatch errors
    ACPI / device_sysfs: Change _SUN and _STA show functions error return to EIO
    ACPI / device_sysfs: Add sysfs support for _HRV hardware revision
    arm64: defconfig: Enable ACPI
    ACPI / ARM64: Remove EXPERT dependency for ACPI on ARM64
    ACPI / ARM64: Don't enable ACPI by default on ARM64
    acer-wmi: Use acpi_dev_found()
    eeepc-wmi: Use acpi_dev_found()
    ACPI / utils: Rename acpi_dev_present()

    * acpi-tools:
    tools/power/acpi: close file only if it is open

    Rafael J. Wysocki
     

06 May, 2016

1 commit


05 May, 2016

3 commits

  • ACPICA commit ba60e4500053010bf775d58f6f61febbdb94d817

    New file is utascii.c

    Link: https://github.com/acpica/acpica/commit/ba60e450
    Signed-off-by: Bob Moore
    Signed-off-by: Lv Zheng
    Signed-off-by: Rafael J. Wysocki

    Bob Moore
     
  • ACPICA commit b2294cae776f5a66a7697414b21949d307e6856f

    This patch removes unwanted spaces for typedef. This solution doesn't cover
    function types.

    Note that the linuxize result of this commit is very giant and should have
    many conflicts against the current Linux upstream. Thus it is required to
    modify the linuxize result of this commit and the commits around it
    manually in order to have them merged to the Linux upstream. Since this is
    very costy, we should do this only once, and if we can't ensure to do this
    only once, we need to revert the Linux code to the wrong indentation result
    before merging the linuxize result of this commit. Lv Zheng.

    Link: https://github.com/acpica/acpica/commit/b2294cae
    Signed-off-by: Lv Zheng
    Signed-off-by: Bob Moore
    Signed-off-by: Rafael J. Wysocki

    Lv Zheng
     
  • Signed-off-by: Thomas Renninger
    Signed-off-by: Rafael J. Wysocki

    Arjun Sreedharan
     

28 Apr, 2016

5 commits

  • This more or less is a renaming and moving of functions and should not
    introduce any functional change.

    cpupower was built from cpufrequtils (which had a C library providing easy
    access to cpu frequency platform info). In the meantime it got enhanced
    by quite some neat cpuidle userspace tools.

    Now the cpu idle functions have been separated and added to the cpupower.so
    library.
    So beside an already existing public header file:
    cpufreq.h
    cpupower now also exports these cpu idle functions in:
    cpuidle.h

    Here again pasted for better review of the interfaces:

    ======================================
    int cpuidle_is_state_disabled(unsigned int cpu,
    unsigned int idlestate);
    int cpuidle_state_disable(unsigned int cpu, unsigned int idlestate,
    unsigned int disable);
    unsigned long cpuidle_state_latency(unsigned int cpu,
    unsigned int idlestate);
    unsigned long cpuidle_state_usage(unsigned int cpu,
    unsigned int idlestate);
    unsigned long long cpuidle_state_time(unsigned int cpu,
    unsigned int idlestate);
    char *cpuidle_state_name(unsigned int cpu,
    unsigned int idlestate);
    char *cpuidle_state_desc(unsigned int cpu,
    unsigned int idlestate);
    unsigned int cpuidle_state_count(unsigned int cpu);

    char *cpuidle_get_governor(void);
    char *cpuidle_get_driver(void);

    ======================================

    Signed-off-by: Thomas Renninger
    Signed-off-by: Rafael J. Wysocki

    Thomas Renninger
     
  • fix spelling mistake, avarage -> average

    Signed-off-by: Colin Ian King
    Signed-off-by: Thomas Renninger
    Signed-off-by: Rafael J. Wysocki

    Colin Ian King
     
  • The token before "-" should be the program name, no spaces allowed.
    See man(7) and lexgrog(1).

    Signed-off-by: Mattia Dongili
    Signed-off-by: Thomas Renninger
    Signed-off-by: Rafael J. Wysocki

    Mattia Dongili
     
  • The error handling in prepare_output has several issues with
    resource leaks. Ensure that filename is free'd and the directory
    stream DIR is closed before returning.

    Signed-off-by: Colin Ian King
    Signed-off-by: Thomas Renninger
    Signed-off-by: Rafael J. Wysocki

    Colin Ian King
     
  • Signed-off-by: Mattia Dongili
    Signed-off-by: Thomas Renninger
    Signed-off-by: Rafael J. Wysocki

    Mattia Dongili
     

09 Apr, 2016

2 commits

  • The logic on the test for a valid fd to close is incorrect.
    This was just a mistake and was pointed out by Colin Ian King.

    Link: https://patchwork.kernel.org/patch/8620201/
    Original-by: Colin Ian King
    Signed-off-by: Lv Zheng
    Signed-off-by: Rafael J. Wysocki

    Lv Zheng
     
  • * pm-core:
    PM / wakeirq: fix wakeirq setting after wakup re-configuration from sysfs
    PM / runtime: Document steps for device removal

    * powercap:
    powercap: intel_rapl: Add missing Haswell model

    * pm-tools:
    tools/power turbostat: work around RC6 counter wrap
    tools/power turbostat: initial KBL support
    tools/power turbostat: initial SKX support
    tools/power turbostat: decode BXT TSC frequency via CPUID
    tools/power turbostat: initial BXT support
    tools/power turbostat: print IRTL MSRs
    tools/power turbostat: SGX state should print only if --debug

    Rafael J. Wysocki
     

08 Apr, 2016

7 commits


05 Apr, 2016

2 commits

  • ACPICA commit 795e136d2ac77c1c8b091fba019b5fe36a44a323

    Fixes a problem with the merger of the two internal versions
    of this function. Make the maximum integer width (32-bit or
    64-bit) a parameter to the function so that it no longer
    exclusively uses the integer width specified in the DSDT/SSDT.
    ACPICA BZ 1260

    Link: https://github.com/acpica/acpica/commit/795e136d
    Signed-off-by: Bob Moore
    Signed-off-by: Lv Zheng
    Signed-off-by: Rafael J. Wysocki

    Bob Moore
     
  • ACPICA commit 37a1dec2391272251e59948c16c60713183ae78f

    Link: https://github.com/acpica/acpica/commit/37a1dec2
    Signed-off-by: Will Miles
    Signed-off-by: Bob Moore
    Signed-off-by: Lv Zheng
    Signed-off-by: Rafael J. Wysocki

    Will Miles
     

17 Mar, 2016

1 commit

  • Pull power management and ACPI updates from Rafael Wysocki:
    "This time the majority of changes go into cpufreq and they are
    significant.

    First off, the way CPU frequency updates are triggered is different
    now. Instead of having to set up and manage a deferrable timer for
    each CPU in the system to evaluate and possibly change its frequency
    periodically, cpufreq governors set up callbacks to be invoked by the
    scheduler on a regular basis (basically on utilization updates). The
    "old" governors, "ondemand" and "conservative", still do all of their
    work in process context (although that is triggered by the scheduler
    now), but intel_pstate does it all in the callback invoked by the
    scheduler with no need for any additional asynchronous processing.

    Of course, this eliminates the overhead related to the management of
    all those timers, but also it allows the cpufreq governor code to be
    simplified quite a bit. On top of that, the common code and data
    structures used by the "ondemand" and "conservative" governors are
    cleaned up and made more straightforward and some long-standing and
    quite annoying problems are addressed. In particular, the handling of
    governor sysfs attributes is modified and the related locking becomes
    more fine grained which allows some concurrency problems to be avoided
    (particularly deadlocks with the core cpufreq code).

    In principle, the new mechanism for triggering frequency updates
    allows utilization information to be passed from the scheduler to
    cpufreq. Although the current code doesn't make use of it, in the
    works is a new cpufreq governor that will make decisions based on the
    scheduler's utilization data. That should allow the scheduler and
    cpufreq to work more closely together in the long run.

    In addition to the core and governor changes, cpufreq drivers are
    updated too. Fixes and optimizations go into intel_pstate, the
    cpufreq-dt driver is updated on top of some modification in the
    Operating Performance Points (OPP) framework and there are fixes and
    other updates in the powernv cpufreq driver.

    Apart from the cpufreq updates there is some new ACPICA material,
    including a fix for a problem introduced by previous ACPICA updates,
    and some less significant changes in the ACPI code, like CPPC code
    optimizations, ACPI processor driver cleanups and support for loading
    ACPI tables from initrd.

    Also updated are the generic power domains framework, the Intel RAPL
    power capping driver and the turbostat utility and we have a bunch of
    traditional assorted fixes and cleanups.

    Specifics:

    - Redesign of cpufreq governors and the intel_pstate driver to make
    them use callbacks invoked by the scheduler to trigger CPU
    frequency evaluation instead of using per-CPU deferrable timers for
    that purpose (Rafael Wysocki).

    - Reorganization and cleanup of cpufreq governor code to make it more
    straightforward and fix some concurrency problems in it (Rafael
    Wysocki, Viresh Kumar).

    - Cleanup and improvements of locking in the cpufreq core (Viresh
    Kumar).

    - Assorted cleanups in the cpufreq core (Rafael Wysocki, Viresh
    Kumar, Eric Biggers).

    - intel_pstate driver updates including fixes, optimizations and a
    modification to make it enable enable hardware-coordinated P-state
    selection (HWP) by default if supported by the processor (Philippe
    Longepe, Srinivas Pandruvada, Rafael Wysocki, Viresh Kumar, Felipe
    Franciosi).

    - Operating Performance Points (OPP) framework updates to improve its
    handling of voltage regulators and device clocks and updates of the
    cpufreq-dt driver on top of that (Viresh Kumar, Jon Hunter).

    - Updates of the powernv cpufreq driver to fix initialization and
    cleanup problems in it and correct its worker thread handling with
    respect to CPU offline, new powernv_throttle tracepoint (Shilpasri
    Bhat).

    - ACPI cpufreq driver optimization and cleanup (Rafael Wysocki).

    - ACPICA updates including one fix for a regression introduced by
    previos changes in the ACPICA code (Bob Moore, Lv Zheng, David Box,
    Colin Ian King).

    - Support for installing ACPI tables from initrd (Lv Zheng).

    - Optimizations of the ACPI CPPC code (Prashanth Prakash, Ashwin
    Chaugule).

    - Support for _HID(ACPI0010) devices (ACPI processor containers) and
    ACPI processor driver cleanups (Sudeep Holla).

    - Support for ACPI-based enumeration of the AMBA bus (Graeme Gregory,
    Aleksey Makarov).

    - Modification of the ACPI PCI IRQ management code to make it treat
    255 in the Interrupt Line register as "not connected" on x86 (as
    per the specification) and avoid attempts to use that value as a
    valid interrupt vector (Chen Fan).

    - ACPI APEI fixes related to resource leaks (Josh Hunt).

    - Removal of modularity from a few ACPI drivers (BGRT, GHES,
    intel_pmic_crc) that cannot be built as modules in practice (Paul
    Gortmaker).

    - PNP framework update to make it treat ACPI_RESOURCE_TYPE_SERIAL_BUS
    as a valid resource type (Harb Abdulhamid).

    - New device ID (future AMD I2C controller) in the ACPI driver for
    AMD SoCs (APD) and in the designware I2C driver (Xiangliang Yu).

    - Assorted ACPI cleanups (Colin Ian King, Kaiyen Chang, Oleg Drokin).

    - cpuidle menu governor optimization to avoid a square root
    computation in it (Rasmus Villemoes).

    - Fix for potential use-after-free in the generic device properties
    framework (Heikki Krogerus).

    - Updates of the generic power domains (genpd) framework including
    support for multiple power states of a domain, fixes and debugfs
    output improvements (Axel Haslam, Jon Hunter, Laurent Pinchart,
    Geert Uytterhoeven).

    - Intel RAPL power capping driver updates to reduce IPI overhead in
    it (Jacob Pan).

    - System suspend/hibernation code cleanups (Eric Biggers, Saurabh
    Sengar).

    - Year 2038 fix for the process freezer (Abhilash Jindal).

    - turbostat utility updates including new features (decoding of more
    registers and CPUID fields, sub-second intervals support, GFX MHz
    and RC6 printout, --out command line option), fixes (syscall jitter
    detection and workaround, reductioin of the number of syscalls
    made, fixes related to Xeon x200 processors, compiler warning
    fixes) and cleanups (Len Brown, Hubert Chrzaniuk, Chen Yu)"

    * tag 'pm+acpi-4.6-rc1-1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (182 commits)
    tools/power turbostat: bugfix: TDP MSRs print bits fixing
    tools/power turbostat: correct output for MSR_NHM_SNB_PKG_CST_CFG_CTL dump
    tools/power turbostat: call __cpuid() instead of __get_cpuid()
    tools/power turbostat: indicate SMX and SGX support
    tools/power turbostat: detect and work around syscall jitter
    tools/power turbostat: show GFX%rc6
    tools/power turbostat: show GFXMHz
    tools/power turbostat: show IRQs per CPU
    tools/power turbostat: make fewer systems calls
    tools/power turbostat: fix compiler warnings
    tools/power turbostat: add --out option for saving output in a file
    tools/power turbostat: re-name "%Busy" field to "Busy%"
    tools/power turbostat: Intel Xeon x200: fix turbo-ratio decoding
    tools/power turbostat: Intel Xeon x200: fix erroneous bclk value
    tools/power turbostat: allow sub-sec intervals
    ACPI / APEI: ERST: Fixed leaked resources in erst_init
    ACPI / APEI: Fix leaked resources
    intel_pstate: Do not skip samples partially
    intel_pstate: Remove freq calculation from intel_pstate_calc_busy()
    intel_pstate: Move intel_pstate_calc_busy() into get_target_pstate_use_performance()
    ...

    Linus Torvalds
     

14 Mar, 2016

1 commit

  • Pull turbostat updates for 4.6 from Len Brown.

    * 'turbostat' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux:
    tools/power turbostat: bugfix: TDP MSRs print bits fixing
    tools/power turbostat: correct output for MSR_NHM_SNB_PKG_CST_CFG_CTL dump
    tools/power turbostat: call __cpuid() instead of __get_cpuid()
    tools/power turbostat: indicate SMX and SGX support
    tools/power turbostat: detect and work around syscall jitter
    tools/power turbostat: show GFX%rc6
    tools/power turbostat: show GFXMHz
    tools/power turbostat: show IRQs per CPU
    tools/power turbostat: make fewer systems calls
    tools/power turbostat: fix compiler warnings
    tools/power turbostat: add --out option for saving output in a file
    tools/power turbostat: re-name "%Busy" field to "Busy%"
    tools/power turbostat: Intel Xeon x200: fix turbo-ratio decoding
    tools/power turbostat: Intel Xeon x200: fix erroneous bclk value
    tools/power turbostat: allow sub-sec intervals
    tools/power turbostat: Decode MSR_MISC_PWR_MGMT
    tools/power turbostat: decode HWP registers
    x86 msr-index: Simplify syntax for HWP fields
    tools/power turbostat: CPUID(0x16) leaf shows base, max, and bus frequency
    tools/power turbostat: decode more CPUID fields

    Rafael J. Wysocki
     

13 Mar, 2016

12 commits

  • MSR_CONFIG_TDP_NOMINAL:
    should print all 8 bits of base_ratio (bit 0:7) 0xFF

    MSR_CONFIG_TDP_LEVEL_1:
    should print all 15 bits of PKG_MIN_PWR_LVL1 (bit 48:62) 0x7FFF
    should print all 15 bits of PKG_MAX_PWR_LVL1 (bit 32:46) 0x7FFF
    should print all 8 bits of LVL1_RATIO (bit 16:23) 0xFF
    should print all 15 bits of PKG_TDP_LVL1 (bit 0:14) 0x7FFF

    And the same modification to MSR_CONFIG_TDP_LEVEL_2.

    MSR_TURBO_ACTIVATION_RATIO:
    should print all 8 bits of MAX_NON_TURBO_RATIO (bit 0:7) 0xFF

    Signed-off-by: Chen Yu
    Signed-off-by: Len Brown

    Chen Yu
     
  • MSR_NHM_SNB_PKG_CST_CFG_CTL: 0x1e008008 (...pkg-cstate-limit=0: unlimited)
    should print as
    MSR_NHM_SNB_PKG_CST_CFG_CTL: 0x1e008008 (...pkg-cstate-limit=8: unlimited)

    Signed-off-by: Len Brown

    Len Brown
     
  • turbostat already checks whether calling each cpuid leavf is legal,
    and it doesn't look at the function return value,
    so call the simpler gcc intrinsic __cpuid() instead of __get_cpuid().

    syntax only, no functional change

    Signed-off-by: Len Brown

    Len Brown
     
  • SGX presence is related to a SKL power workaround,
    so lets show when that is enabled.

    Signed-off-by: Len Brown

    Len Brown
     
  • The accuracy of Bzy_Mhz and Busy% depend on reading
    the TSC, APERF, and MPERF close together in time.

    When there is a very short measurement interval,
    or a large system is profoundly idle, the changes
    in APERF and MPERF may be very small.
    They can be small enough that an expensive interrupt
    between reading APERF and MPERF can cause the APERF/MPERF
    ratio to become inaccurate, resulting in invalid
    calculation and display of Bzy_MHz.

    A dummy APERF read of APERF makes this problem
    much more rare. Apparently this 1st systemn call
    after exiting a long stretch of idle is when we
    typically see expensive timer interrupts that cause
    large jitter.

    For the cases that dummy APERF read fails to prevent,
    we compare the latency of the APERF and MPERF reads.
    If they differ by more than 2x, we re-issue them.

    Signed-off-by: Len Brown

    Len Brown
     
  • The column "GFX%c6" show the percentage of time the GPU
    is in the "render C6" state, rc6. Deep package C-states on several
    systems depend on the GPU being in RC6.

    This information comes from the counter
    /sys/class/drm/card0/power/rc6_residency_ms,
    as read before and after the measurement interval.

    Signed-off-by: Len Brown

    Len Brown
     
  • Under the column "GFXMHz", show a snapshot of this attribute:
    /sys/class/graphics/fb0/device/drm/card0/gt_cur_freq_mhz

    This is an instantaneous snapshot of what sysfs presents
    at the end of the measurement interval. turbostat does
    not average or otherwise perform any math on this value.

    Signed-off-by: Len Brown

    Len Brown
     
  • The new IRQ column shows how many interrupts have occurred on each CPU
    during the measurement inteval. This information comes from
    the difference between /proc/interrupts shapshots made before
    and after the measurement interval.

    The first row, the system summary, shows the sum of the IRQS
    for all CPUs during that interval.

    Signed-off-by: Len Brown

    Len Brown
     
  • skip the open(2)/close(2) on each msr read
    by keeping the /dev/cpu/*/msr files open.

    The remaining read(2) is generally far fewer cycles
    than the removed open(2) system call.

    Signed-off-by: Len Brown

    Len Brown
     
  • Signed-off-by: Len Brown

    Len Brown
     
  • By default...

    Turbostat --debug gconfiguration info goes to stderr.

    In FORK mode, turbostat statistics go to stderr.

    In PERIODIC mode, turbostat statistics go to stdout.

    These defaults do not change, but an option "--out file"
    will send all output above only to the specified file.

    Signed-off-by: Len Brown

    Len Brown
     
  • some tools processing turbostat output
    have difficulty with items that begin with %...

    Reported-by: Jacob Pan
    Signed-off-by: Len Brown

    Len Brown