<feed xmlns='http://www.w3.org/2005/Atom'>
<title>pm24.git/drivers/thermal, branch v6.8</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<id>https://git.kobert.dev/pm24.git/atom?h=v6.8</id>
<link rel='self' href='https://git.kobert.dev/pm24.git/atom?h=v6.8'/>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/'/>
<updated>2024-01-22T10:59:22Z</updated>
<entry>
<title>thermal: intel: powerclamp: Remove dead code for target mwait value</title>
<updated>2024-01-22T10:59:22Z</updated>
<author>
<name>Srinivas Pandruvada</name>
<email>srinivas.pandruvada@linux.intel.com</email>
</author>
<published>2024-01-18T12:23:40Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=c6a783be82c893c6f124a5853bef2edeaf26dadf'/>
<id>urn:sha1:c6a783be82c893c6f124a5853bef2edeaf26dadf</id>
<content type='text'>
After conversion of this driver to use powercap idle_inject core, this
driver doesn't use target_mwait value. So remove dead code.

Signed-off-by: Srinivas Pandruvada &lt;srinivas.pandruvada@linux.intel.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>thermal: loongson2: Replace of_device.h with explicit includes</title>
<updated>2024-01-19T14:08:53Z</updated>
<author>
<name>Rob Herring</name>
<email>robh@kernel.org</email>
</author>
<published>2023-10-09T19:45:08Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=ed7dafcc5364d5ff1ac85d7b18bf9a00ff28b6f8'/>
<id>urn:sha1:ed7dafcc5364d5ff1ac85d7b18bf9a00ff28b6f8</id>
<content type='text'>
The DT of_device.h and of_platform.h date back to the separate
of_platform_bus_type before it as merged into the regular platform bus.
As part of that merge prepping Arm DT support 13 years ago, they
"temporarily" include each other. They also include platform_device.h
and of.h.

of_device.h isn't needed, but mod_devicetable.h and property.h were
implicitly included.

Signed-off-by: Rob Herring &lt;robh@kernel.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'thermal-6.8-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm</title>
<updated>2024-01-17T22:47:33Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2024-01-17T22:47:33Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=d8e6ba025f5e45cb0821298919b0e07130cef877'/>
<id>urn:sha1:d8e6ba025f5e45cb0821298919b0e07130cef877</id>
<content type='text'>
Pull more thermal control updates from Rafael Wysocki:
 "These add support for debugfs-based diagnostics to the thermal core,
  simplify the thermal netlink API, fix system-wide PM support in the
  Intel HFI driver and clean up some code.

  Specifics:

   - Add debugfs-based diagnostics support to the thermal core (Daniel
     Lezcano, Dan Carpenter)

   - Fix a power allocator thermal governor issue preventing it from
     resetting cooling devices sometimes (Di Shen)

   - Simplify the thermal netlink API and clean up related code (Rafael
     J. Wysocki)

   - Make the Intel HFI driver support hibernation and deep suspend
     properly (Ricardo Neri)"

* tag 'thermal-6.8-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  thermal/debugfs: Unlock on error path in thermal_debug_tz_trip_up()
  thermal: intel: hfi: Add syscore callbacks for system-wide PM
  thermal: gov_power_allocator: avoid inability to reset a cdev
  thermal: helpers: Rearrange thermal_cdev_set_cur_state()
  thermal: netlink: Rework notify API for cooling devices
  thermal: core: Use kstrdup_const() during cooling device registration
  thermal/debugfs: Add thermal debugfs information for mitigation episodes
  thermal/debugfs: Add thermal cooling device debugfs information
  thermal: netlink: Pass thermal zone pointer to notify routines
  thermal: netlink: Drop thermal_notify_tz_trip_add/delete()
  thermal: netlink: Pass pointers to thermal_notify_tz_trip_up/down()
  thermal: netlink: Pass pointers to thermal_notify_tz_trip_change()
