11 Nov, 2020

2 commits

  • Pull turbostat updates from Len Brown:
    "Update update to version 20.09.30, one kernel side fix"

    * 'turbostat' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux:
    tools/power turbostat: update version number
    powercap: restrict energy meter to root access
    tools/power turbostat: harden against cpu hotplug
    tools/power turbostat: adjust for temperature offset
    tools/power turbostat: Build with _FILE_OFFSET_BITS=64
    tools/power turbostat: Support AMD Family 19h
    tools/power turbostat: Remove empty columns for Jacobsville
    tools/power turbostat: Add a new GFXAMHz column that exposes gt_act_freq_mhz.
    tools/power x86_energy_perf_policy: Input/output error in a VM
    tools/power turbostat: Skip pc8, pc9, pc10 columns, if they are disabled
    tools/power turbostat: Support additional CPU model numbers
    tools/power turbostat: Fix output formatting for ACPI CST enumeration
    tools/power turbostat: Replace HTTP links with HTTPS ones: TURBOSTAT UTILITY
    tools/power turbostat: Use sched_getcpu() instead of hardcoded cpu 0
    tools/power turbostat: Enable accumulate RAPL display
    tools/power turbostat: Introduce functions to accumulate RAPL consumption
    tools/power turbostat: Make the energy variable to be 64 bit
    tools/power turbostat: Always print idle in the system configuration header
    tools/power turbostat: Print /dev/cpu_dma_latency

    Linus Torvalds
     
  • goodbye summer...

    Signed-off-by: Len Brown

    Len Brown
     

24 Oct, 2020

4 commits

  • Pull more power management updates from Rafael Wysocki:
    "First of all, the adaptive voltage scaling (AVS) drivers go to new
    platform-specific locations as planned (this part was reported to have
    merge conflicts against the new arm-soc updates in linux-next).

    In addition to that, there are some fixes (intel_idle, intel_pstate,
    RAPL, acpi_cpufreq), the addition of on/off notifiers and idle state
    accounting support to the generic power domains (genpd) code and some
    janitorial changes all over.

    Specifics:

    - Move the AVS drivers to new platform-specific locations and get rid
    of the drivers/power/avs directory (Ulf Hansson).

    - Add on/off notifiers and idle state accounting support to the
    generic power domains (genpd) framework (Ulf Hansson, Lina Iyer).

    - Ulf will maintain the PM domain part of cpuidle-psci (Ulf Hansson).

    - Make intel_idle disregard ACPI _CST if it cannot use the data
    returned by that method (Mel Gorman).

    - Modify intel_pstate to avoid leaving useless sysfs directory
    structure behind if it cannot be registered (Chen Yu).

    - Fix domain detection in the RAPL power capping driver and prevent
    it from failing to enumerate the Psys RAPL domain (Zhang Rui).

    - Allow acpi-cpufreq to use ACPI _PSD information with Family 19 and
    later AMD chips (Wei Huang).

    - Update the driver assumptions comment in intel_idle and fix a
    kerneldoc comment in the runtime PM framework (Alexander Monakov,
    Bean Huo).

    - Avoid unnecessary resets of the cached frequency in the schedutil
    cpufreq governor to reduce overhead (Wei Wang).

    - Clean up the cpufreq core a bit (Viresh Kumar).

    - Make assorted minor janitorial changes (Daniel Lezcano, Geert
    Uytterhoeven, Hubert Jasudowicz, Tom Rix).

    - Clean up and optimize the cpupower utility somewhat (Colin Ian
    King, Martin Kaistra)"

    * tag 'pm-5.10-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (23 commits)
    PM: sleep: remove unreachable break
    PM: AVS: Drop the avs directory and the corresponding Kconfig
    PM: AVS: qcom-cpr: Move the driver to the qcom specific drivers
    PM: runtime: Fix typo in pm_runtime_set_active() helper comment
    PM: domains: Fix build error for genpd notifiers
    powercap: Fix typo in Kconfig "Plance" -> "Plane"
    cpufreq: schedutil: restore cached freq when next_f is not changed
    acpi-cpufreq: Honor _PSD table setting on new AMD CPUs
    PM: AVS: smartreflex Move driver to soc specific drivers
    PM: AVS: rockchip-io: Move the driver to the rockchip specific drivers
    PM: domains: enable domain idle state accounting
    PM: domains: Add curly braces to delimit comment + statement block
    PM: domains: Add support for PM domain on/off notifiers for genpd
    powercap/intel_rapl: enumerate Psys RAPL domain together with package RAPL domain
    powercap/intel_rapl: Fix domain detection
    intel_idle: Ignore _CST if control cannot be taken from the platform
    cpuidle: Remove pointless stub
    intel_idle: mention assumption that WBINVD is not needed
    MAINTAINERS: Add section for cpuidle-psci PM domain
    cpufreq: intel_pstate: Delete intel_pstate sysfs if failed to register the driver
    ...

    Linus Torvalds
     
  • turbostat tends to get confused when CPUs are added and removed
    while it is running.

    There are races, such as checking the current cpu, and then
    reading a sysfs file that depends on that cpu number.

    Close the two issues that seem to come up the most.
    First, there is an infinite reset loop detector --
    change that to allow more resets before giving up.
    Secondly, one of those file reads didn't really need
    to exit the program on failure...

    Signed-off-by: Len Brown

    Len Brown
     
  • cpu1: MSR_IA32_TEMPERATURE_TARGET: 0x05640000 (95 C) (100 default - 5 offset)

    Account for the new "offset" field in MSR_TEMPERATURE_TARGET.
    While this field is usually zero, ignoring it results in over-stating
    the current temperature, both per-core and per-package.

    Signed-off-by: Len Brown

    Len Brown
     
  • * pm-core:
    PM: runtime: Fix typo in pm_runtime_set_active() helper comment

    * pm-sleep:
    PM: sleep: remove unreachable break

    * pm-tools:
    cpupower: speed up generating git version string
    cpupowerutils: fix spelling mistake "dependant" -> "dependent"

    * powercap:
    powercap: Fix typo in Kconfig "Plance" -> "Plane"
    powercap/intel_rapl: enumerate Psys RAPL domain together with package RAPL domain
    powercap/intel_rapl: Fix domain detection

    Rafael J. Wysocki
     

