30 Sep, 2020

1 commit

  • PCI devices support two variants of the D3 power state: D3hot (main power
    present) D3cold (main power removed). Previously struct pci_dev contained:

    unsigned int d3_delay; /* D3->D0 transition time in ms */
    unsigned int d3cold_delay; /* D3cold->D0 transition time in ms */

    "d3_delay" refers specifically to the D3hot state. Rename it to
    "d3hot_delay" to avoid ambiguity and align with the ACPI "_DSM for
    Specifying Device Readiness Durations" in the PCI Firmware spec r3.2,
    sec 4.6.9.

    There is no change to the functionality.

    Link: https://lore.kernel.org/r/20200730210848.1578826-1-kw@linux.com
    Signed-off-by: Krzysztof Wilczyński
    Signed-off-by: Bjorn Helgaas

    Krzysztof Wilczyński
     

03 Aug, 2020

1 commit

  • * pm-sleep:
    PM: sleep: spread "const char *" correctness
    PM: hibernate: fix white space in a few places
    freezer: Add unsafe version of freezable_schedule_timeout_interruptible() for NFS
    PM: sleep: core: Emit changed uevent on wakeup_sysfs_add/remove

    * pm-domains:
    PM: domains: Restore comment indentation for generic_pm_domain.child_links
    PM: domains: Fix up terminology with parent/child

    * powercap:
    powercap: Add Power Limit4 support
    powercap: idle_inject: Replace play_idle() with play_idle_precise() in comments
    powercap: intel_rapl: add support for Sapphire Rapids

    * pm-tools:
    pm-graph v5.7 - important s2idle fixes
    cpupower: Replace HTTP links with HTTPS ones
    cpupower: Fix NULL but dereferenced coccicheck errors
    cpupower: Fix comparing pointer to 0 coccicheck warns

    Rafael J. Wysocki
     

27 Jul, 2020

1 commit

  • Modern Intel Mobile platforms support power limit4 (PL4), which is
    the SoC package level maximum power limit (in Watts). It can be used
    to preemptively limits potential SoC power to prevent power spikes
    from tripping the power adapter and battery over-current protection.
    This patch enables this feature by exposing package level peak power
    capping control to userspace via RAPL sysfs interface. With this,
    application like DTPF can modify PL4 power limit, the similar way
    of other package power limit (PL1).
    As this feature is not tested on previous generations, here it is
    enabled only for the platform that has been verified to work,
    for safety concerns.

    Signed-off-by: Sumeet Pawnikar
    Co-developed-by: Zhang Rui
    Signed-off-by: Zhang Rui
    Reviewed-by: Srinivas Pandruvada
    Tested-by: Srinivas Pandruvada
    Signed-off-by: Rafael J. Wysocki

    Sumeet Pawnikar
     

24 Jun, 2020

1 commit


03 Jun, 2020

1 commit

  • Pull power management updates from Rafael Wysocki:
    "These rework the system-wide PM driver flags, make runtime switching
    of cpuidle governors easier, improve the user space hibernation
    interface code, add intel-speed-select interface documentation, add
    more debug messages to the ACPI code handling suspend to idle, update
    the cpufreq core and drivers, fix a minor issue in the cpuidle core
    and update two cpuidle drivers, improve the PM-runtime framework,
    update the Intel RAPL power capping driver, update devfreq core and
    drivers, and clean up the cpupower utility.

    Specifics:

    - Rework the system-wide PM driver flags to make them easier to
    understand and use and update their documentation (Rafael Wysocki,
    Alan Stern).

    - Allow cpuidle governors to be switched at run time regardless of
    the kernel configuration and update the related documentation
    accordingly (Hanjun Guo).

    - Improve the resume device handling in the user space hibernarion
    interface code (Domenico Andreoli).

    - Document the intel-speed-select sysfs interface (Srinivas
    Pandruvada).

    - Make the ACPI code handing suspend to idle print more debug
    messages to help diagnose issues with it (Rafael Wysocki).

    - Fix a helper routine in the cpufreq core and correct a typo in the
    struct cpufreq_driver kerneldoc comment (Rafael Wysocki, Wang
    Wenhu).

    - Update cpufreq drivers:

    - Make the intel_pstate driver start in the passive mode by
    default on systems without HWP (Rafael Wysocki).

    - Add i.MX7ULP support to the imx-cpufreq-dt driver and add
    i.MX7ULP to the cpufreq-dt-platdev blacklist (Peng Fan).

    - Convert the qoriq cpufreq driver to a platform one, make the
    platform code create a suitable device object for it and add
    platform dependencies to it (Mian Yousaf Kaukab, Geert
    Uytterhoeven).

    - Fix wrong compatible binding in the qcom driver (Ansuel Smith).

    - Build the omap driver by default for ARCH_OMAP2PLUS (Anders
    Roxell).

    - Add r8a7742 SoC support to the dt cpufreq driver (Lad
    Prabhakar).

    - Update cpuidle core and drivers:

    - Fix three reference count leaks in error code paths in the
    cpuidle core (Qiushi Wu).

    - Convert Qualcomm SPM to a generic cpuidle driver (Stephan
    Gerhold).

    - Fix up the execution order when entering a domain idle state in
    the PSCI driver (Ulf Hansson).

    - Fix a reference counting issue related to clock management and
    clean up two oddities in the PM-runtime framework (Rafael Wysocki,
    Andy Shevchenko).

    - Add ElkhartLake support to the Intel RAPL power capping driver and
    remove an unused local MSR definition from it (Jacob Pan, Sumeet
    Pawnikar).

    - Update devfreq core and drivers:

    - Replace strncpy() with strscpy() in the devfreq core and use
    lockdep asserts instead of manual checks for a locked mutex in
    it (Dmitry Osipenko, Krzysztof Kozlowski).

    - Add a generic imx bus scaling driver and make it register an
    interconnect device (Leonard Crestez, Gustavo A. R. Silva).

    - Make the cpufreq notifier in the tegra30 driver take boosting
    into account and delete an unuseful error message from that
    driver (Dmitry Osipenko, Markus Elfring).

    - Remove unneeded semicolon from the cpupower code (Zou Wei)"

    * tag 'pm-5.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (51 commits)
    cpuidle: Fix three reference count leaks
    PM: runtime: Replace pm_runtime_callbacks_present()
    PM / devfreq: Use lockdep asserts instead of manual checks for locked mutex
    PM / devfreq: imx-bus: Fix inconsistent IS_ERR and PTR_ERR
    PM / devfreq: Replace strncpy with strscpy
    PM / devfreq: imx: Register interconnect device
    PM / devfreq: Add generic imx bus scaling driver
    PM / devfreq: tegra30: Delete an error message in tegra_devfreq_probe()
    PM / devfreq: tegra30: Make CPUFreq notifier to take into account boosting
    PM: hibernate: Restrict writes to the resume device
    PM: runtime: clk: Fix clk_pm_runtime_get() error path
    cpuidle: Convert Qualcomm SPM driver to a generic CPUidle driver
    ACPI: EC: PM: s2idle: Extend GPE dispatching debug message
    ACPI: PM: s2idle: Print type of wakeup debug messages
    powercap: RAPL: remove unused local MSR define
    PM: runtime: Make clear what we do when conditions are wrong in rpm_suspend()
    Documentation: admin-guide: pm: Document intel-speed-select
    PM: hibernate: Split off snapshot dev option
    PM: hibernate: Incorporate concurrency handling
    Documentation: ABI: make current_governer_ro as a candidate for removal
    ...

    Linus Torvalds
     

