<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/pmdomain/core.c, branch v6.12.80</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.12.80</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.12.80'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2025-06-27T10:11:27+00:00</updated>
<entry>
<title>pmdomain: core: Reset genpd-&gt;states to avoid freeing invalid data</title>
<updated>2025-06-27T10:11:27+00:00</updated>
<author>
<name>Ulf Hansson</name>
<email>ulf.hansson@linaro.org</email>
</author>
<published>2025-04-02T12:06:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=33cd650d38e494f4b3cdc2c751b16f3015ea59de'/>
<id>urn:sha1:33cd650d38e494f4b3cdc2c751b16f3015ea59de</id>
<content type='text'>
[ Upstream commit 99012014c902cd9ad85fd288d8a107f33a69855e ]

If genpd_alloc_data() allocates data for the default power-states for the
genpd, let's make sure to also reset the pointer in the error path. This
makes sure a genpd provider driver doesn't end up trying to free the data
again, but using an invalid pointer.

Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Reviewed-by: Dhruva Gole &lt;d-gole@ti.com&gt;
Link: https://lore.kernel.org/r/20250402120613.1116711-1-ulf.hansson@linaro.org
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>pmdomain: core: Introduce dev_pm_genpd_rpm_always_on()</title>
<updated>2025-06-19T13:32:22+00:00</updated>
<author>
<name>Ulf Hansson</name>
<email>ulf.hansson@linaro.org</email>
</author>
<published>2025-02-05T06:15:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=80f7c5be4fe5031d89b0e324758c52eb1d5553fa'/>
<id>urn:sha1:80f7c5be4fe5031d89b0e324758c52eb1d5553fa</id>
<content type='text'>
[ Upstream commit cd3fa304ba5c93ce57b9b55b3cd893af2be96527 ]

For some usecases a consumer driver requires its device to remain power-on
from the PM domain perspective during runtime. Using dev PM qos along with
the genpd governors, doesn't work for this case as would potentially
prevent the device from being runtime suspended too.

To support these usecases, let's introduce dev_pm_genpd_rpm_always_on() to
allow consumers drivers to dynamically control the behaviour in genpd for a
device that is attached to it.

Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Signed-off-by: Shawn Lin &lt;shawn.lin@rock-chips.com&gt;
Acked-by: Manivannan Sadhasivam &lt;manivannan.sadhasivam@linaro.org&gt;
Link: https://lore.kernel.org/r/1738736156-119203-4-git-send-email-shawn.lin@rock-chips.com
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Stable-dep-of: 08f959759e1e ("mmc: sdhci-of-dwcmshc: add PD workaround on RK3576")
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>pmdomain: core: Fix error checking in genpd_dev_pm_attach_by_id()</title>
<updated>2025-05-29T09:03:21+00:00</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@linaro.org</email>
</author>
<published>2025-05-08T06:29:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e78908caf17cbddbceeac35bb54b1ada9610c4e6'/>
<id>urn:sha1:e78908caf17cbddbceeac35bb54b1ada9610c4e6</id>
<content type='text'>
commit 0f5757667ec0aaf2456c3b76fcf0c6c3ea3591fe upstream.

The error checking for of_count_phandle_with_args() does not handle
negative error codes correctly.  The problem is that "index" is a u32 so
in the condition "if (index &gt;= num_domains)" negative error codes stored
in "num_domains" are type promoted to very high positive values and
"index" is always going to be valid.

Test for negative error codes first and then test if "index" is valid.

Fixes: 3ccf3f0cd197 ("PM / Domains: Enable genpd_dev_pm_attach_by_id|name() for single PM domain")
Signed-off-by: Dan Carpenter &lt;dan.carpenter@linaro.org&gt;
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/aBxPQ8AI8N5v-7rL@stanley.mountain
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>pmdomain: core: add dummy release function to genpd device</title>
<updated>2025-01-09T12:33:32+00:00</updated>
<author>
<name>Lucas Stach</name>
<email>l.stach@pengutronix.de</email>
</author>
<published>2024-12-18T18:44:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=cba9d51794ecde58a21e4e96bcfd0a18f7dd4ff8'/>
<id>urn:sha1:cba9d51794ecde58a21e4e96bcfd0a18f7dd4ff8</id>
<content type='text'>
commit f64f610ec6ab59dd0391b03842cea3a4cd8ee34f upstream.