16 Oct, 2020

1 commit


15 Oct, 2020

3 commits

  • …/kernel/git/shuah/linux-kselftest

    Pull kselftest updates from Shuah Khan:

    - a selftests harness fix to flush stdout before forking to avoid
    parent and child printing duplicates messages. This is evident when
    test output is redirected to a file.

    - a tools/ wide change to avoid comma separated statements from Joe
    Perches. This fix spans tools/lib, tools/power/cpupower, and
    selftests.

    * tag 'linux-kselftest-fixes-5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest:
    tools: Avoid comma separated statements
    selftests/harness: Flush stdout before forking

    Linus Torvalds
     
  • Pull ACPI updates from Rafael Wysocki:
    "These add support for generic initiator-only proximity domains to the
    ACPI NUMA code and the architectures using it, clean up some
    non-ACPICA code referring to debug facilities from ACPICA, reduce the
    overhead related to accessing GPE registers, add a new DPTF (Dynamic
    Power and Thermal Framework) participant driver, update the ACPICA
    code in the kernel to upstream revision 20200925, add a new ACPI
    backlight whitelist entry, fix a few assorted issues and clean up some
    code.

    Specifics:

    - Add support for generic initiator-only proximity domains to the
    ACPI NUMA code and the architectures using it (Jonathan Cameron)

    - Clean up some non-ACPICA code referring to debug facilities from
    ACPICA that are not actually used in there (Hanjun Guo)

    - Add new DPTF driver for the PCH FIVR participant (Srinivas
    Pandruvada)

    - Reduce overhead related to accessing GPE registers in ACPICA and
    the OS interface layer and make it possible to access GPE registers
    using logical addresses if they are memory-mapped (Rafael Wysocki)

    - Update the ACPICA code in the kernel to upstream revision 20200925
    including changes as follows:
    + Add predefined names from the SMBus sepcification (Bob Moore)
    + Update acpi_help UUID list (Bob Moore)
    + Return exceptions for string-to-integer conversions in iASL (Bob
    Moore)
    + Add a new "ALL " debugger command (Bob Moore)
    + Add support for 64 bit risc-v compilation (Colin Ian King)
    + Do assorted cleanups (Bob Moore, Colin Ian King, Randy Dunlap)

    - Add new ACPI backlight whitelist entry for HP 635 Notebook (Alex
    Hung)

    - Move TPS68470 OpRegion driver to drivers/acpi/pmic/ and split out
    Kconfig and Makefile specific for ACPI PMIC (Andy Shevchenko)

    - Clean up the ACPI SoC driver for AMD SoCs (Hanjun Guo)

    - Add missing config_item_put() to fix refcount leak (Hanjun Guo)

    - Drop lefrover field from struct acpi_memory_device (Hanjun Guo)

    - Make the ACPI extlog driver check for RDMSR failures (Ben
    Hutchings)

    - Fix handling of lid state changes in the ACPI button driver when
    input device is closed (Dmitry Torokhov)

    - Fix several assorted build issues (Barnabás Pőcze, John Garry,
    Nathan Chancellor, Tian Tao)

    - Drop unused inline functions and reduce code duplication by using
    kobj_to_dev() in the NFIT parsing code (YueHaibing, Wang Qing)

    - Serialize tools/power/acpi Makefile (Thomas Renninger)"

    * tag 'acpi-5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (64 commits)
    ACPICA: Update version to 20200925 Version 20200925
    ACPICA: Remove unnecessary semicolon
    ACPICA: Debugger: Add a new command: "ALL "
    ACPICA: iASL: Return exceptions for string-to-integer conversions
    ACPICA: acpi_help: Update UUID list
    ACPICA: Add predefined names found in the SMBus sepcification
    ACPICA: Tree-wide: fix various typos and spelling mistakes
    ACPICA: Drop the repeated word "an" in a comment
    ACPICA: Add support for 64 bit risc-v compilation
    ACPI: button: fix handling lid state changes when input device closed
    tools/power/acpi: Serialize Makefile
    ACPI: scan: Replace ACPI_DEBUG_PRINT() with pr_debug()
    ACPI: memhotplug: Remove 'state' from struct acpi_memory_device
    ACPI / extlog: Check for RDMSR failure
    ACPI: Make acpi_evaluate_dsm() prototype consistent
    docs: mm: numaperf.rst Add brief description for access class 1.
    node: Add access1 class to represent CPU to memory characteristics
    ACPI: HMAT: Fix handling of changes from ACPI 6.2 to ACPI 6.3
    ACPI: Let ACPI know we support Generic Initiator Affinity Structures
    x86: Support Generic Initiator only proximity domains
    ...

    Linus Torvalds
     
  • …ernel/git/pdx86/platform-drivers-x86

    Pull x86 platform driver updates from Hans de Goede:
    "Rather calm cycle for x86 platform drivers, all these have been in
    for-next for a couple of days with no bot complaints.

    Highlights:

    - PMC TigerLake fixes and new RocketLake support

    - various small fixes / updates in other drivers/tools"

    * tag 'platform-drivers-x86-v5.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86:
    MAINTAINERS: update X86 PLATFORM DRIVERS entry with new kernel.org git repo
    platform/x86: mlx-platform: Add capability field to platform FAN description
    platform_data/mlxreg: Extend core platform structure
    platform_data/mlxreg: Update module license
    platform/x86: mlx-platform: Remove PSU EEPROM configuration
    MAINTAINERS: Update maintainers for pmc_core driver
    platform/x86: intel_pmc_core: fix: Replace dev_dbg macro with dev_info()
    platform/x86: intel_pmc_core: Add Intel RocketLake (RKL) support
    platform/x86: intel_pmc_core: Clean up: Remove the duplicate comments and reorganize
    platform/x86: intel_pmc_core: Fix the slp_s0 counter displayed value
    platform/x86: intel_pmc_core: Fix TigerLake power gating status map
    platform/x86: pmc_core: Use descriptive names for LPM registers
    tools/power/x86/intel-speed-select: Update version for v5.10
    tools/power/x86/intel-speed-select: Fix missing base-freq core IDs
    platform/x86: hp-wmi: add support for thermal policy

    Linus Torvalds
     