07 May, 2020

1 commit

  • The single user could have called freeze_secondary_cpus() directly.

    Since this function was a source of confusion, remove it as it's
    just a pointless wrapper.

    While at it, rename enable_nonboot_cpus() to thaw_secondary_cpus() to
    preserve the naming symmetry.

    Done automatically via:

    git grep -l enable_nonboot_cpus | xargs sed -i 's/enable_nonboot_cpus/thaw_secondary_cpus/g'

    Signed-off-by: Qais Yousef
    Signed-off-by: Thomas Gleixner
    Cc: "Rafael J. Wysocki"
    Link: https://lkml.kernel.org/r/20200430114004.17477-1-qais.yousef@arm.com

    Qais Yousef
     

25 Apr, 2020

5 commits

  • Update the documentation of the driver flags for system-wide power
    management to reflect the current code flows and be more consistent.

    Signed-off-by: Rafael J. Wysocki

    Rafael J. Wysocki
     
  • Rename DPM_FLAG_LEAVE_SUSPENDED to DPM_FLAG_MAY_SKIP_RESUME which
    matches its purpose more closely.

    No functional impact.

    Suggested-by: Alan Stern
    Signed-off-by: Rafael J. Wysocki
    Acked-by: Wolfram Sang # for I2C
    Acked-by: Alan Stern
    Acked-by: Bjorn Helgaas

    Rafael J. Wysocki
     
  • Rename DPM_FLAG_NEVER_SKIP to DPM_FLAG_NO_DIRECT_COMPLETE which
    matches its purpose more closely.

    No functional impact.

    Suggested-by: Alan Stern
    Signed-off-by: Rafael J. Wysocki
    Acked-by: Bjorn Helgaas # for PCI parts
    Acked-by: Jeff Kirsher
    Acked-by: Alan Stern
    Acked-by: Bjorn Helgaas
    Acked-by: Alex Deucher

    Rafael J. Wysocki
     
  • The name of dev_pm_may_skip_resume() may be easily confused with the
    power.may_skip_resume flag which is not checked by that function, so
    rename the former as dev_pm_skip_resume().

    No functional impact.

    Suggested-by: Alan Stern
    Signed-off-by: Rafael J. Wysocki
    Acked-by: Alan Stern
    Acked-by: Bjorn Helgaas

    Rafael J. Wysocki
     
  • The current code in device_resume_noirq() causes the entire early
    resume and resume phases of device suspend to be skipped for
    devices for which the noirq resume phase have been skipped (due
    to the LEAVE_SUSPENDED flag being set) on the premise that those
    devices should stay in runtime-suspend after system-wide resume.

    However, that may not be correct in two situations. First, the
    middle layer (subsystem) noirq resume callback may be missing for
    a given device, but its early resume callback may be present and it
    may need to do something even if it decides to skip the driver
    callback. Second, if the device's wakeup settings were adjusted
    in the suspend phase without resuming the device (that was in
    runtime suspend at that time), they most likely need to be
    adjusted again in the resume phase and so the driver callback
    in that phase needs to be run.

    For the above reason, modify the core to allow the middle layer
    ->resume_late callback to run even if its ->resume_noirq callback
    is missing (and the core has skipped the driver-level callback
    in that phase) and to allow all device callbacks to run in the
    resume phase. Also make the core set the PM-runtime status of
    devices with SMART_SUSPEND set whose resume callbacks are not
    skipped to "active" in the "noirq" resume phase and update the
    affected subsystems (PCI and ACPI) accordingly.

    After this change, middle-layer (subsystem) callbacks will always
    be invoked in all phases of system suspend and resume and driver
    callbacks will always run in the prepare, suspend, resume, and
    complete phases for all devices.

    For devices with SMART_SUSPEND set, driver callbacks will be
    skipped in the late and noirq phases of system suspend if those
    devices remain in runtime suspend in __device_suspend_late().
    Driver callbacks will also be skipped for them during the
    noirq and early phases of the "thaw" transition related to
    hibernation in that case.

    Setting LEAVE_SUSPENDED means that the driver allows its callbacks
    to be skipped in the noirq and early phases of system resume, but
    some additional conditions need to be met for that to happen (among
    other things, the power.may_skip_resume flag needs to be set for the
    device during system suspend for the driver callbacks to be skipped
    during the subsequent resume transition).

    For all devices with SMART_SUSPEND set whose driver callbacks are
    invoked during system resume, the PM-runtime status will be set to
    "active" (by the core).

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Alan Stern
    Acked-by: Bjorn Helgaas

    Rafael J. Wysocki
     

