1. 15 Feb, 2023 5 commits
    • Rafael J. Wysocki's avatar
      Merge branches 'pm-tools' and 'pm-docs' · dd855f01
      Rafael J. Wysocki authored
      Merge power management utilities and documentation updates for 6.3-rc1:
      
       - Modify some power management utilities to use the canonical ftrace
         path (Ross Zwisler).
      
       - Correct spelling problems for Documentation/power/ as reported by
         codespell (Randy Dunlap).
      
      * pm-tools:
        PM: tools: use canonical ftrace path
      
      * pm-docs:
        Documentation: power: correct spelling
      dd855f01
    • Rafael J. Wysocki's avatar
      Merge branches 'powercap', 'pm-domains', 'pm-em' and 'pm-opp' · ace50298
      Rafael J. Wysocki authored
      Merge updates of the powercap framework, generic PM domains, Energy
      Model and operating performance points for 6.3-rc1:
      
       - Fix possible name leak in powercap_register_zone() (Yang Yingliang).
      
       - Add Meteor Lake and Emerald Rapids support to the intel_rapl power
         capping driver (Zhang Rui).
      
       - Modify the idle_inject power capping facility to support 100% idle
         injection (Srinivas Pandruvada).
      
       - Fix large time windows handling in the intel_rapl power capping
         driver (Zhang Rui).
      
       - Fix memory leaks with using debugfs_lookup() in the generic PM
         domains and Energy Model code (Greg Kroah-Hartman).
      
       - Add missing 'cache-unified' property in example for kryo OPP bindings
         (Rob Herring).
      
       - Fix error checking in opp_migrate_dentry() (Qi Zheng).
      
       - Remove "select SRCU" (Paul E. McKenney).
      
       - Let qcom,opp-fuse-level be a 2-long array for qcom SoCs (Konrad
         Dybcio).
      
      * powercap:
        powercap: intel_rapl: Fix handling for large time window
        powercap: idle_inject: Support 100% idle injection
        powercap: intel_rapl: add support for Emerald Rapids
        powercap: intel_rapl: add support for Meteor Lake
        powercap: fix possible name leak in powercap_register_zone()
      
      * pm-domains:
        PM: domains: fix memory leak with using debugfs_lookup()
      
      * pm-em:
        PM: EM: fix memory leak with using debugfs_lookup()
      
      * pm-opp:
        OPP: fix error checking in opp_migrate_dentry()
        dt-bindings: opp: v2-qcom-level: Let qcom,opp-fuse-level be a 2-long array
        drivers/opp: Remove "select SRCU"
        dt-bindings: opp: opp-v2-kryo-cpu: Add missing 'cache-unified' property in example
      ace50298
    • Rafael J. Wysocki's avatar
      Merge branches 'pm-cpuidle', 'pm-core' and 'pm-sleep' · 7e71a133
      Rafael J. Wysocki authored
      Merge cpuidle updates, PM core updates and changes related to system
      sleep handling for 6.3-rc1:
      
       - Make the TEO cpuidle governor check CPU utilization in order to refine
         idle state selection (Kajetan Puchalski).
      
       - Make Kconfig select the haltpoll cpuidle governor when the haltpoll
         cpuidle driver is selected and replace a default_idle() call in that
         driver with arch_cpu_idle() which allows MWAIT to be used (Li
         RongQing).
      
       - Add Emerald Rapids Xeon support to the intel_idle driver (Artem
         Bityutskiy).
      
       - Add ARCH_SUSPEND_POSSIBLE dependencies for ARMv4 cpuidle drivers to
         avoid randconfig build failures (Arnd Bergmann).
      
       - Make kobj_type structures used in the cpuidle sysfs interface
         constant (Thomas Weißschuh).
      
       - Make the cpuidle driver registration code update microsecond values
         of idle state parameters in accordance with their nanosecond values
         if they are provided (Rafael Wysocki).
      
       - Make the PSCI cpuidle driver prevent topology CPUs from being
         suspended on PREEMPT_RT (Krzysztof Kozlowski).
      
       - Document that pm_runtime_force_suspend() cannot be used with
         DPM_FLAG_SMART_SUSPEND (Richard Fitzgerald).
      
       - Add EXPORT macros for exporting PM functions from drivers (Richard
         Fitzgerald).
      
       - Drop "select SRCU" from system sleep Kconfig (Paul E. McKenney).
      
       - Remove /** from non-kernel-doc comments in hibernation code (Randy
         Dunlap).
      
      * pm-cpuidle:
        cpuidle: psci: Do not suspend topology CPUs on PREEMPT_RT
        cpuidle: driver: Update microsecond values of state parameters as needed
        cpuidle: sysfs: make kobj_type structures constant
        cpuidle: add ARCH_SUSPEND_POSSIBLE dependencies
        intel_idle: add Emerald Rapids Xeon support
        cpuidle-haltpoll: Replace default_idle() with arch_cpu_idle()
        cpuidle-haltpoll: select haltpoll governor
        cpuidle: teo: Introduce util-awareness
        cpuidle: teo: Optionally skip polling states in teo_find_shallower_state()
      
      * pm-core:
        PM: Add EXPORT macros for exporting PM functions
        PM: runtime: Document that force_suspend() is incompatible with SMART_SUSPEND
      
      * pm-sleep:
        PM: sleep: Remove "select SRCU"
        PM: hibernate: swap: don't use /** for non-kernel-doc comments
      7e71a133
    • Bagas Sanjaya's avatar
      Documentation: amd-pstate: disambiguate user space sections · 73dd3206
      Bagas Sanjaya authored
      kernel test robot reported htmldocs warning:
      
      Documentation/admin-guide/pm/amd-pstate.rst:343: WARNING: duplicate label admin-guide/pm/amd-pstate:user space interface in ``sysfs``, other instance in Documentation/admin-guide/pm/amd-pstate.rst
      
      The documentation contains two sections with the same "User Space Interface
      in ``sysfs``" title. The first one deals with per-policy sysfs and the
      second one is about general attributes (currently only global attributes
      are documented).
      
      Disambiguate title text of both sections to fix the warning.
      
      Link: https://lore.kernel.org/linux-doc/202302151041.0SWs1RHK-lkp@intel.com/
      Fixes: b9e6a2d4 ("Documentation: amd-pstate: introduce new global sysfs attributes")
      Reported-by: default avatarkernel test robot <lkp@intel.com>
      Signed-off-by: default avatarBagas Sanjaya <bagasdotme@gmail.com>
      Reviewed-by: default avatarWyes Karny <wyes.karny@amd.com>
      Acked-by: default avatarHuang Rui <ray.huang@amd.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      73dd3206
    • Wyes Karny's avatar
      cpufreq: amd-pstate: Fix invalid write to MSR_AMD_CPPC_REQ · 6e9d1212
      Wyes Karny authored
      `amd_pstate_set_epp` function uses `cppc_req_cached` and `epp` variable
      to update the MSR_AMD_CPPC_REQ register for AMD MSR systems. The recent
      commit 7cca9a98 ("cpufreq: amd-pstate: avoid uninitialized variable
      use") changed the sequence of updating cppc_req_cached and writing the
      MSR_AMD_CPPC_REQ. Therefore while switching from powersave to
      performance governor and vice-versa in active mode MSR_AMD_CPPC_REQ is
      set with the previous cached value. To fix this: first update the
      `cppc_req_cached` variable and then call `amd_pstate_set_epp` function.
      
       - Before commit 7cca9a98 ("cpufreq: amd-pstate: avoid uninitialized
         variable use"):
      
      With powersave governor:
      [    1.652743] amd_pstate_epp_init: writing to cppc_req_cached = 0x1eff
      [    1.652744] amd_pstate_set_epp: writing cppc_req_cached = 0x1eff
      [    1.652746] amd_pstate_set_epp: writing min_perf = 30, des_perf = 0, max_perf = 255, epp = 0
      
      Changing to performance governor:
      [  300.493842] amd_pstate_epp_init: writing to cppc_req_cached = 0xffff
      [  300.493846] amd_pstate_set_epp: writing cppc_req_cached = 0xffff
      [  300.493847] amd_pstate_set_epp: writing min_perf = 255, des_perf = 0, max_perf = 255, epp = 0
      
       - After commit 7cca9a98 ("cpufreq: amd-pstate: avoid uninitialized
         variable use"):
      
      With powersave governor:
      [    1.646037] amd_pstate_set_epp: writing cppc_req_cached = 0xffff
      [    1.646038] amd_pstate_set_epp: writing min_perf = 255, des_perf = 0, max_perf = 255, epp = 0
      [    1.646042] amd_pstate_epp_init: writing to cppc_req_cached = 0x1eff
      
      Changing to performance governor:
      [  687.117401] amd_pstate_set_epp: writing cppc_req_cached = 0x1eff
      [  687.117405] amd_pstate_set_epp: writing min_perf = 30, des_perf = 0, max_perf = 255, epp = 0
      [  687.117419] amd_pstate_epp_init: writing to cppc_req_cached = 0xffff
      
       - After this fix:
      
      With powersave governor:
      [    2.525717] amd_pstate_epp_init: writing to cppc_req_cached = 0x1eff
      [    2.525720] amd_pstate_set_epp: writing cppc_req_cached = 0x1eff
      [    2.525722] amd_pstate_set_epp: writing min_perf = 30, des_perf = 0, max_perf = 255, epp = 0
      
      Changing to performance governor:
      [ 3440.152468] amd_pstate_epp_init: writing to cppc_req_cached = 0xffff
      [ 3440.152473] amd_pstate_set_epp: writing cppc_req_cached = 0xffff
      [ 3440.152474] amd_pstate_set_epp: writing min_perf = 255, des_perf = 0, max_perf = 255, epp = 0
      
      Fixes: 7cca9a98 ("cpufreq: amd-pstate: avoid uninitialized variable use")
      Signed-off-by: default avatarWyes Karny <wyes.karny@amd.com>
      Acked-by: default avatarHuang Rui <ray.huang@amd.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      6e9d1212
  2. 14 Feb, 2023 7 commits
  3. 13 Feb, 2023 5 commits
  4. 12 Feb, 2023 10 commits
  5. 11 Feb, 2023 5 commits
  6. 10 Feb, 2023 8 commits
    • Linus Torvalds's avatar
      Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux · 420b2d43
      Linus Torvalds authored
      Pull clk fixes from Stephen Boyd:
       "Two clk driver fixes
      
         - Use devm_kasprintf() to avoid overflows when forming clk names in
           the Microchip PolarFire driver
      
         - Fix the pretty broken Ingenic JZ4760 M/N/OD calculation to actually
           work and find proper divisors"
      
      * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux:
        clk: ingenic: jz4760: Update M/N/OD calculation algorithm
        clk: microchip: mpfs-ccc: Use devm_kasprintf() for allocating formatted strings
      420b2d43
    • Linus Torvalds's avatar
      Merge tag 'pinctrl-v6.2-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl · 545c80ab
      Linus Torvalds authored
      Pull pin control fixes from Linus Walleij:
       "Some assorted pin control fixes, the most interesting will be the
        Intel patch fixing a classic problem: laptop touchpad IRQs...
      
         - Some pin drive register fixes in the Mediatek driver.
      
         - Return proper error code in the Aspeed driver, and revert and
           ill-advised force-disablement patch that needs to be reworked.
      
         - Fix AMD driver debug output.
      
         - Fix potential NULL dereference in the Single driver.
      
         - Fix a group definition error in the Qualcomm SM8450 LPASS driver.
      
         - Restore pins used in direct IRQ mode in the Intel driver (This
           fixes some laptop touchpads!)"
      
      * tag 'pinctrl-v6.2-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl:
        pinctrl: intel: Restore the pins that used to be in Direct IRQ mode
        pinctrl: qcom: sm8450-lpass-lpi: correct swr_rx_data group
        pinctrl: aspeed: Revert "Force to disable the function's signal"
        pinctrl: single: fix potential NULL dereference
        pinctrl: amd: Fix debug output for debounce time
        pinctrl: aspeed: Fix confusing types in return value
        pinctrl: mediatek: Fix the drive register definition of some Pins
      545c80ab
    • Linus Torvalds's avatar
      Merge tag 'pci-v6.2-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci · 4cfd5afc
      Linus Torvalds authored
      Pull PCI fixes from Bjorn Helgaas:
      
       - Move to a shared PCI git tree (Bjorn Helgaas)
      
       - Add Krzysztof Wilczyński as another PCI maintainer (Lorenzo
         Pieralisi)
      
       - Revert a couple ASPM patches to fix suspend/resume regressions (Bjorn
         Helgaas)
      
      * tag 'pci-v6.2-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci:
        Revert "PCI/ASPM: Refactor L1 PM Substates Control Register programming"
        Revert "PCI/ASPM: Save L1 PM Substates Capability for suspend/resume"
        MAINTAINERS: Promote Krzysztof to PCI controller maintainer
        MAINTAINERS: Move to shared PCI tree
      4cfd5afc
    • Bjorn Helgaas's avatar
      Revert "PCI/ASPM: Refactor L1 PM Substates Control Register programming" · ff209ecc
      Bjorn Helgaas authored
      This reverts commit 5e85eba6.
      
      Thomas Witt reported that 5e85eba6 ("PCI/ASPM: Refactor L1 PM Substates
      Control Register programming") broke suspend/resume on a Tuxedo
      Infinitybook S 14 v5, which seems to use a Clevo L140CU Mainboard.
      
      The main symptom is:
      
        iwlwifi 0000:02:00.0: Unable to change power state from D3hot to D0, device inaccessible
        nvme 0000:03:00.0: Unable to change power state from D3hot to D0, device inaccessible
      
      and the machine is only partially usable after resume.  It can't run dmesg
      and can't do a clean reboot.  This happens on every suspend/resume cycle.
      
      Revert 5e85eba6 until we can figure out the root cause.
      
      Fixes: 5e85eba6 ("PCI/ASPM: Refactor L1 PM Substates Control Register programming")
      Link: https://bugzilla.kernel.org/show_bug.cgi?id=216877Reported-by: default avatarThomas Witt <kernel@witt.link>
      Tested-by: default avatarThomas Witt <kernel@witt.link>
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      Cc: stable@vger.kernel.org	# v6.1+
      Cc: Vidya Sagar <vidyas@nvidia.com>
      ff209ecc
    • Bjorn Helgaas's avatar
      Revert "PCI/ASPM: Save L1 PM Substates Capability for suspend/resume" · a7152be7
      Bjorn Helgaas authored
      This reverts commit 4ff116d0.
      
      Tasev Nikola and Mark Enriquez reported that resume from suspend was broken
      in v6.1-rc1.  Tasev bisected to a47126ec ("PCI/PTM: Cache PTM
      Capability offset"), but we can't figure out how that could be related.
      
      Mark saw the same symptoms and bisected to 4ff116d0 ("PCI/ASPM: Save L1
      PM Substates Capability for suspend/resume"), which does have a connection:
      it restores L1 Substates configuration while ASPM L1 may be enabled:
      
        pci_restore_state
          pci_restore_aspm_l1ss_state
            aspm_program_l1ss
              pci_write_config_dword(PCI_L1SS_CTL1, ctl1)         # L1SS restore
          pci_restore_pcie_state
            pcie_capability_write_word(PCI_EXP_LNKCTL, cap[i++])  # L1 restore
      
      which is a problem because PCIe r6.0, sec 5.5.4, requires that:
      
        If setting either or both of the enable bits for ASPM L1 PM
        Substates, both ports must be configured as described in this
        section while ASPM L1 is disabled.
      
      Separately, Thomas Witt reported that 5e85eba6 ("PCI/ASPM: Refactor L1
      PM Substates Control Register programming") broke suspend/resume, and it
      depends on 4ff116d0.
      
      Revert 4ff116d0 ("PCI/ASPM: Save L1 PM Substates Capability for
      suspend/resume") to fix the resume issue and enable revert of 5e85eba6
      to fix the issue Thomas reported.
      
      Note that reverting 4ff116d0 means L1 Substates config may be lost on
      suspend/resume.  As far as we know the system will use more power but will
      still *work* correctly.
      
      Fixes: 4ff116d0 ("PCI/ASPM: Save L1 PM Substates Capability for suspend/resume")
      Link: https://bugzilla.kernel.org/show_bug.cgi?id=216782
      Link: https://bugzilla.kernel.org/show_bug.cgi?id=216877Reported-by: default avatarTasev Nikola <tasev.stefanoska@skynet.be>
      Reported-by: default avatarMark Enriquez <enriquezmark36@gmail.com>
      Reported-by: default avatarThomas Witt <kernel@witt.link>
      Tested-by: default avatarMark Enriquez <enriquezmark36@gmail.com>
      Tested-by: default avatarThomas Witt <kernel@witt.link>
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      Cc: stable@vger.kernel.org	# v6.1+
      Cc: Vidya Sagar <vidyas@nvidia.com>
      a7152be7
    • Linus Torvalds's avatar
      Merge tag 'soc-fixes-6.2-4' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc · 4f72a263
      Linus Torvalds authored
      Pull ARM SoC fixes from Arnd Bergmann:
       "All the changes this time are minor devicetree corrections, the
        majority being for 64-bit Rockchip SoC support. These are a couple of
        corrections for properties that are in violation of the binding, some
        that put the machine into safer operating points for the eMMC and
        thermal settings, and missing properties that prevented rk356x PCIe
        and ethernet from working correctly.
      
        The changes for amlogic and mediatek address incorrect properties that
        were preventing the display support on MT8195 and the MMC support on
        various Meson SoCs from working correctly.
      
        The stihxxx-b2120 change fixes the GPIO polarity for the DVB tuner to
        allow this to be used correctly after a futre driver change, though it
        has no effect on older kernels"
      
      * tag 'soc-fixes-6.2-4' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc:
        arm64: dts: meson-gx: Make mmc host controller interrupts level-sensitive
        arm64: dts: meson-g12-common: Make mmc host controller interrupts level-sensitive
        arm64: dts: meson-axg: Make mmc host controller interrupts level-sensitive
        ARM: dts: stihxxx-b2120: fix polarity of reset line of tsin0 port
        arm64: dts: mediatek: mt8195: Fix vdosys* compatible strings
        arm64: dts: rockchip: align rk3399 DMC OPP table with bindings
        arm64: dts: rockchip: set sdmmc0 speed to sd-uhs-sdr50 on rock-3a
        arm64: dts: rockchip: fix probe of analog sound card on rock-3a
        arm64: dts: rockchip: add missing #interrupt-cells to rk356x pcie2x1
        arm64: dts: rockchip: fix input enable pinconf on rk3399
        ARM: dts: rockchip: add power-domains property to dp node on rk3288
        arm64: dts: rockchip: add io domain setting to rk3566-box-demo
        arm64: dts: rockchip: remove unsupported property from sdmmc2 for rock-3a
        arm64: dts: rockchip: drop unused LED mode property from rk3328-roc-cc
        arm64: dts: rockchip: reduce thermal limits on rk3399-pinephone-pro
        arm64: dts: rockchip: use correct reset names for rk3399 crypto nodes
      4f72a263
    • Linus Torvalds's avatar
      Merge tag 'riscv-for-linus-6.2-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux · 8e9a8427
      Linus Torvalds authored
      Pull RISC-V fixes from Palmer Dabbelt:
       "This is a little bigger that I'd hope for this late in the cycle, but
        they're all pretty concrete fixes and the only one that's bigger than
        a few lines is pmdp_collapse_flush() (which is almost all
        boilerplate/comment). It's also all bug fixes for issues that have
        been around for a while.
      
        So I think it's not all that scary, just bad timing.
      
         - avoid partial TLB fences for huge pages, which are disallowed by
           the ISA
      
         - avoid missing a frame when dumping stacks
      
         - avoid misaligned accesses (and possibly overflows) in kprobes
      
         - fix a race condition in tracking page dirtiness"
      
      * tag 'riscv-for-linus-6.2-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux:
        riscv: Fixup race condition on PG_dcache_clean in flush_icache_pte
        riscv: kprobe: Fixup misaligned load text
        riscv: stacktrace: Fix missing the first frame
        riscv: mm: Implement pmdp_collapse_flush for THP
      8e9a8427
    • Linus Torvalds's avatar
      Merge tag 'ceph-for-6.2-rc8' of https://github.com/ceph/ceph-client · 3647d2d7
      Linus Torvalds authored
      Pull ceph fix from Ilya Dryomov:
       "A fix for a pretty embarrassing omission in the session flush handler
        from Xiubo, marked for stable"
      
      * tag 'ceph-for-6.2-rc8' of https://github.com/ceph/ceph-client:
        ceph: flush cap releases when the session is flushed
      3647d2d7