13 Oct, 2020

1 commit


09 Oct, 2020

1 commit


08 Oct, 2020

2 commits


03 Oct, 2020

2 commits

  • Before this patch you get tools/power/acpi/Makefile.rules
    included in parallel trying to copy KERNEL_INCLUDE multiple
    times:

    make -j20 acpi
    DESCEND power/acpi
    DESCEND tools/acpidbg
    DESCEND tools/acpidump
    DESCEND tools/ec
    MKDIR include
    MKDIR include
    MKDIR include
    CP include
    CP include
    cp: cannot create directory '/home/abuild/rpmbuild/BUILD/linux-5.7.7+git20200917.10b82d517648/tools/power/acpi/include/acpi': File exists
    make[2]: *** [../../Makefile.rules:20: /home/abuild/rpmbuild/BUILD/linux-5.7.7+git20200917.10b82d517648/tools/power/acpi/include] Error 1
    make[1]: *** [Makefile:16: acpidbg] Error 2
    make[1]: *** Waiting for unfinished jobs....

    with this patch each subdirectory will be processed serialized:

    DESCEND power/acpi
    DESCEND tools/acpidbg
    MKDIR include
    CP include
    CC tools/acpidbg/acpidbg.o
    LD acpidbg
    STRIP acpidbg
    DESCEND tools/acpidump
    CC tools/acpidump/apdump.o
    ...
    LD acpidump
    STRIP acpidump
    DESCEND tools/ec
    CC tools/ec/ec_access.o
    LD ec
    STRIP ec

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

    Thomas Renninger
     
  • Use semicolons and braces.

    Signed-off-by: Joe Perches
    Signed-off-by: Shuah Khan

    Joe Perches
     