30 Mar, 2020

2 commits

  • * pm-core:
    PM: runtime: Add pm_runtime_get_if_active()

    * pm-sleep:
    PM: sleep: wakeup: Skip wakeup_source_sysfs_remove() if device is not there
    PM / hibernate: Remove unnecessary compat ioctl overrides
    PM: hibernate: fix docs for ioctls that return loff_t via pointer
    PM: sleep: wakeup: Use built-in RCU list checking
    PM: sleep: core: Use built-in RCU list checking

    * pm-acpi:
    ACPI: PM: s2idle: Refine active GPEs check
    ACPICA: Allow acpi_any_gpe_status_set() to skip one GPE
    ACPI: PM: s2idle: Fix comment in acpi_s2idle_prepare_late()

    * pm-domains:
    cpuidle: psci: Split psci_dt_cpu_init_idle()
    PM / Domains: Allow no domain-idle-states DT property in genpd when parsing

    Rafael J. Wysocki
     
  • * pm-qos: (30 commits)
    PM: QoS: annotate data races in pm_qos_*_value()
    Documentation: power: fix pm_qos_interface.rst format warning
    PM: QoS: Make CPU latency QoS depend on CONFIG_CPU_IDLE
    Documentation: PM: QoS: Update to reflect previous code changes
    PM: QoS: Update file information comments
    PM: QoS: Drop PM_QOS_CPU_DMA_LATENCY and rename related functions
    sound: Call cpu_latency_qos_*() instead of pm_qos_*()
    drivers: usb: Call cpu_latency_qos_*() instead of pm_qos_*()
    drivers: tty: Call cpu_latency_qos_*() instead of pm_qos_*()
    drivers: spi: Call cpu_latency_qos_*() instead of pm_qos_*()
    drivers: net: Call cpu_latency_qos_*() instead of pm_qos_*()
    drivers: mmc: Call cpu_latency_qos_*() instead of pm_qos_*()
    drivers: media: Call cpu_latency_qos_*() instead of pm_qos_*()
    drivers: hsi: Call cpu_latency_qos_*() instead of pm_qos_*()
    drm: i915: Call cpu_latency_qos_*() instead of pm_qos_*()
    x86: platform: iosf_mbi: Call cpu_latency_qos_*() instead of pm_qos_*()
    cpuidle: Call cpu_latency_qos_limit() instead of pm_qos_request()
    PM: QoS: Add CPU latency QoS API wrappers
    PM: QoS: Adjust pm_qos_request() signature and reorder pm_qos.h
    PM: QoS: Simplify definitions of CPU latency QoS trace events
    ...

    Rafael J. Wysocki
     

14 Mar, 2020

1 commit


04 Mar, 2020

1 commit

  • pm_runtime_get_if_in_use() bumps up the PM-runtime usage count if it
    is not equal to zero and the device's PM-runtime status is 'active'.
    This works for drivers that do not use autoidle, but for those that
    do, the function returns zero even when the device is active.

    In order to maintain sane device state while the device is powered on
    in the hope that it'll be needed, pm_runtime_get_if_active(dev, true)
    returns a positive value if the device's PM-runtime status is 'active'
    when it is called, in which case it also increments the device's usage
    count.

    If the second argument of pm_runtime_get_if_active() is 'false', the
    function behaves just like pm_runtime_get_if_in_use(), so redefine
    the latter as a wrapper around the former.

    Signed-off-by: Sakari Ailus
    [ rjw: Changelog ]
    Signed-off-by: Rafael J. Wysocki

    Sakari Ailus
     

20 Feb, 2020

2 commits


14 Feb, 2020

1 commit


03 Feb, 2020

1 commit

  • There is some information in Documentation/power/interface.rst that
    is still missing from Documentation/admin-guide/pm/sleep-states.rst
    and really should be present in there, so update the latter by
    adding that information to it and delete the former (as it becomes
    redundant after that and it is somewhat outdated).

    While at it, clean up some assorted pieces of sleep-states.rst a bit.

    Signed-off-by: Rafael J. Wysocki

    Rafael J. Wysocki
     

04 Dec, 2019

