<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/powercap, branch v5.17</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v5.17</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.17'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2021-12-27T15:51:12Z</updated>
<entry>
<title>Merge back earlier power capping changes for v5.17</title>
<updated>2021-12-27T15:51:12Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2021-12-27T15:51:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=36fd3609d0dd768404c205c805893e63e078d201'/>
<id>urn:sha1:36fd3609d0dd768404c205c805893e63e078d201</id>
<content type='text'>
</content>
</entry>
<entry>
<title>powercap/drivers/dtpm: Reduce trace verbosity</title>
<updated>2021-12-23T15:57:36Z</updated>
<author>
<name>Daniel Lezcano</name>
<email>daniel.lezcano@linaro.org</email>
</author>
<published>2021-11-23T10:16:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c1af85e442278fe120974358cf71c41bc48e0580'/>
<id>urn:sha1:c1af85e442278fe120974358cf71c41bc48e0580</id>
<content type='text'>
The traces when registering a powerzone is at the pr_info level and
should be changed to pr_debug as requested by Greg-KH.

Cc: Greg KH &lt;gregkh@linuxfoundation.org&gt;
Reviewed-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Link: https://lkml.kernel.org/r/YGAnRx8SiZHFPpY6@kroah.com
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
Link: https://lore.kernel.org/r/20211123101601.2433340-2-daniel.lezcano@linaro.org
</content>
</entry>
<entry>
<title>powercap: fix typo in a comment in idle_inject.c</title>
<updated>2021-12-17T15:30:19Z</updated>
<author>
<name>Jason Wang</name>
<email>wangborong@cdjrlc.com</email>
</author>
<published>2021-12-12T03:06:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=86ffed3de3acbc6e292870ea04dfa1102521a051'/>
<id>urn:sha1:86ffed3de3acbc6e292870ea04dfa1102521a051</id>
<content type='text'>
Drop superfluous "the" from the comment in line 15.

Signed-off-by: Jason Wang &lt;wangborong@cdjrlc.com&gt;
[ rjw: Subject edit, new changelog ]
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>powercap: intel_rapl: support new layout of Psys PowerLimit Register on SPR</title>
<updated>2021-12-17T15:13:14Z</updated>
<author>
<name>Zhang Rui</name>
<email>rui.zhang@intel.com</email>
</author>
<published>2021-12-07T13:17:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=931da6a0de5d620425af4425344259e6ff46b654'/>
<id>urn:sha1:931da6a0de5d620425af4425344259e6ff46b654</id>
<content type='text'>
On Sapphire Rapids, the layout of the Psys domain Power Limit Register
is different from from what it was before.

Enhance the code to support the new Psys PL register layout.

Signed-off-by: Zhang Rui &lt;rui.zhang@intel.com&gt;
Reported-and-tested-by: Alkattan Dana &lt;dana.alkattan@intel.com&gt;
[ rjw: Subject and changelog edits ]
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>powercap: DTPM: Drop unused local variable from init_dtpm()</title>
<updated>2021-12-03T16:51:59Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2021-12-03T16:51:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1ac5e21d43b2325854cf3b36b1509b28468dc6fd'/>
<id>urn:sha1:1ac5e21d43b2325854cf3b36b1509b28468dc6fd</id>
<content type='text'>
The dtpm_descr variable in init_dtpm() is not used after commit
f751db8adaea ("powercap/drivers/dtpm: Disable DTPM at boot time"),
so drop it.

Fixes: f751db8adaea ("powercap/drivers/dtpm: Disable DTPM at boot time")
Reported-by: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>powercap/drivers/dtpm: Disable DTPM at boot time</title>
<updated>2021-12-01T18:55:34Z</updated>
<author>
<name>Daniel Lezcano</name>
<email>daniel.lezcano@linaro.org</email>
</author>
<published>2021-11-26T23:08:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f751db8adaeaa4a5b200121973633ea45f4bb395'/>
<id>urn:sha1:f751db8adaeaa4a5b200121973633ea45f4bb395</id>
<content type='text'>
The DTPM framework misses a mechanism to set it up. That is currently
under review but will come after the next cycle.

As the distro are enabling all the kernel options, the DTPM framework
is enabled on platforms where the energy model is not implemented,
thus making the framework inconsistent and disrupting the CPU
frequency scaling service.

Remove the initialization at boot time as a hot fix.