04 Sep, 2020

15 commits

  • For compatibility reasons, Glibc off_t is a 32-bit type on 32-bit x86
    unless _FILE_OFFSET_BITS=64 is defined. Add this define, as otherwise
    reading MSRs with index 0x80000000 and above attempts a pread with a
    negative offset, which fails.

    Signed-off-by: Alexander Monakov
    Tested-by: Liwei Song
    Signed-off-by: Len Brown

    Alexander Monakov
     
  • Family 19h processors have the same RAPL (Running average power limit)
    hardware register interface as Family 17h processors.

    Change the family checks to succeed for Family 17h and above to enable
    core and package energy measurement on Family 19h machines.

    Also update the TDP to the largest found at the bottom of the page at
    amd.com->processors->servers->epyc->2nd-gen-epyc, i.e., the EPYC 7H12.

    Signed-off-by: Kim Phillips
    Cc: Len Brown
    Cc: Len Brown
    Cc: linux-pm@vger.kernel.org
    Cc: linux-kernel@vger.kernel.org
    Signed-off-by: Len Brown

    Kim Phillips
     
  • Jacobsville doesn't have Package C2 and C6. Also
    Core and DRAM RAPL are not available. Adjust output
    accordingly.

    Signed-off-by: Antti Laakso
    Signed-off-by: Len Brown

    Antti Laakso
     
  • The column already present called GFXMHz reads from gt_cur_freq_mhz,
    which represents the GT frequency that was requested, but power
    management might not be able to do that. So the new column will display
    what the actual frequency GT is running at.

    Signed-off-by: Rafael Antognolli
    Signed-off-by: Len Brown

    Rafael Antognolli
     
  • I've encountered an issue with x86_energy_perf_policy. If I run it on a
    machine that I'm told is a qemu-kvm virtual machine running inside a
    privileged container, I get the following error:

    x86_energy_perf_policy: /dev/cpu/0/msr offset 0x1ad read failed: Input/output error

    I get the same error in a Digital Ocean droplet, so that might be a
    similar environment.

    I created the following patch which is intended to give a more
    user-friendly message. It's based on a patch for turbostat from Prarit
    Bhargava that was posted some time ago. The patch is "[v2] turbostat:
    Running on virtual machine is not supported" [1].

    Given my limited knowledge of the topic, I can't say with confidence
    that this is the right solution, though (that's why this is not an
    official patch submission). Also, I'm not sure what the convention with
    exit codes is in this tool. Also, instead of the error message, perhaps
    the tool should just not print anything in this case, which is how it
    behaves in a "regular" VM?

    [1] https://patchwork.kernel.org/patch/9868587/

    Signed-off-by: Ondřej Lysoněk
    Signed-off-by: Len Brown

    Ondřej Lysoněk
     
  • Like we skip PC3 and PC6 columns when the package C-state limit
    disables them, skip PC8/PC9/CP10 under analogous conditions.

    Reported-by: Zhang Rui
    Signed-off-by: Len Brown

    Len Brown
     
  • Initial support for models recently added to intel-family.h.

    Signed-off-by: Len Brown

    Len Brown
     
  • turbostat formatting is broken with ACPI CST for enumeration. The
    problem is that the CX_ACPI% is eight characters long which does not
    work with tab formatting. One simple solution is to remove the underbar
    from the state name such that C1_ACPI will be displayed as C1ACPI.

    Signed-off-by: David Arcari
    Cc: Len Brown
    Cc: linux-kernel@vger.kernel.org
    Signed-off-by: Len Brown

    David Arcari
     
  • Rationale:
    Reduces attack surface on kernel devs opening the links for MITM
    as HTTPS traffic is much harder to manipulate.

    Deterministic algorithm:
    For each file:
    If not .svg:
    For each line:
    If doesn't contain `\bxmlns\b`:
    For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`:
    If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`:
    If both the HTTP and HTTPS versions
    return 200 OK and serve the same content:
    Replace HTTP with HTTPS.

    Signed-off-by: Alexander A. Klimov
    Signed-off-by: Len Brown

    Alexander A. Klimov
     
  • Disabling cpu 0 results in an error

    turbostat: /sys/devices/system/cpu/cpu0/topology/thread_siblings: open failed: No such file or directory

    Use sched_getcpu() instead of a hardcoded cpu 0 to get the max cpu number.

    Signed-off-by: Prarit Bhargava
    Signed-off-by: Len Brown

    Prarit Bhargava
     
  • Enable the accumulated RAPL display by default.

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

    Chen Yu
     
  • Since the RAPL Joule Counter is 32 bit, turbostat would
    only print a *star* instead of printing the actual energy
    consumed to indicate the overflow due to long duration.
    This does not meet the requirement from servers as the
    sampling time of turbostat is usually very long on servers.

    So maintain a set of MSR buffer, and update them
    periodically before the 32bit MSR register is wrapped round,
    so as to avoid the overflow.

    The idea is similar to the implementation of ktime_get():

    Periodical MSR timer:
    total_rapl_sum += (current_rapl_msr - last_rapl_msr);

    Using get_msr_sum() to get the accumulated RAPL:
    return (current_rapl_msr - last_rapl_msr) + total_rapl_sum;

    The accumulated RAPL mechanism will be turned on in next patch.

    Originally-by: Aaron Lu
    Reviewed-by: Doug Smythies
    Tested-by: Doug Smythies
    Signed-off-by: Chen Yu
    Signed-off-by: Len Brown

    Chen Yu
     
  • Change the energy variable from 32bit to 64bit,
    so that it can record long time duration.
    After this conversion, adjust the DELTA_WRAP32() accordingly.

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

    Chen Yu
     
  • If the --quiet option is not used, turbostat prints a useful system
    configuration header during startup.

    But inclusion of idle system configuration information in this header
    is currently a function of inclusion in the columns chosen to be displayed.

    Always list this idle system configuration.

    Signed-off-by: Doug Smythies
    Signed-off-by: Len Brown

    Doug Smythies
     
  • Users are puzzled when they use tuned performance and all their
    C-states vanish. Dump /dev/cpu_dma_latency and state
    whether the value is default, or constraining,
    to explain this situation.

    Signed-off-by: Len Brown

    Len Brown
     