1 commit

  • Pull PCI updates from Bjorn Helgaas:
    "Enumeration:

    - Warn if a host bridge has no NUMA info (Yunsheng Lin)

    - Add PCI_STD_NUM_BARS for the number of standard BARs (Denis
    Efremov)

    Resource management:

    - Fix boot-time Embedded Controller GPE storm caused by incorrect
    resource assignment after ACPI Bus Check Notification (Mika
    Westerberg)

    - Protect pci_reassign_bridge_resources() against concurrent
    addition/removal (Benjamin Herrenschmidt)

    - Fix bridge dma_ranges resource list cleanup (Rob Herring)

    - Add "pci=hpmmiosize" and "pci=hpmmioprefsize" parameters to control
    the MMIO and prefetchable MMIO window sizes of hotplug bridges
    independently (Nicholas Johnson)

    - Fix MMIO/MMIO_PREF window assignment that assigned more space than
    desired (Nicholas Johnson)

    - Only enforce bus numbers from bridge EA if the bridge has EA
    devices downstream (Subbaraya Sundeep)

    - Consolidate DT "dma-ranges" parsing and convert all host drivers to
    use shared parsing (Rob Herring)

    Error reporting:

    - Restore AER capability after resume (Mayurkumar Patel)

    - Add PoisonTLPBlocked AER counter (Rajat Jain)

    - Use for_each_set_bit() to simplify AER code (Andy Shevchenko)

    - Fix AER kernel-doc (Andy Shevchenko)

    - Add "pcie_ports=dpc-native" parameter to allow native use of DPC
    even if platform didn't grant control over AER (Olof Johansson)

    Hotplug:

    - Avoid returning prematurely from sysfs requests to enable or
    disable a PCIe hotplug slot (Lukas Wunner)

    - Don't disable interrupts twice when suspending hotplug ports (Mika
    Westerberg)

    - Fix deadlocks when PCIe ports are hot-removed while suspended (Mika
    Westerberg)

    Power management:

    - Remove unnecessary ASPM locking (Bjorn Helgaas)

    - Add support for disabling L1 PM Substates (Heiner Kallweit)

    - Allow re-enabling Clock PM after it has been disabled (Heiner
    Kallweit)

    - Add sysfs attributes for controlling ASPM link states (Heiner
    Kallweit)

    - Remove CONFIG_PCIEASPM_DEBUG, including "link_state" and "clk_ctl"
    sysfs files (Heiner Kallweit)

    - Avoid AMD FCH XHCI USB PME# from D0 defect that prevents wakeup on
    USB 2.0 or 1.1 connect events (Kai-Heng Feng)

    - Move power state check out of pci_msi_supported() (Bjorn Helgaas)

    - Fix incorrect MSI-X masking on resume and revert related nvme quirk
    for Kingston NVME SSD running FW E8FK11.T (Jian-Hong Pan)

    - Always return devices to D0 when thawing to fix hibernation with
    drivers like mlx4 that used legacy power management (previously we
    only did it for drivers with new power management ops) (Dexuan Cui)

    - Clear PCIe PME Status even for legacy power management (Bjorn
    Helgaas)

    - Fix PCI PM documentation errors (Bjorn Helgaas)

    - Use dev_printk() for more power management messages (Bjorn Helgaas)

    - Apply D2 delay as milliseconds, not microseconds (Bjorn Helgaas)

    - Convert xen-platform from legacy to generic power management (Bjorn
    Helgaas)

    - Removed unused .resume_early() and .suspend_late() legacy power
    management hooks (Bjorn Helgaas)

    - Rearrange power management code for clarity (Rafael J. Wysocki)

    - Decode power states more clearly ("4" or "D4" really refers to
    "D3cold") (Bjorn Helgaas)

    - Notice when reading PM Control register returns an error (~0)
    instead of interpreting it as being in D3hot (Bjorn Helgaas)

    - Add missing link delays required by the PCIe spec (Mika Westerberg)

    Virtualization:

    - Move pci_prg_resp_pasid_required() to CONFIG_PCI_PRI (Bjorn
    Helgaas)

    - Allow VFs to use PRI (the PF PRI is shared by the VFs, but the code
    previously didn't recognize that) (Kuppuswamy Sathyanarayanan)

    - Allow VFs to use PASID (the PF PASID capability is shared by the
    VFs, but the code previously didn't recognize that) (Kuppuswamy
    Sathyanarayanan)

    - Disconnect PF and VF ATS enablement, since ATS in PFs and
    associated VFs can be enabled independently (Kuppuswamy
    Sathyanarayanan)

    - Cache PRI and PASID capability offsets (Kuppuswamy Sathyanarayanan)

    - Cache the PRI PRG Response PASID Required bit (Bjorn Helgaas)

    - Consolidate ATS declarations in linux/pci-ats.h (Krzysztof
    Wilczynski)

    - Remove unused PRI and PASID stubs (Bjorn Helgaas)

    - Removed unnecessary EXPORT_SYMBOL_GPL() from ATS, PRI, and PASID
    interfaces that are only used by built-in IOMMU drivers (Bjorn
    Helgaas)

    - Hide PRI and PASID state restoration functions used only inside the
    PCI core (Bjorn Helgaas)

    - Add a DMA alias quirk for the Intel VCA NTB (Slawomir Pawlowski)

    - Serialize sysfs sriov_numvfs reads vs writes (Pierre Crégut)

    - Update Cavium ACS quirk for ThunderX2 and ThunderX3 (George
    Cherian)

    - Fix the UPDCR register address in the Intel ACS quirk (Steffen
    Liebergeld)

    - Unify ACS quirk implementations (Bjorn Helgaas)

    Amlogic Meson host bridge driver:

    - Fix meson PERST# GPIO polarity problem (Remi Pommarel)

    - Add DT bindings for Amlogic Meson G12A (Neil Armstrong)

    - Fix meson clock names to match DT bindings (Neil Armstrong)

    - Add meson support for Amlogic G12A SoC with separate shared PHY
    (Neil Armstrong)

    - Add meson extended PCIe PHY functions for Amlogic G12A USB3+PCIe
    combo PHY (Neil Armstrong)

    - Add arm64 DT for Amlogic G12A PCIe controller node (Neil Armstrong)

    - Add commented-out description of VIM3 USB3/PCIe mux in arm64 DT
    (Neil Armstrong)

    Broadcom iProc host bridge driver:

    - Invalidate iProc PAXB address mapping before programming it
    (Abhishek Shah)

    - Fix iproc-msi and mvebu __iomem annotations (Ben Dooks)

    Cadence host bridge driver:

    - Refactor Cadence PCIe host controller to use as a library for both
    host and endpoint (Tom Joseph)

    Freescale Layerscape host bridge driver:

    - Add layerscape LS1028a support (Xiaowei Bao)

    Intel VMD host bridge driver:

    - Add VMD bus 224-255 restriction decode (Jon Derrick)

    - Add VMD 8086:9A0B device ID (Jon Derrick)

    - Remove Keith from VMD maintainer list (Keith Busch)

    Marvell ARMADA 3700 / Aardvark host bridge driver:

    - Use LTSSM state to build link training flag since Aardvark doesn't
    implement the Link Training bit (Remi Pommarel)

    - Delay before training Aardvark link in case PERST# was asserted
    before the driver probe (Remi Pommarel)

    - Fix Aardvark issues with Root Control reads and writes (Remi
    Pommarel)

    - Don't rely on jiffies in Aardvark config access path since
    interrupts may be disabled (Remi Pommarel)

    - Fix Aardvark big-endian support (Grzegorz Jaszczyk)

    Marvell ARMADA 370 / XP host bridge driver:

    - Make mvebu_pci_bridge_emul_ops static (Ben Dooks)

    Microsoft Hyper-V host bridge driver:

    - Add hibernation support for Hyper-V virtual PCI devices (Dexuan
    Cui)

    - Track Hyper-V pci_protocol_version per-hbus, not globally (Dexuan
    Cui)

    - Avoid kmemleak false positive on hv hbus buffer (Dexuan Cui)

    Mobiveil host bridge driver:

    - Change mobiveil csr_read()/write() function names that conflict
    with riscv arch functions (Kefeng Wang)

    NVIDIA Tegra host bridge driver:

    - Fix Tegra CLKREQ dependency programming (Vidya Sagar)

    Renesas R-Car host bridge driver:

    - Remove unnecessary header include from rcar (Andrew Murray)

    - Tighten register index checking for rcar inbound range programming
    (Marek Vasut)

    - Fix rcar inbound range alignment calculation to improve packing of
    multiple entries (Marek Vasut)

    - Update rcar MACCTLR setting to match documentation (Yoshihiro
    Shimoda)

    - Clear bit 0 of MACCTLR before PCIETCTLR.CFINIT per manual
    (Yoshihiro Shimoda)

    - Add Marek Vasut and Yoshihiro Shimoda as R-Car maintainers (Simon
    Horman)

    Rockchip host bridge driver:

    - Make rockchip 0V9 and 1V8 power regulators non-optional (Robin
    Murphy)

    Socionext UniPhier host bridge driver:

    - Set uniphier to host (RC) mode always (Kunihiko Hayashi)

    Endpoint drivers:

    - Fix endpoint driver sign extension problem when shifting page
    number to phys_addr_t (Alan Mikhak)

    Misc:

    - Add NumaChip SPDX header (Krzysztof Wilczynski)

    - Replace EXTRA_CFLAGS with ccflags-y (Krzysztof Wilczynski)

    - Remove unused includes (Krzysztof Wilczynski)

    - Removed unused sysfs attribute groups (Ben Dooks)

    - Remove PTM and ASPM dependencies on PCIEPORTBUS (Bjorn Helgaas)

    - Add PCIe Link Control 2 register field definitions to replace magic
    numbers in AMDGPU and Radeon CIK/SI (Bjorn Helgaas)

    - Fix incorrect Link Control 2 Transmit Margin usage in AMDGPU and
    Radeon CIK/SI PCIe Gen3 link training (Bjorn Helgaas)

    - Use pcie_capability_read_word() instead of pci_read_config_word()
    in AMDGPU and Radeon CIK/SI (Frederick Lawler)

    - Remove unused pci_irq_get_node() Greg Kroah-Hartman)

    - Make asm/msi.h mandatory and simplify PCI_MSI_IRQ_DOMAIN Kconfig
    (Palmer Dabbelt, Michal Simek)

    - Read all 64 bits of Switchtec part_event_bitmap (Logan Gunthorpe)

    - Fix erroneous intel-iommu dependency on CONFIG_AMD_IOMMU (Bjorn
    Helgaas)

    - Fix bridge emulation big-endian support (Grzegorz Jaszczyk)

    - Fix dwc find_next_bit() usage (Niklas Cassel)

    - Fix pcitest.c fd leak (Hewenliang)

    - Fix typos and comments (Bjorn Helgaas)

    - Fix Kconfig whitespace errors (Krzysztof Kozlowski)"

    * tag 'pci-v5.5-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (160 commits)
    PCI: Remove PCI_MSI_IRQ_DOMAIN architecture whitelist
    asm-generic: Make msi.h a mandatory include/asm header
    Revert "nvme: Add quirk for Kingston NVME SSD running FW E8FK11.T"
    PCI/MSI: Fix incorrect MSI-X masking on resume
    PCI/MSI: Move power state check out of pci_msi_supported()
    PCI/MSI: Remove unused pci_irq_get_node()
    PCI: hv: Avoid a kmemleak false positive caused by the hbus buffer
    PCI: hv: Change pci_protocol_version to per-hbus
    PCI: hv: Add hibernation support
    PCI: hv: Reorganize the code in preparation of hibernation
    MAINTAINERS: Remove Keith from VMD maintainer
    PCI/ASPM: Remove PCIEASPM_DEBUG Kconfig option and related code
    PCI/ASPM: Add sysfs attributes for controlling ASPM link states
    PCI: Fix indentation
    drm/radeon: Prefer pcie_capability_read_word()
    drm/radeon: Replace numbers with PCI_EXP_LNKCTL2 definitions
    drm/radeon: Correct Transmit Margin masks
    drm/amdgpu: Prefer pcie_capability_read_word()
    PCI: uniphier: Set mode register to host mode
    drm/amdgpu: Replace numbers with PCI_EXP_LNKCTL2 definitions
    ...

    Linus Torvalds
     

