<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-dev/drivers/base/power, branch master</title>
<subtitle>Linux kernel development work - see feature branches</subtitle>
<id>https://git.zx2c4.com/linux-dev/atom/drivers/base/power?h=master</id>
<link rel='self' href='https://git.zx2c4.com/linux-dev/atom/drivers/base/power?h=master'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/'/>
<updated>2022-10-26T11:28:39Z</updated>
<entry>
<title>PM: domains: Fix handling of unavailable/disabled idle states</title>
<updated>2022-10-26T11:28:39Z</updated>
<author>
<name>Sudeep Holla</name>
<email>sudeep.holla@arm.com</email>
</author>
<published>2022-10-25T12:34:32Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=e0c57a5c70c13317238cb19a7ded0eab4a5f7de5'/>
<id>urn:sha1:e0c57a5c70c13317238cb19a7ded0eab4a5f7de5</id>
<content type='text'>
Platforms can provide the information about the availability of each
idle states via status flag. Platforms may have to disable one or more
idle states for various reasons like broken firmware or other unmet
dependencies.

Fix handling of such unavailable/disabled idle states by ignoring them
while parsing the states.

Fixes: a3381e3a65cb ("PM / domains: Fix up domain-idle-states OF parsing")
Signed-off-by: Sudeep Holla &lt;sudeep.holla@arm.com&gt;
Reviewed-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>PM: domains: log failures to register always-on domains</title>
<updated>2022-10-04T14:26:11Z</updated>
<author>
<name>Johan Hovold</name>
<email>johan+linaro@kernel.org</email>
</author>
<published>2022-09-29T15:42:14Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=129b60c957711a20434f4d4404652f0720e1ba1d'/>
<id>urn:sha1:129b60c957711a20434f4d4404652f0720e1ba1d</id>
<content type='text'>
Always-on PM domains must be on during initialisation or the domain is
currently silently rejected.

Print an error message in case an always-on domain is not on to make it
easier to debug drivers getting this wrong (e.g. by setting an always-on
genpd flag without making sure that the state matches).

Signed-off-by: Johan Hovold &lt;johan+linaro@kernel.org&gt;
Reviewed-by: Kevin Hilman &lt;khilman@baylibre.com&gt;
Reviewed-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>Merge branches 'pm-cpuidle', 'pm-core', 'pm-sleep' and 'powercap'</title>
<updated>2022-10-03T18:27:49Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2022-10-03T18:27:49Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=ac73ce394a129a88cb01ce190844bcd172ce14fb'/>
<id>urn:sha1:ac73ce394a129a88cb01ce190844bcd172ce14fb</id>
<content type='text'>
Merge cpuidle changes, PM core changes and power capping changes for
6.1-rc1:

 - Add AlderLake-N support to intel_idle (Zhang Rui).

 - Replace strlcpy() with unused retval with strscpy() in intel_idle
   (Wolfram Sang).

 - Remove redundant check from cpuidle_switch_governor() (Yu Liao).

 - Replace strlcpy() with unused retval with strscpy() in the powernv
   cpuidle driver (Wolfram Sang).

 - Drop duplicate word from a comment in the coupled cpuidle driver
   (Jason Wang).

 - Make rpm_resume() return -EINPROGRESS if RPM_NOWAIT is passed to it
   in the flags and the device is about to resume (Rafael Wysocki).

 - Add extra debugging statement for multiple active IRQs to system
   wakeup handling code (Mario Limonciello).

 - Replace strlcpy() with unused retval with strscpy() in the core
   system suspend support code (Wolfram Sang).

 - Update the intel_rapl power capping driver:
   * Use standard Energy Unit for SPR Dram RAPL domain (Zhang Rui).
   * Add support for RAPTORLAKE_S (Zhang Rui).
   * Fix UBSAN shift-out-of-bounds issue (Chao Qin).

* pm-cpuidle:
  intel_idle: Add AlderLake-N support
  cpuidle: Remove redundant check in cpuidle_switch_governor()
  intel_idle: move from strlcpy() with unused retval to strscpy()
  cpuidle: powernv: move from strlcpy() with unused retval to strscpy()
  cpuidle: coupled: Drop duplicate word from a comment