01 Sep, 2020

1 commit

  • The current notifiers have the following error handling pattern all
    over the place:

    int err, nr;

    err = __foo_notifier_call_chain(&chain, val_up, v, -1, &nr);
    if (err & NOTIFIER_STOP_MASK)
    __foo_notifier_call_chain(&chain, val_down, v, nr-1, NULL)

    And aside from the endless repetition thereof, it is broken. Consider
    blocking notifiers; both calls take and drop the rwsem, this means
    that the notifier list can change in between the two calls, making @nr
    meaningless.

    Fix this by replacing all the __foo_notifier_call_chain() functions
    with foo_notifier_call_chain_robust() that embeds the above pattern,
    but ensures it is inside a single lock region.

    Note: I switched atomic_notifier_call_chain_robust() to use
    the spinlock, since RCU cannot provide the guarantee
    required for the recovery.

    Note: software_resume() error handling was broken afaict.

    Signed-off-by: Peter Zijlstra (Intel)
    Signed-off-by: Ingo Molnar
    Acked-by: Rafael J. Wysocki
    Link: https://lore.kernel.org/r/20200818135804.325626653@infradead.org

    Peter Zijlstra
     

21 Aug, 2020

2 commits


04 Aug, 2020

2 commits

  • Pull ACPI updates from Rafael Wysocki:
    "These eliminate significant AML processing overhead related to using
    operation regions in system memory, update the ACPICA code in the
    kernel to upstream revision 20200717 (including a fix to prevent
    operation region reference counts from overflowing in some cases),
    remove the last bits of the (long deprecated) ACPI procfs interface
    and do some assorted cleanups.

    Specifics:

    - Eliminate significant AML processing overhead related to using
    operation regions in system memory by reworking the management of
    memory mappings in the ACPI code to defer unmap operations (to do
    them outside of the ACPICA locks, among other things) and making
    the memory operation reagion handler avoid releasing memory
    mappings created by it too early (Rafael Wysocki).

    - Update the ACPICA code in the kernel to upstream revision 20200717:

    * Prevent operation region reference counts from overflowing in
    some cases (Erik Kaneda).

    * Replace one-element array with flexible-array (Gustavo A. R.
    Silva).

    - Fix ACPI PCI hotplug reference counting (Rafael Wysocki).

    - Drop last bits of the ACPI procfs interface (Thomas Renninger).

    - Drop some redundant checks from the code parsing ACPI tables
    related to NUMA (Hanjun Guo).

    - Avoid redundant object evaluation in the ACPI device properties
    handling code (Heikki Krogerus).

    - Avoid unecessary memory overhead related to storing the signatures
    of the ACPI tables recognized by the kernel (Ard Biesheuvel).

    - Add missing newline characters when printing module parameter
    values in some places (Xiongfeng Wang).

    - Update the link to the ACPI specifications in some places (Tiezhu
    Yang).

    - Use the fallthrough pseudo-keyword in the ACPI code (Gustavo A. R.
    Silva).

    - Drop redundant variable initialization from the APEI code (Colin
    Ian King).

    - Drop uninitialized_var() from the ACPI PAD driver (Jason Yan).

    - Replace HTTP links with HTTPS ones in the ACPI code (Alexander A.
    Klimov)"

    * tag 'acpi-5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (22 commits)
    ACPI: APEI: remove redundant assignment to variable rc
    ACPI: NUMA: Remove the useless 'node >= MAX_NUMNODES' check
    ACPI: NUMA: Remove the useless sub table pointer check
    ACPI: tables: Remove the duplicated checks for acpi_parse_entries_array()
    ACPICA: Update version to 20200717
    ACPICA: Do not increment operation_region reference counts for field units
    ACPICA: Replace one-element array with flexible-array
    ACPI: Replace HTTP links with HTTPS ones
    ACPI: Use valid link to the ACPI specification
    ACPI: OSL: Clean up the removal of unused memory mappings
    ACPI: OSL: Use deferred unmapping in acpi_os_unmap_iomem()
    ACPI: OSL: Use deferred unmapping in acpi_os_unmap_generic_address()
    ACPICA: Preserve memory opregion mappings
    ACPI: OSL: Implement deferred unmapping of ACPI memory
    ACPI: Use fallthrough pseudo-keyword
    PCI: hotplug: ACPI: Fix context refcounting in acpiphp_grab_context()
    ACPI: tables: avoid relocations for table signature array
    ACPI: PAD: Eliminate usage of uninitialized_var() macro
    ACPI: sysfs: add newlines when printing module parameters
    ACPI: EC: add newline when printing 'ec_event_clearing' module parameter
    ...

    Linus Torvalds
     
  • Pull power management updates from Rafael Wysocki:
    "The most significant change here is the extension of the Energy Model
    to cover non-CPU devices (as well as CPUs) from Lukasz Luba.

    There is also some new hardware support (Ice Lake server idle states
    table for intel_idle, Sapphire Rapids and Power Limit 4 support in the
    RAPL driver), some new functionality in the existing drivers (eg. a
    new switch to disable/enable CPU energy-efficiency optimizations in
    intel_pstate, delayed timers in devfreq), some assorted fixes (cpufreq
    core, intel_pstate, intel_idle) and cleanups (eg. cpuidle-psci,
    devfreq), including the elimination of W=1 build warnings from cpufreq
    done by Lee Jones.

    Specifics:

    - Make the Energy Model cover non-CPU devices (Lukasz Luba).

    - Add Ice Lake server idle states table to the intel_idle driver and
    eliminate a redundant static variable from it (Chen Yu, Rafael
    Wysocki).

    - Eliminate all W=1 build warnings from cpufreq (Lee Jones).

    - Add support for Sapphire Rapids and for Power Limit 4 to the Intel
    RAPL power capping driver (Sumeet Pawnikar, Zhang Rui).

    - Fix function name in kerneldoc comments in the idle_inject power
    capping driver (Yangtao Li).

    - Fix locking issues with cpufreq governors and drop a redundant
    "weak" function definition from cpufreq (Viresh Kumar).

    - Rearrange cpufreq to register non-modular governors at the
    core_initcall level and allow the default cpufreq governor to be
    specified in the kernel command line (Quentin Perret).

    - Extend, fix and clean up the intel_pstate driver (Srinivas
    Pandruvada, Rafael Wysocki):

    * Add a new sysfs attribute for disabling/enabling CPU
    energy-efficiency optimizations in the processor.

    * Make the driver avoid enabling HWP if EPP is not supported.

    * Allow the driver to handle numeric EPP values in the sysfs
    interface and fix the setting of EPP via sysfs in the active
    mode.

    * Eliminate a static checker warning and clean up a kerneldoc
    comment.

    - Clean up some variable declarations in the powernv cpufreq driver
    (Wei Yongjun).

    - Fix up the ->enter_s2idle callback definition to cover the case
    when it points to the same function as ->idle correctly (Neal Liu).

    - Rearrange and clean up the PSCI cpuidle driver (Ulf Hansson).

    - Make the PM core emit "changed" uevent when adding/removing the
    "wakeup" sysfs attribute of devices (Abhishek Pandit-Subedi).

    - Add a helper macro for declaring PM callbacks and use it in the MMC
    jz4740 driver (Paul Cercueil).

    - Fix white space in some places in the hibernate code and make the
    system-wide PM code use "const char *" where appropriate (Xiang
    Chen, Alexey Dobriyan).

    - Add one more "unsafe" helper macro to the freezer to cover the NFS
    use case (He Zhe).

    - Change the language in the generic PM domains framework to use
    parent/child terminology and clean up a typo and some comment
    fromatting in that code (Kees Cook, Geert Uytterhoeven).

    - Update the operating performance points OPP framework (Lukasz Luba,
    Andrew-sh.Cheng, Valdis Kletnieks):

    * Refactor dev_pm_opp_of_register_em() and update related drivers.

    * Add a missing function export.

    * Allow disabled OPPs in dev_pm_opp_get_freq().

    - Update devfreq core and drivers (Chanwoo Choi, Lukasz Luba, Enric
    Balletbo i Serra, Dmitry Osipenko, Kieran Bingham, Marc Zyngier):

    * Add support for delayed timers to the devfreq core and make the
    Samsung exynos5422-dmc driver use it.

    * Unify sysfs interface to use "df-" as a prefix in instance
    names consistently.

    * Fix devfreq_summary debugfs node indentation.

    * Add the rockchip,pmu phandle to the rk3399_dmc driver DT
    bindings.

    * List Dmitry Osipenko as the Tegra devfreq driver maintainer.

    * Fix typos in the core devfreq code.

    - Update the pm-graph utility to version 5.7 including a number of
    fixes related to suspend-to-idle (Todd Brandt).

    - Fix coccicheck errors and warnings in the cpupower utility (Shuah
    Khan).

    - Replace HTTP links with HTTPs ones in multiple places (Alexander A.
    Klimov)"

    * tag 'pm-5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (71 commits)
    cpuidle: ACPI: fix 'return' with no value build warning
    cpufreq: intel_pstate: Fix EPP setting via sysfs in active mode
    cpufreq: intel_pstate: Rearrange the storing of new EPP values
    intel_idle: Customize IceLake server support
    PM / devfreq: Fix the wrong end with semicolon
    PM / devfreq: Fix indentaion of devfreq_summary debugfs node
    PM / devfreq: Clean up the devfreq instance name in sysfs attr
    memory: samsung: exynos5422-dmc: Add module param to control IRQ mode
    memory: samsung: exynos5422-dmc: Adjust polling interval and uptreshold
    memory: samsung: exynos5422-dmc: Use delayed timer as default
    PM / devfreq: Add support delayed timer for polling mode
    dt-bindings: devfreq: rk3399_dmc: Add rockchip,pmu phandle
    PM / devfreq: tegra: Add Dmitry as a maintainer
    PM / devfreq: event: Fix trivial spelling
    PM / devfreq: rk3399_dmc: Fix kernel oops when rockchip,pmu is absent
    cpuidle: change enter_s2idle() prototype
    cpuidle: psci: Prevent domain idlestates until consumers are ready
    cpuidle: psci: Convert PM domain to platform driver
    cpuidle: psci: Fix error path via converting to a platform driver
    cpuidle: psci: Fail cpuidle registration if set OSI mode failed
    ...

    Linus Torvalds
     