21 Nov, 2019

5 commits

  • The struct pci_driver.suspend_late() hook is one of the legacy PCI power
    management callbacks, and there are no remaining users of it. Remove it.

    Link: https://lore.kernel.org/r/20191101204558.210235-7-helgaas@kernel.org
    Signed-off-by: Bjorn Helgaas
    Reviewed-by: Rafael J. Wysocki

    Bjorn Helgaas
     
  • The struct pci_driver.resume_early() hook is one of the legacy PCI power
    management callbacks, and there are no remaining users of it. Remove it.

    Link: https://lore.kernel.org/r/20191101204558.210235-6-helgaas@kernel.org
    Signed-off-by: Bjorn Helgaas
    Reviewed-by: Rafael J. Wysocki

    Bjorn Helgaas
     
  • Documentation/power/pci.rst is wrapped to fit in 80 columns, but directory
    structure changes made a few lines longer. Wrap them so they all fit in 80
    columns again.

    Link: https://lore.kernel.org/r/20191014230016.240912-7-helgaas@kernel.org
    Signed-off-by: Bjorn Helgaas
    Reviewed-by: Rafael J. Wysocki

    Bjorn Helgaas
     
  • Per PCIe r5.0 sec 7.5.2.1, PME may be generated from D0, so update
    Documentation/power/pci.rst to reflect that.

    Link: https://lore.kernel.org/r/20191016194450.68959-1-helgaas@kernel.org
    Signed-off-by: Bjorn Helgaas
    Reviewed-by: Rafael J. Wysocki

    Bjorn Helgaas
     
  • According to the documentation, pci_pm_thaw_noirq() did not put the device
    into the full-power state and restore its standard configuration registers.
    This is incorrect, so update the documentation to match the code.

    Link: https://lore.kernel.org/r/20191014230016.240912-3-helgaas@kernel.org
    Signed-off-by: Bjorn Helgaas
    Reviewed-by: Rafael J. Wysocki

    Bjorn Helgaas
     