* pm-core:
  PM: runtime: Return -EINPROGRESS from rpm_resume() in the RPM_NOWAIT case

* pm-sleep:
  PM: wakeup: Add extra debugging statement for multiple active IRQs
  PM: suspend: move from strlcpy() with unused retval to strscpy()

* powercap:
  powercap: intel_rapl: Use standard Energy Unit for SPR Dram RAPL domain
  powercap: intel_rapl: fix UBSAN shift-out-of-bounds issue
  powercap: intel_rapl: Add support for RAPTORLAKE_S
</content>
</entry>
<entry>
<title>PM: runtime: Return -EINPROGRESS from rpm_resume() in the RPM_NOWAIT case</title>
<updated>2022-09-24T17:28:51Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2022-09-22T18:04:40Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=e66332a4bc89e3219baaabc7bb549d17a2c42ce9'/>
<id>urn:sha1:e66332a4bc89e3219baaabc7bb549d17a2c42ce9</id>
<content type='text'>
The prospective callers of rpm_resume() passing RPM_NOWAIT to it may
be confused when it returns 0 without actually resuming the device
which may happen if the device is suspending at the given time and it
will only resume when the suspend in progress has completed.  To avoid
that confusion, return -EINPROGRESS from rpm_resume() in that case.

Since none of the current callers passing RPM_NOWAIT to rpm_resume()
check its return value, this change has no functional impact.

Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Acked-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Reviewed-by: Douglas Anderson &lt;dianders@chromium.org&gt;
Reviewed-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
</content>
</entry>
<entry>
<title>PM: wakeup: Add extra debugging statement for multiple active IRQs</title>
<updated>2022-09-03T18:04:33Z</updated>
<author>
<name>Mario Limonciello</name>
<email>mario.limonciello@amd.com</email>
</author>
<published>2022-08-25T01:36:30Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=cb3e7d624c3ff34a300587929c82af7364cf5c09'/>
<id>urn:sha1:cb3e7d624c3ff34a300587929c82af7364cf5c09</id>
<content type='text'>
Since commit cb1f65c1e1424 ("PM: s2idle: ACPI: Fix wakeup interrupts
handling") was introduced the kernel can now handle multiple
simultaneous interrupts during wakeup.  Ths uncovered some existing
subtle firmware bugs where multiple IRQs are unintentionally active.

To help with fixing those bugs add an extra message when PM debugging
is enabled that can show the individual IRQs triggered as if a variety
are fired they'll potentially be lost as /sys/power/pm_wakeup_irq only
contains the first one that triggered the wakeup after resume is
complete but all may be needed to demonstrate the whole picture.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=215770
Signed-off-by: Mario Limonciello &lt;mario.limonciello@amd.com&gt;
[ rjw: Added empty line after if () ]
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>Revert "PM: domains: Delete usage of driver_deferred_probe_check_state()"</title>
<updated>2022-08-23T11:14:02Z</updated>
<author>
<name>Saravana Kannan</name>
<email>saravanak@google.com</email>
</author>
<published>2022-08-19T22:16:13Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=e20813dcdc05aa295ef586b518142d0fab4c5692'/>
<id>urn:sha1:e20813dcdc05aa295ef586b518142d0fab4c5692</id>
<content type='text'>
This reverts commit 5a46079a96451cfb15e4f5f01f73f7ba24ef851a.

Quite a few issues have been reported [1][2][3][4][5][6] on the original
commit. While about half of them have been fixed, I'll need to fix the rest
before driver_deferred_probe_check_state() can be deleted. So, revert the
deletion for now.

[1] - https://lore.kernel.org/all/DU0PR04MB941735271F45C716342D0410886B9@DU0PR04MB9417.eurprd04.prod.outlook.com/
[2] - https://lore.kernel.org/all/CM6REZS9Z8AC.2KCR9N3EFLNQR@otso/
[3] - https://lore.kernel.org/all/CAD=FV=XYVwaXZxqUKAuM5c7NiVjFz5C6m6gAHSJ7rBXBF94_Tg@mail.gmail.com/
[4] - https://lore.kernel.org/all/Yvpd2pwUJGp7R+YE@euler/
[5] - https://lore.kernel.org/lkml/20220601070707.3946847-2-saravanak@google.com/
[6] - https://lore.kernel.org/all/CA+G9fYt_cc5SiNv1Vbse=HYY_+uc+9OYPZuJ-x59bROSaLN6fw@mail.gmail.com/

Fixes: 5a46079a9645 ("PM: domains: Delete usage of driver_deferred_probe_check_state()")
Reported-by: Peng Fan &lt;peng.fan@nxp.com&gt;
Reported-by: Luca Weiss &lt;luca.weiss@fairphone.com&gt;
Reported-by: Doug Anderson &lt;dianders@chromium.org&gt;
Reported-by: Colin Foster &lt;colin.foster@in-advantage.com&gt;
Reported-by: Tony Lindgren &lt;tony@atomide.com&gt;
Reported-by: Alexander Stein &lt;alexander.stein@ew.tq-group.com&gt;
Reported-by: Naresh Kamboju &lt;naresh.kamboju@linaro.org&gt;
Tested-by: Tony Lindgren &lt;tony@atomide.com&gt;
Tested-by: Peng Fan &lt;peng.fan@nxp.com&gt;
Tested-by: Douglas Anderson &lt;dianders@chromium.org&gt;
Tested-by: Alexander Stein &lt;alexander.stein@ew.tq-group.com&gt;
Reviewed-by: Tony Lindgren &lt;tony@atomide.com&gt;
Acked-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Signed-off-by: Saravana Kannan &lt;saravanak@google.com&gt;
Link: https://lore.kernel.org/r/20220819221616.2107893-4-saravanak@google.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'driver-core-6.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core</title>
<updated>2022-08-04T18:31:20Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2022-08-04T18:31:20Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=cfeafd94668910334a77c9437a18212baf9f5610'/>
<id>urn:sha1:cfeafd94668910334a77c9437a18212baf9f5610</id>
<content type='text'>
Pull driver core / kernfs updates from Greg KH:
 "Here is the set of driver core and kernfs changes for 6.0-rc1.

  The "biggest" thing in here is some scalability improvements for
  kernfs for large systems. Other than that, included in here are:

   - arch topology and cache info changes that have been reviewed and
     discussed a lot.

   - potential error path cleanup fixes

   - deferred driver probe cleanups

   - firmware loader cleanups and tweaks

   - documentation updates

   - other small things

  All of these have been in the linux-next tree for a while with no
  reported problems"

* tag 'driver-core-6.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (63 commits)
  docs: embargoed-hardware-issues: fix invalid AMD contact email
  firmware_loader: Replace kmap() with kmap_local_page()
  sysfs docs: ABI: Fix typo in comment
  kobject: fix Kconfig.debug "its" grammar
  kernfs: Fix typo 'the the' in comment
  docs: driver-api: firmware: add driver firmware guidelines. (v3)
  arch_topology: Fix cache attributes detection in the CPU hotplug path
  ACPI: PPTT: Leave the table mapped for the runtime usage
  cacheinfo: Use atomic allocation for percpu cache attributes
  drivers/base: fix userspace break from using bin_attributes for cpumap and cpulist
  MAINTAINERS: Change mentions of mpm to olivia
  docs: ABI: sysfs-devices-soc: Update Lee Jones' email address
  docs: ABI: sysfs-class-pwm: Update Lee Jones' email address
  Documentation/process: Add embargoed HW contact for LLVM
  Revert "kernfs: Change kernfs_notify_list to llist."
  ACPI: Remove the unused find_acpi_cpu_cache_topology()
  arch_topology: Warn that topology for nested clusters is not supported
  arch_topology: Add support for parsing sockets in /cpu-map
  arch_topology: Set cluster identifier in each core/thread from /cpu-map
  arch_topology: Limit span of cpu_clustergroup_mask()
  ...
</content>
</entry>
<entry>
<title>Merge branches 'pm-core', 'pm-sleep', 'powercap', 'pm-domains' and 'pm-em'</title>
<updated>2022-07-29T17:33:13Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2022-07-29T17:33:13Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=954a83fc60c805f138db26747645710f243a9939'/>
<id>urn:sha1:954a83fc60c805f138db26747645710f243a9939</id>
<content type='text'>
Merge core device power management changes for v5.20-rc1:

 - Extend support for wakeirq to callback wrappers used during system
   suspend and resume (Ulf Hansson).

 - Defer waiting for device probe before loading a hibernation image
   till the first actual device access to avoid possible deadlocks
   reported by syzbot (Tetsuo Handa).

 - Unify device_init_wakeup() for PM_SLEEP and !PM_SLEEP (Bjorn
   Helgaas).

 - Add Raptor Lake-P to the list of processors supported by the Intel
   RAPL driver (George D Sworo).

 - Add Alder Lake-N and Raptor Lake-P to the list of processors for
   which Power Limit4 is supported in the Intel RAPL driver (Sumeet
   Pawnikar).

 - Make pm_genpd_remove() check genpd_debugfs_dir against NULL before
   attempting to remove it (Hsin-Yi Wang).

 - Change the Energy Model code to represent power in micro-Watts and
   adjust its users accordingly (Lukasz Luba).

* pm-core:
  PM: runtime: Extend support for wakeirq for force_suspend|resume

* pm-sleep:
  PM: hibernate: defer device probing when resuming from hibernation
  PM: wakeup: Unify device_init_wakeup() for PM_SLEEP and !PM_SLEEP

* powercap:
  powercap: RAPL: Add Power Limit4 support for Alder Lake-N and Raptor Lake-P
  powercap: intel_rapl: Add support for RAPTORLAKE_P

* pm-domains:
  PM: domains: Ensure genpd_debugfs_dir exists before remove

* pm-em:
  cpufreq: scmi: Support the power scale in micro-Watts in SCMI v3.1
  firmware: arm_scmi: Get detailed power scale from perf
  Documentation: EM: Switch to micro-Watts scale
  PM: EM: convert power field to micro-Watts precision and align drivers
</content>
</entry>
<entry>
<title>PM: domains: Ensure genpd_debugfs_dir exists before remove</title>
<updated>2022-07-14T18:50:06Z</updated>
<author>
<name>Hsin-Yi Wang</name>
<email>hsinyi@chromium.org</email>
</author>
<published>2022-07-05T17:16:49Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=37101d3c719386040ded735a5ec06974f1d94d1f'/>
<id>urn:sha1:37101d3c719386040ded735a5ec06974f1d94d1f</id>
<content type='text'>
Both genpd_debug_add() and genpd_debug_remove() may be called
indirectly by other drivers while genpd_debugfs_dir is not yet
set. For example, drivers can call pm_genpd_init() in probe or
pm_genpd_init() in probe fail/cleanup path:

pm_genpd_init()
 --&gt; genpd_debug_add()

pm_genpd_remove()
 --&gt; genpd_remove()
   --&gt; genpd_debug_remove()

At this time, genpd_debug_init() may not yet be called.

genpd_debug_add() checks that if genpd_debugfs_dir is NULL, it
will return directly. Make sure this is also checked
in pm_genpd_remove(), otherwise components under debugfs root
which has the same name as other components under pm_genpd may
be accidentally removed, since NULL represents debugfs root.

Fixes: 718072ceb211 ("PM: domains: create debugfs nodes when adding power domains")
Signed-off-by: Hsin-Yi Wang &lt;hsinyi@chromium.org&gt;
Reviewed-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Reviewed-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Reviewed-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>PM: runtime: Extend support for wakeirq for force_suspend|resume</title>
<updated>2022-07-08T19:29:06Z</updated>
<author>
<name>Ulf Hansson</name>
<email>ulf.hansson@linaro.org</email>
</author>
<published>2022-06-08T15:31:20Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=c46a0d5ae4f93800d2d90f3a3290e58a2f4b6bdf'/>
<id>urn:sha1:c46a0d5ae4f93800d2d90f3a3290e58a2f4b6bdf</id>
<content type='text'>
A driver that makes use of pm_runtime_force_suspend|resume() to support
system suspend/resume, currently needs to manage the wakeirq support
itself. To avoid the boilerplate code in the driver's system suspend/resume
callbacks in particular, let's extend pm_runtime_force_suspend|resume() to
deal with the wakeirq.

Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Reviewed-by: Tony Lindgren &lt;tony@atomide.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
</feed>