Fixes: 7a89d7eacf8e ("powercap/drivers/dtpm: Simplify the dtpm table")
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
Reported-By: Doug Smythies &lt;dsmythies@telus.net&gt;
Tested-By: Doug Smythies &lt;dsmythies@telus.net&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>powercap: DTPM: Fix suspend failure and kernel warning</title>
<updated>2021-11-10T20:18:14Z</updated>
<author>
<name>Daniel Lezcano</name>
<email>daniel.lezcano@linaro.org</email>
</author>
<published>2021-11-08T06:23:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4d1cd1443db3d5605ebcde8672869b1944ade92d'/>
<id>urn:sha1:4d1cd1443db3d5605ebcde8672869b1944ade92d</id>
<content type='text'>
When the ENERGY_MODEL and DTPM_CPU are enabled but actually without
any energy model, at cpu hotplug time, the dead cpuhp callback fails
leading to the warning.

Actually, the check could be simplified and we only do an action if
the dtpm cpu is enabled, otherwise we bail out without error.

Fixes: 7a89d7eacf8e ("powercap/drivers/dtpm: Simplify the dtpm table")
Reported-by: Kenneth R. Crudup &lt;kenny@panix.com&gt;
Tested-by: Kenneth R. Crudup &lt;kenny@panix.com&gt;
Reported-by: kernel test robot &lt;oliver.sang@intel.com&gt;
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>powercap/drivers/dtpm: Fix power limit initialization</title>
<updated>2021-10-21T14:03:31Z</updated>
<author>
<name>Daniel Lezcano</name>
<email>daniel.lezcano@linaro.org</email>
</author>
<published>2021-03-18T20:52:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5d8cb8db9f791252ef5b7951b6d8cc6281de60a6'/>
<id>urn:sha1:5d8cb8db9f791252ef5b7951b6d8cc6281de60a6</id>
<content type='text'>
When a DTPM node is registered its power limit must be initialized to
the power max.

Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
Link: https://lore.kernel.org/r/20210318205238.21937-1-daniel.lezcano@linaro.org
</content>
</entry>
<entry>
<title>powercap/drivers/dtpm: Scale the power with the load</title>
<updated>2021-10-21T14:03:31Z</updated>
<author>
<name>Daniel Lezcano</name>
<email>daniel.lezcano@linaro.org</email>
</author>
<published>2021-03-12T13:04:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=eb82bace893169b319c563b7f813c58a0a5a9f76'/>
<id>urn:sha1:eb82bace893169b319c563b7f813c58a0a5a9f76</id>
<content type='text'>
Currently the power consumption is based on the current OPP power
assuming the entire performance domain is fully loaded.

That gives very gross power estimation and we can do much better by
using the load to scale the power consumption.

Use the utilization to normalize and scale the power usage over the
max possible power.

Tested on a rock960 with 2 big CPUS, the power consumption estimation
conforms with the expected one.

Before this change:

~$ ~/dhrystone -t 1 -l 10000&amp;
~$ cat /sys/devices/virtual/powercap/dtpm/dtpm:0/dtpm:0:1/constraint_0_max_power_uw
2260000

After this change:

~$ ~/dhrystone -t 1 -l 10000&amp;
~$ cat /sys/devices/virtual/powercap/dtpm/dtpm:0/dtpm:0:1/constraint_0_max_power_uw
1130000

~$ ~/dhrystone -t 2 -l 10000&amp;
~$ cat /sys/devices/virtual/powercap/dtpm/dtpm:0/dtpm:0:1/constraint_0_max_power_uw
2260000

Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
Reviewed-by: Lukasz Luba &lt;lukasz.luba@arm.com&gt;
Link: https://lore.kernel.org/r/20210312130411.29833-5-daniel.lezcano@linaro.org
</content>
</entry>
<entry>
<title>powercap/drivers/dtpm: Use container_of instead of a private data field</title>
<updated>2021-10-21T14:03:31Z</updated>
<author>
<name>Daniel Lezcano</name>
<email>daniel.lezcano@linaro.org</email>
</author>
<published>2021-03-12T13:04:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d2cdc6adc30879d81160199fc7c6ab890fc4bd4c'/>
<id>urn:sha1:d2cdc6adc30879d81160199fc7c6ab890fc4bd4c</id>
<content type='text'>
The dtpm framework provides an API to allocate a dtpm node. However
when a backend dtpm driver needs to allocate a dtpm node it must
define its own structure and store the pointer of this structure in
the private field of the dtpm structure.

It is more elegant to use the container_of macro and add the dtpm
structure inside the dtpm backend specific structure. The code will be
able to deal properly with the dtpm structure as a generic entity,
making all this even more self-encapsulated.

The dtpm_alloc() function does no longer make sense as the dtpm
structure will be allocated when allocating the device specific dtpm
structure. The dtpm_init() is provided instead.

Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
Reviewed-by: Lukasz Luba &lt;lukasz.luba@arm.com&gt;
Link: https://lore.kernel.org/r/20210312130411.29833-4-daniel.lezcano@linaro.org
</content>
</entry>
</feed>