20 Nov, 2019

1 commit


17 Sep, 2019

1 commit

  • * pm-opp:
    PM / OPP: Correct Documentation about library location
    opp: of: Support multiple suspend OPPs defined in DT
    dt-bindings: opp: Support multiple opp-suspend properties
    opp: core: add regulators enable and disable
    opp: Don't decrement uninitialized list_kref

    * pm-qos:
    PM: QoS: Get rid of unused flags

    * acpi-pm:
    ACPI: PM: Print debug messages on device power state changes

    * pm-domains:
    PM / Domains: Verify PM domain type in dev_pm_genpd_set_performance_state()
    PM / Domains: Simplify genpd_lookup_dev()
    PM / Domains: Align in-parameter names for some genpd functions

    * pm-tools:
    pm-graph: make setVal unbuffered again for python2 and python3
    cpupower: update German translation
    tools/power/cpupower: fix 64bit detection when cross-compiling
    cpupower: Add missing newline at end of file
    pm-graph v5.5

    Rafael J. Wysocki
     

05 Sep, 2019

1 commit

  • Pull operating performance points (OPP) framework changes for 5.4
    from Viresh Kumar:

    "This contains:

    - OPP core fixes to better support genpd devices (Viresh Kumar).
    - OPP core changes to support multiple suspend-opps in DT (Anson Huang).
    - New OPP API (dev_pm_opp_find_level_exact()) and Qcom OPP binding
    changes for CPR (Niklas Cassel).
    - Qcom minor update (Sricharan R).
    - OPP Documentation fix (Yue Hu).
    - OPP core support to enable/disable regulators (k.konieczny)."

    * 'opp/linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm:
    dt-bindings: opp: Add qcom-opp bindings with properties needed for CPR
    dt-bindings: opp: qcom-nvmem: Support pstates provided by a power domain
    dt-bindings: opp: qcom-nvmem: Make speedbin related properties optional
    dt-bindings: opp: Re-organise kryo cpufreq to use it for other nvmem based qcom socs
    PM / OPP: Correct Documentation about library location
    opp: of: Support multiple suspend OPPs defined in DT
    dt-bindings: opp: Support multiple opp-suspend properties
    opp: core: add regulators enable and disable
    opp: Don't decrement uninitialized list_kref
    opp: Add dev_pm_opp_find_level_exact()
    opp: Return genpd virtual devices from dev_pm_opp_attach_genpd()
    opp: Not all power-domains are scalable

    Rafael J. Wysocki
     