</content>
</entry>
<entry>
<title>Merge branches 'thermal-core' and 'thermal-intel'</title>
<updated>2024-01-16T11:33:15Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2024-01-16T11:33:15Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=dd75558b2d0b5e2b36ec0ef7e494d2763517d801'/>
<id>urn:sha1:dd75558b2d0b5e2b36ec0ef7e494d2763517d801</id>
<content type='text'>
Merge additional updates for 6.8-rc1 in the thermal core and in the
Intel HFI thermal driver:

 - Add debugfs-based diagnostics support to the thermal core (Daniel
   Lezcano, Dan Carpenter).

 - Fix a power allocator thermal governor issue preventing it from
   resetting cooling devices sometimes (Di Shen).

 - Simplify the thermal netlink API and clean up related code (Rafael J.
   Wysocki).

 - Make the Intel HFI driver support hibernation and deep suspend
   properly (Ricardo Neri).

* thermal-core:
  thermal/debugfs: Unlock on error path in thermal_debug_tz_trip_up()
  thermal: gov_power_allocator: avoid inability to reset a cdev
  thermal: helpers: Rearrange thermal_cdev_set_cur_state()
  thermal: netlink: Rework notify API for cooling devices
  thermal: core: Use kstrdup_const() during cooling device registration
  thermal/debugfs: Add thermal debugfs information for mitigation episodes
  thermal/debugfs: Add thermal cooling device debugfs information
  thermal: netlink: Pass thermal zone pointer to notify routines
  thermal: netlink: Drop thermal_notify_tz_trip_add/delete()
  thermal: netlink: Pass pointers to thermal_notify_tz_trip_up/down()
  thermal: netlink: Pass pointers to thermal_notify_tz_trip_change()

* thermal-intel:
  thermal: intel: hfi: Add syscore callbacks for system-wide PM
</content>
</entry>
<entry>
<title>thermal/debugfs: Unlock on error path in thermal_debug_tz_trip_up()</title>
<updated>2024-01-12T14:53:54Z</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@linaro.org</email>
</author>
<published>2024-01-12T14:30:18Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=6dcb35088e264306b948141971286257681ca412'/>
<id>urn:sha1:6dcb35088e264306b948141971286257681ca412</id>
<content type='text'>
Add a missing mutex_unlock(&amp;thermal_dbg-&gt;lock) to this error path.

Fixes: 7ef01f228c9f ("thermal/debugfs: Add thermal debugfs information for mitigation episodes")
Signed-off-by: Dan Carpenter &lt;dan.carpenter@linaro.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>thermal: intel: hfi: Add syscore callbacks for system-wide PM</title>
<updated>2024-01-12T14:44:42Z</updated>
<author>
<name>Ricardo Neri</name>
<email>ricardo.neri-calderon@linux.intel.com</email>
</author>
<published>2024-01-10T03:07:04Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=97566d09fd02d2ab329774bb89a2cdf2267e86d9'/>
<id>urn:sha1:97566d09fd02d2ab329774bb89a2cdf2267e86d9</id>
<content type='text'>
The kernel allocates a memory buffer and provides its location to the
hardware, which uses it to update the HFI table. This allocation occurs
during boot and remains constant throughout runtime.

When resuming from hibernation, the restore kernel allocates a second
memory buffer and reprograms the HFI hardware with the new location as
part of a normal boot. The location of the second memory buffer may
differ from the one allocated by the image kernel.

When the restore kernel transfers control to the image kernel, its HFI
buffer becomes invalid, potentially leading to memory corruption if the
hardware writes to it (the hardware continues to use the buffer from the
restore kernel).

It is also possible that the hardware "forgets" the address of the memory
buffer when resuming from "deep" suspend. Memory corruption may also occur
in such a scenario.

To prevent the described memory corruption, disable HFI when preparing to
suspend or hibernate. Enable it when resuming.

Add syscore callbacks to handle the package of the boot CPU (packages of
non-boot CPUs are handled via CPU offline). Syscore ops always run on the
boot CPU. Additionally, HFI only needs to be disabled during "deep" suspend
and hibernation. Syscore ops only run in these cases.