The genpd device, which is really only used as a handle to lookup
OPP, but not even registered to the device core otherwise and thus
lifetime linked to the genpd struct it is contained in, is missing
a release function. After b8f7bbd1f4ec ("pmdomain: core: Add
missing put_device()") the device will be cleaned up going through
the driver core device_release() function, which will warn when no
release callback is present for the device. Add a dummy release
function to shut up the warning.

Signed-off-by: Lucas Stach &lt;l.stach@pengutronix.de&gt;
Tested-by: Luca Ceresoli &lt;luca.ceresoli@bootlin.com&gt;
Fixes: b8f7bbd1f4ec ("pmdomain: core: Add missing put_device()")
Cc: stable@vger.kernel.org
Message-ID: &lt;20241218184433.1930532-1-l.stach@pengutronix.de&gt;
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>pmdomain: core: Fix error path in pm_genpd_init() when ida alloc fails</title>
<updated>2024-12-14T19:03:16+00:00</updated>
<author>
<name>Ulf Hansson</name>
<email>ulf.hansson@linaro.org</email>
</author>
<published>2024-11-22T13:42:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=913a3f1c06a4568f22bc1651912860fec65fbb11'/>
<id>urn:sha1:913a3f1c06a4568f22bc1651912860fec65fbb11</id>
<content type='text'>
[ Upstream commit 3e3b71d35a02cee4b2cc3d4255668a6609165518 ]

When the ida allocation fails we need to free up the previously allocated
memory before returning the error code. Let's fix this and while at it,
let's also move the ida allocation to genpd_alloc_data() and the freeing to
genpd_free_data(), as it better belongs there.

Fixes: 899f44531fe6 ("pmdomain: core: Add GENPD_FLAG_DEV_NAME_FW flag")
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Message-ID: &lt;20241122134207.157283-3-ulf.hansson@linaro.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>pmdomain: core: Add missing put_device()</title>
<updated>2024-12-14T19:03:15+00:00</updated>
<author>
<name>Ulf Hansson</name>
<email>ulf.hansson@linaro.org</email>
</author>
<published>2024-11-22T13:42:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a78af1180623f85a0deffc828cadf56ff6a3c721'/>
<id>urn:sha1:a78af1180623f85a0deffc828cadf56ff6a3c721</id>
<content type='text'>
[ Upstream commit b8f7bbd1f4ecff6d6277b8c454f62bb0a1c6dbe4 ]

When removing a genpd we don't clean up the genpd-&gt;dev correctly. Let's add
the missing put_device() in genpd_free_data() to fix this.

Fixes: 401ea1572de9 ("PM / Domain: Add struct device to genpd")
Cc: stable@vger.kernel.org
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Message-ID: &lt;20241122134207.157283-2-ulf.hansson@linaro.org&gt;
Stable-dep-of: 3e3b71d35a02 ("pmdomain: core: Fix error path in pm_genpd_init() when ida alloc fails")
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>pmdomain: core: Add GENPD_FLAG_DEV_NAME_FW flag</title>
<updated>2024-10-30T16:11:28+00:00</updated>
<author>
<name>Sibi Sankar</name>
<email>quic_sibis@quicinc.com</email>
</author>
<published>2024-10-30T12:55:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=899f44531fe6cac4b024710fec647ecc127724b8'/>
<id>urn:sha1:899f44531fe6cac4b024710fec647ecc127724b8</id>
<content type='text'>
Introduce GENPD_FLAG_DEV_NAME_FW flag which instructs genpd to generate
an unique device name using ida. It is aimed to be used by genpd providers
which derive their names directly from FW making them susceptible to
debugfs node creation failures.

Reported-by: Johan Hovold &lt;johan+linaro@kernel.org&gt;
Closes: https://lore.kernel.org/lkml/ZoQjAWse2YxwyRJv@hovoldconsulting.com/
Fixes: 718072ceb211 ("PM: domains: create debugfs nodes when adding power domains")
Suggested-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Suggested-by: Dmitry Baryshkov &lt;dmitry.baryshkov@linaro.org&gt;
Signed-off-by: Sibi Sankar &lt;quic_sibis@quicinc.com&gt;
Cc: stable@vger.kernel.org
Message-ID: &lt;20241030125512.2884761-5-quic_sibis@quicinc.com&gt;
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
</content>
</entry>
<entry>
<title>pmdomain: core: Reduce debug summary table width</title>
<updated>2024-09-13T11:41:33+00:00</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert+renesas@glider.be</email>
</author>
<published>2024-09-04T14:30:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c6ccb691d484544636bc4a097574c5c135ccccda'/>
<id>urn:sha1:c6ccb691d484544636bc4a097574c5c135ccccda</id>
<content type='text'>
Commit 9094e53ff5c86ebe ("pmdomain: core: Use dev_name() instead of
kobject_get_path() in debugfs") severely shortened the names of devices
in a PM Domain.  Now the most common format[1] consists of a 32-bit
unit-address (8 characters), followed by a dot and a node name (20
characters for "air-pollution-sensor" and "interrupt-controller", which
are the longest generic node names documented in the Devicetree
Specification), for a typical maximum of 29 characters.

This offers a good opportunity to reduce the table width of the debug
summary:
  - Reduce the device name field width from 50 to 30 characters, which
    matches the PM Domain name width,
  - Reduce the large inter-column space between the "performance" and
    "managed by" columns.

Visual impact:
  - The "performance" column now starts at a position that is a
    multiple of 16, just like the "status" and "children" columns,
  - All of the "/device", "runtime status", and "managed by" columns are
    now indented 4 characters more than the columns right above them,
  - Everything fits in (one less than) 80 characters again ;-)

[1] Note that some device names (e.g. TI AM335x interconnect target
    modules) do not follow this convention, and may be much longer, but
    these didn't fit in the old 50-character column width either.

Signed-off-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Link: https://lore.kernel.org/r/f8e1821364b6d5d11350447c128f6d2b470f33fe.1725459707.git.geert+renesas@glider.be
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
</content>
</entry>
<entry>
<title>pmdomain: core: Move mode_status_str()</title>
<updated>2024-09-13T11:39:27+00:00</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert+renesas@glider.be</email>
</author>
<published>2024-09-04T14:30:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2fc934190e7118f7c7ddd748302df44bde1015f6'/>
<id>urn:sha1:2fc934190e7118f7c7ddd748302df44bde1015f6</id>
<content type='text'>
Move mode_status_str() below perf_status_str(), to make declaration
order match calling order of the various *_status_str() helpers.

While at it, add a blank line for consistency among the three helpers.

Signed-off-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Link: https://lore.kernel.org/r/18ed6fb2bb92860f3af1bc7e5e4a01e9dacf2126.1725459707.git.geert+renesas@glider.be
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
</content>
</entry>
<entry>
<title>pmdomain: core: Fix "managed by" alignment in debug summary</title>
<updated>2024-09-13T11:38:41+00:00</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert+renesas@glider.be</email>
</author>
<published>2024-09-04T14:30:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=987a43e89ec67cc68518c0558db42ba542581597'/>
<id>urn:sha1:987a43e89ec67cc68518c0558db42ba542581597</id>
<content type='text'>
The "performance" column contains variable-width values.  Hence when
their printed values contain more than one digit, all values in
successive columns become misaligned.

Fix this by formatting it as a fixed-width field.  Adjust successive
spaces and field widths to retain the exiting layout.

Fixes: 0155aaf95a2a ("PM: domains: Add the domain HW-managed mode to the summary")
Signed-off-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Link: https://lore.kernel.org/r/e004f9d2a75e9a49c269507bb8a4514001751e85.1725459707.git.geert+renesas@glider.be
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
</content>
</entry>
</feed>