21 Aug, 2019

1 commit

  • The network_latency and network_throughput flags for PM-QoS have not
    found much use in drivers or in userspace since they were introduced.

    Commit 4a733ef1bea7 ("mac80211: remove PM-QoS listener") removed the
    only user PM_QOS_NETWORK_LATENCY in the kernel a while ago and there
    don't seem to be any userspace tools using the character device files
    either.

    PM_QOS_MEMORY_BANDWIDTH was never even added to the trace events.

    Remove all the flags except cpu_dma_latency.

    Signed-off-by: Amit Kucheria
    Acked-by: Pavel Machek
    Signed-off-by: Rafael J. Wysocki

    Amit Kucheria
     

26 Jul, 2019

1 commit


23 Jul, 2019

1 commit


19 Jul, 2019

1 commit

  • Pull more power management updates from Rafael Wysocki:
    "These modify the Intel RAPL driver to allow it to use an MMIO
    interface to the hardware, make the int340X thermal driver provide
    such an interface for it, add Intel Ice Lake CPU IDs to the RAPL
    driver (these changes depend on the previously merged x86 arch
    changes), update cpufreq to use the PM QoS framework for managing the
    min and max frequency limits, and add update the imx-cpufreq-dt
    cpufreq driver to support i.MX8MN.

    Specifics:

    - Add MMIO interface support to the Intel RAPL power capping driver
    and update the int340X thermal driver to provide a RAPL MMIO
    interface (Zhang Rui, Stephen Rothwell).

    - Add Intel Ice Lake CPU IDs to the RAPL driver (Zhang Rui, Rajneesh
    Bhardwaj).

    - Make cpufreq use the PM QoS framework (instead of notifiers) for
    managing the min and max frequency constraints (Viresh Kumar).

    - Add i.MX8MN support to the imx-cpufreq-dt cpufreq driver (Anson
    Huang)"

    * tag 'pm-5.3-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (27 commits)
    cpufreq: Make cpufreq_generic_init() return void
    intel_rapl: need linux/cpuhotplug.h for enum cpuhp_state
    powercap/rapl: Add Ice Lake NNPI support to RAPL driver
    powercap/intel_rapl: add support for ICX-D
    powercap/intel_rapl: add support for ICX
    powercap/intel_rapl: add support for IceLake desktop
    intel_rapl: Fix module autoloading issue
    int340X/processor_thermal_device: add support for MMIO RAPL
    intel_rapl: support two power limits for every RAPL domain
    intel_rapl: support 64 bit register
    intel_rapl: abstract RAPL common code
    intel_rapl: cleanup hardcoded MSR access
    intel_rapl: cleanup some functions
    intel_rapl: abstract register access operations
    intel_rapl: abstract register address
    intel_rapl: introduce struct rapl_if_private
    intel_rapl: introduce intel_rapl.h
    intel_rapl: remove hardcoded register index
    intel_rapl: use reg instead of msr
    cpufreq: imx-cpufreq-dt: Add i.MX8MN support
    ...

    Linus Torvalds
     

17 Jul, 2019

1 commit

  • The power docs are orphaned at the documentation body.

    While it could likely be moved to be inside some guide, I'm opting to just
    adding it to the main index.rst, removing the :orphan: and adding the SPDX
    header.

    The reason is similar to what it was done for other driver-specific
    subsystems: the docs there contain a mix of Kernelspace, uAPI and
    admin-guide. So, better to keep them on its own directory,
    while the docs there are not properly classified.

    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     

16 Jul, 2019

1 commit

  • Pull power supply and reset updates from Sebastian Reichel:
    "Core:
    - add HWMON compat layer
    - new properties:
    - input power limit
    - input voltage limit

    Drivers:
    - qcom-pon: add gen2 support
    - new driver for storing reboot move in NVMEM
    - new driver for Wilco EC charger configuration
    - simplify getting the adapter of a client"

    * tag 'for-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply:
    power: reset: nvmem-reboot-mode: add CONFIG_OF dependency
    power_supply: wilco_ec: Add charging config driver
    power: supply: cros: allow to set input voltage and current limit
    power: supply: add input power and voltage limit properties
    power: supply: fix semicolon.cocci warnings
    power: reset: nvmem-reboot-mode: use NVMEM as reboot mode write interface
    dt-bindings: power: reset: add document for NVMEM based reboot-mode
    reset: qcom-pon: Add support for gen2 pon
    dt-bindings: power: reset: qcom: Add qcom,pm8998-pon compatibility line
    power: supply: Add HWMON compatibility layer
    power: supply: sbs-manager: simplify getting the adapter of a client
    power: supply: rt9455_charger: simplify getting the adapter of a client
    power: supply: rt5033_battery: simplify getting the adapter of a client
    power: supply: max17042_battery: simplify getting the adapter of a client
    power: supply: max17040_battery: simplify getting the adapter of a client
    power: supply: max14656_charger_detector: simplify getting the adapter of a client
    power: supply: bq25890_charger: simplify getting the adapter of a client
    power: supply: bq24257_charger: simplify getting the adapter of a client
    power: supply: bq24190_charger: simplify getting the adapter of a client

    Linus Torvalds
     