27 Jul, 2020

2 commits

  • Currently, acpi.info is an invalid link to access ACPI specification,
    the new valid link is https://uefi.org/specifications.

    Signed-off-by: Tiezhu Yang
    Signed-off-by: Rafael J. Wysocki

    Tiezhu Yang
     
  • Important fixes:

    - in s2idle, use timekeeping_freeze trace mark instead of
    machine_suspend to denote entry into s2idle mode.

    - in s2idle, use machine_suspend trace mark to create a new virtual
    device called "s2idle_enter_x". It denotes an s2idle_enter call
    loop of iterations where s2idle was never actually achieved.
    It isn't counted as "freeze time" in the header.

    - in s2idle, only show multiple freeze times if s2idle went in and
    out of resume_noirq. Otherwise multiple freezes are shown with
    "waking" time subtracted (waking time is time spent outside s2idle
    dealing with wakeups).

    - in s2idle summaries, include "FREEZEWAKE" as an issue when at
    least 1ms is spent waking from s2idle. A clean run should only
    wake for the rtc timer.

    - add support for device callbacks with matching names in the same
    phase. In rare cases some devices register multiple callbacks from
    separate drivers using the same name. Without this fix only one is
    shown.

    - add kparamsfmt string back to fix bootgraph

    General updates:

    - when suspend_machine is missing, error says "failed in
    suspend_machine"

    - extract target count/time and add to summary title if -multi
    used

    - include any instances of "timeout" in dmesg as issues to be
    logged.

    - fix ftrace parse to handle any number of flags (instead of
    just 4).

    - remove sync/async_device string from device detail, remains in
    hover.

    - when using callgraph (-f) add driver name to callgraph titles.

    Signed-off-by: Todd Brandt
    Signed-off-by: Rafael J. Wysocki

    Todd Brandt
     

18 Jul, 2020

1 commit

  • Rationale:
    Reduces attack surface on kernel devs opening the links for MITM
    as HTTPS traffic is much harder to manipulate.

    Deterministic algorithm:
    For each file:
    If not .svg:
    For each line:
    If doesn't contain `\bxmlns\b`:
    For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`:
    If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`:
    If both the HTTP and HTTPS versions
    return 200 OK and serve the same content:
    Replace HTTP with HTTPS.

    Signed-off-by: Alexander A. Klimov
    Signed-off-by: Shuah Khan

    Alexander A. Klimov
     

17 Jul, 2020

1 commit