Cc: 6.1+ &lt;stable@vger.kernel.org&gt; # 6.1+
Signed-off-by: Ricardo Neri &lt;ricardo.neri-calderon@linux.intel.com&gt;
[ rjw: Comment adjustment, subject and changelog edits ]
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>thermal: gov_power_allocator: avoid inability to reset a cdev</title>
<updated>2024-01-12T14:38:23Z</updated>
<author>
<name>Di Shen</name>
<email>di.shen@unisoc.com</email>
</author>
<published>2024-01-10T11:55:26Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=e95fa7404716f6e25021e66067271a4ad8eb1486'/>
<id>urn:sha1:e95fa7404716f6e25021e66067271a4ad8eb1486</id>
<content type='text'>
Commit 0952177f2a1f ("thermal/core/power_allocator: Update once
cooling devices when temp is low") adds an update flag to avoid
triggering a thermal event when there is no need, and the thermal
cdev is updated once when the temperature is low.

But when the trips are writable, and switch_on_temp is set to be a
higher value, the cooling device state may not be reset to 0,
because last_temperature is smaller than switch_on_temp.

For example:
First:
switch_on_temp=70 control_temp=85;
Then userspace change the trip_temp:
switch_on_temp=45 control_temp=55 cur_temp=54

Then userspace reset the trip_temp:
switch_on_temp=70 control_temp=85 cur_temp=57 last_temp=54

At this time, the cooling device state should be reset to 0.
However, because cur_temp(57) &lt; switch_on_temp(70)
last_temp(54) &lt; switch_on_temp(70)  ----&gt;  update = false,
update is false, the cooling device state can not be reset.

Using the observation that tz-&gt;passive can also be regarded as the
temperature status, set the update flag to the tz-&gt;passive value.

When the temperature drops below switch_on for the first time, the
states of cooling devices can be reset once, and tz-&gt;passive is updated
to 0. In the next round, because tz-&gt;passive is 0, cdev-&gt;state will not
be updated.

By using the tz-&gt;passive value as the "update" flag, the issue above
can be solved, and the cooling devices can be updated only once when the
temperature is low.

Fixes: 0952177f2a1f ("thermal/core/power_allocator: Update once cooling devices when temp is low")
Cc: 5.13+ &lt;stable@vger.kernel.org&gt; # 5.13+
Suggested-by: Wei Wang &lt;wvw@google.com&gt;
Signed-off-by: Di Shen &lt;di.shen@unisoc.com&gt;
Reviewed-by: Lukasz Luba &lt;lukasz.luba@arm.com&gt;
[ rjw: Subject and changelog edits ]
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>thermal: helpers: Rearrange thermal_cdev_set_cur_state()</title>
<updated>2024-01-12T14:38:23Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2024-01-09T16:42:48Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=fd881eac3af6c4e36b34ce92d69fb1d7e95f5920'/>
<id>urn:sha1:fd881eac3af6c4e36b34ce92d69fb1d7e95f5920</id>
<content type='text'>
Change the code layout in thermal_cdev_set_cur_state() so it returns
early on errors which is more consistent with what happens elsewhere.

No intentional functional impact.

Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Reviewed-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
</content>
</entry>
<entry>
<title>thermal: netlink: Rework notify API for cooling devices</title>
<updated>2024-01-12T14:38:23Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2024-01-09T16:42:04Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=11fde939314836c4375b567d60407d752d987069'/>
<id>urn:sha1:11fde939314836c4375b567d60407d752d987069</id>
<content type='text'>
In analogy with some previous thermal netlink API changes, redefine
thermal_notify_cdev_state_update(), thermal_notify_cdev_add() and
thermal_notify_cdev_delete() to take a const cdev pointer as their
first argument and let them extract the requisite information from
there by themselves.

No intentional functional impact.

Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Reviewed-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
</content>
</entry>
<entry>
<title>thermal: core: Use kstrdup_const() during cooling device registration</title>
<updated>2024-01-12T14:38:23Z</updated>
<author>
<name>Christophe JAILLET</name>
<email>christophe.jaillet@wanadoo.fr</email>
</author>
<published>2024-01-05T13:45:11Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=57a427c81c322c5f0cdfe7c46cdee553d18b1ec6'/>
<id>urn:sha1:57a427c81c322c5f0cdfe7c46cdee553d18b1ec6</id>
<content type='text'>
Some *thermal_cooling_device_register() calls pass a string literal as
the 'type' parameter, so kstrdup_const() can be used instead of
kstrdup() to avoid a memory allocation in such cases.

Signed-off-by: Christophe JAILLET &lt;christophe.jaillet@wanadoo.fr&gt;
[ rjw: Subject and changelog edits ]
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
</feed>