04 Jul, 2019

2 commits

  • In order to allow dev_pm_qos_read_value() to read values for different
    QoS requests, pass request type as a parameter to these routines.

    For now, it only supports resume-latency request type but will be
    extended to frequency limit (min/max) constraints later on.

    Reviewed-by: Matthias Kaehlcke
    Reviewed-by: Ulf Hansson
    Signed-off-by: Viresh Kumar
    Signed-off-by: Rafael J. Wysocki

    Viresh Kumar
     
  • In order to use the same set of routines to register notifiers for
    different request types, update the existing
    dev_pm_qos_{add|remove}_notifier() routines with an additional
    parameter: request-type.

    For now, it only supports resume-latency request type but will be
    extended to frequency limit (min/max) constraints later on.

    Reviewed-by: Matthias Kaehlcke
    Reviewed-by: Ulf Hansson
    Signed-off-by: Viresh Kumar
    Signed-off-by: Rafael J. Wysocki

    Viresh Kumar
     

28 Jun, 2019

1 commit

  • For thermal management strategy you might be interested on limit the
    input power for a power supply. We already have current limit but
    basically what we probably want is to limit power. So, introduce the
    input_power_limit property.

    Although the common use case is limit the input power, in some
    specific cases it is the voltage that is problematic (i.e some regulators
    have different efficiencies at higher voltage resulting in more heat).
    So introduce also the input_voltage_limit property.

    This happens in one Chromebook and is used on the Pixel C's thermal
    management strategy to effectively limit the input power to 5V 3A when
    the screen is on. When the screen is on, the display, the CPU, and the GPU
    all contribute more heat to the system than while the screen is off, and
    we made a tradeoff to throttle the charger in order to give more of the
    thermal budget to those other components.

    So there's nothing fundamentally broken about the hardware that would
    cause the Pixel C to malfunction if we were charging at 9V or 12V instead
    of 5V when the screen is on, i.e. if userspace doesn't change this.

    What would happen is that you wouldn't meet Google's skin temperature
    targets on the system if the charger was allowed to run at 9V or 12V with
    the screen on.

    For folks hacking on Pixel Cs (which is now outside of Google's official
    support window for Android) and customizing their own kernel and userspace
    this would be acceptable, but we wanted to expose this feature in the
    power supply properties because the feature does exist in the Emedded
    Controller firmware of the Pixel C and all of Google's Chromebooks with
    USB-C made since 2015 in case someone running an up to date kernel wanted
    to limit the charging power for thermal or other reasons.

    This patch exposes a new property, similar to input current limit, to
    re-configure the maximum voltage from the external supply at runtime
    based on system-level knowledge or user input.

    Signed-off-by: Enric Balletbo i Serra
    Reviewed-by: Guenter Roeck
    Acked-by: Adam Thomson
    Reviewed-by: Benson Leung
    Signed-off-by: Sebastian Reichel

    Enric Balletbo i Serra
     

15 Jun, 2019

1 commit

  • Convert the PM documents to ReST, in order to allow them to
    build with Sphinx.

    The conversion is actually:
    - add blank lines and indentation in order to identify paragraphs;
    - fix tables markups;
    - add some lists markups;
    - mark literal blocks;
    - adjust title markups.

    At its new index.rst, let's add a :orphan: while this is not linked to
    the main index.rst file, in order to avoid build warnings.

    Signed-off-by: Mauro Carvalho Chehab
    Signed-off-by: Bjorn Helgaas
    Acked-by: Mark Brown
    Acked-by: Srivatsa S. Bhat (VMware)

    Mauro Carvalho Chehab
     

27 Jan, 2019

1 commit

  • Introduce a documentation file summarizing the key design points and
    APIs of the newly introduced Energy Model framework.

    Signed-off-by: Quentin Perret
    Signed-off-by: Peter Zijlstra (Intel)
    Cc: Linus Torvalds
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: corbet@lwn.net
    Cc: dietmar.eggemann@arm.com
    Cc: morten.rasmussen@arm.com
    Cc: patrick.bellasi@arm.com
    Cc: qais.yousef@arm.com
    Cc: rjw@rjwysocki.net
    Link: https://lkml.kernel.org/r/20190110110546.8101-2-quentin.perret@arm.com
    Signed-off-by: Ingo Molnar

    Quentin Perret
     

21 Nov, 2018

1 commit

  • Whilst making an unrelated change to some Documentation, Linus sayeth:

    | Afaik, even in Britain, "whilst" is unusual and considered more
    | formal, and "while" is the common word.
    |
    | [...]
    |
    | Can we just admit that we work with computers, and we don't need to
    | use þe eald Englisc spelling of words that most of the world never
    | uses?

    dictionary.com refers to the word as "Chiefly British", which is
    probably an undesirable attribute for technical documentation.

    Replace all occurrences under Documentation/ with "while".

    Cc: David Howells
    Cc: Liam Girdwood
    Cc: Chris Wilson
    Cc: Michael Halcrow
    Cc: Jonathan Corbet
    Reported-by: Linus Torvalds
    Signed-off-by: Will Deacon
    Signed-off-by: Jonathan Corbet

    Will Deacon