<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/acpi/thermal.c, branch linux-4.4.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.4.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.4.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2021-02-10T08:07:28Z</updated>
<entry>
<title>ACPI: thermal: Do not call acpi_thermal_check() directly</title>
<updated>2021-02-10T08:07:28Z</updated>
<author>
<name>Rafael J. Wysocki</name>
</author>
<published>2021-01-14T18:34:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=251014dca8755ec13fa3b6220834e17a1551d732'/>
<id>urn:sha1:251014dca8755ec13fa3b6220834e17a1551d732</id>
<content type='text'>
commit 81b704d3e4674e09781d331df73d76675d5ad8cb upstream.

Calling acpi_thermal_check() from acpi_thermal_notify() directly
is problematic if _TMP triggers Notify () on the thermal zone for
which it has been evaluated (which happens on some systems), because
it causes a new acpi_thermal_notify() invocation to be queued up
every time and if that takes place too often, an indefinite number of
pending work items may accumulate in kacpi_notify_wq over time.

Besides, it is not really useful to queue up a new invocation of
acpi_thermal_check() if one of them is pending already.

For these reasons, rework acpi_thermal_notify() to queue up a thermal
check instead of calling acpi_thermal_check() directly and only allow
one thermal check to be pending at a time.  Moreover, only allow one
acpi_thermal_check_fn() instance at a time to run
thermal_zone_device_update() for one thermal zone and make it return
early if it sees other instances running for the same thermal zone.

While at it, fold acpi_thermal_check() into acpi_thermal_check_fn(),
as it is only called from there after the other changes made here.

[This issue appears to have been exposed by commit 6d25be5782e4
 ("sched/core, workqueues: Distangle worker accounting from rq
 lock"), but it is unclear why it was not visible earlier.]

BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=208877
Reported-by: Stephen Berman &lt;stephen.berman@gmx.net&gt;
Diagnosed-by: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Reviewed-by: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Tested-by: Stephen Berman &lt;stephen.berman@gmx.net&gt;
Cc: All applicable &lt;stable@vger.kernel.org&gt;
[bigeasy: Backported to v4.4.y, use atomic_t instead of refcount_t]
Signed-off-by: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>linux/thermal.h: rename KELVIN_TO_CELSIUS to DECI_KELVIN_TO_CELSIUS</title>
<updated>2015-10-10T03:32:30Z</updated>
<author>
<name>Rasmus Villemoes</name>
</author>
<published>2015-10-01T21:45:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e866a2e3950fe2f708d5cc67d641b1725ef7a708'/>
<id>urn:sha1:e866a2e3950fe2f708d5cc67d641b1725ef7a708</id>
<content type='text'>
The macros KELVIN_TO_CELSIUS and CELSIUS_TO_KELVIN actually convert
between deciKelvins and Celsius, so rename them to reflect that. While
at it, use a statement expression in DECI_KELVIN_TO_CELSIUS to prevent
expanding the argument multiple times and get rid of a few casts.

Signed-off-by: Rasmus Villemoes &lt;linux@rasmusvillemoes.dk&gt;
Acked-by: Darren Hart &lt;dvhart@linux.intel.com&gt;
Signed-off-by: Zhang Rui &lt;rui.zhang@intel.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux</title>
<updated>2015-09-11T23:13:47Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2015-09-11T23:13:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9ebd051a7d5aa7b0ce813c3c2e5b9c851e7774b9'/>
<id>urn:sha1:9ebd051a7d5aa7b0ce813c3c2e5b9c851e7774b9</id>
<content type='text'>
Pull thermal updates from Zhang Rui:

 - use int instead of unsigned long to represent temperature to avoid
   bogus overheat detection when negative temperature reported.  From
   Sascha Hauer.

 - export available thermal governors information to user space via
   sysfs.  From Wei Ni.

 - introduce new thermal driver for Wildcat Point platform controller
   hub, which uses PCH thermal sensor and associated critical and hot
   trip points.  From Tushar Dave.

 - add suuport for Intel Skylake and Denlow platforms in powerclamp
   driver.

 - some small cleanups in thermal core.

* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux:
  thermal: Add Intel PCH thermal driver
  thermal: Add comment explaining test for critical temperature
  thermal: Use IS_ENABLED instead of #ifdef
  thermal: remove unnecessary call to thermal_zone_device_set_polling
  thermal: trivial: fix typo in comment
  thermal: consistently use int for temperatures
  thermal: add available policies sysfs attribute
  thermal/powerclamp: add cpu id for denlow platform
  thermal/powerclamp: add cpu id for Skylake u/y
  thermal/powerclamp: add cpu id for skylake h/s
</content>
</entry>
<entry>
<title>thermal: consistently use int for temperatures</title>
<updated>2015-08-03T15:15:50Z</updated>
<author>
<name>Sascha Hauer</name>
</author>
<published>2015-07-24T06:12:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=17e8351a77397e8a83727eb17e3a3e9b8ab5257a'/>
<id>urn:sha1:17e8351a77397e8a83727eb17e3a3e9b8ab5257a</id>
<content type='text'>
The thermal code uses int, long and unsigned long for temperatures
in different places.

Using an unsigned type limits the thermal framework to positive
temperatures without need. Also several drivers currently will report
temperatures near UINT_MAX for temperatures below 0°C. This will probably
immediately shut the machine down due to overtemperature if started below
0°C.

'long' is 64bit on several architectures. This is not needed since INT_MAX °mC
is above the melting point of all known materials.

Consistently use a plain 'int' for temperatures throughout the thermal code and
the drivers. This only changes the places in the drivers where the temperature
is passed around as pointer, when drivers internally use another type this is
not changed.

Signed-off-by: Sascha Hauer &lt;s.hauer@pengutronix.de&gt;
Acked-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Reviewed-by: Jean Delvare &lt;jdelvare@suse.de&gt;
Reviewed-by: Lukasz Majewski &lt;l.majewski@samsung.com&gt;
Reviewed-by: Darren Hart &lt;dvhart@linux.intel.com&gt;
Reviewed-by: Heiko Stuebner &lt;heiko@sntech.de&gt;
Reviewed-by: Peter Feuerer &lt;peter@piie.net&gt;
Cc: Punit Agrawal &lt;punit.agrawal@arm.com&gt;
Cc: Zhang Rui &lt;rui.zhang@intel.com&gt;
Cc: Eduardo Valentin &lt;edubezval@gmail.com&gt;
Cc: linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: Jean Delvare &lt;jdelvare@suse.de&gt;
Cc: Peter Feuerer &lt;peter@piie.net&gt;
Cc: Heiko Stuebner &lt;heiko@sntech.de&gt;
Cc: Lukasz Majewski &lt;l.majewski@samsung.com&gt;
Cc: Stephen Warren &lt;swarren@wwwdotorg.org&gt;
Cc: Thierry Reding &lt;thierry.reding@gmail.com&gt;
Cc: linux-acpi@vger.kernel.org
Cc: platform-driver-x86@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-omap@vger.kernel.org
Cc: linux-samsung-soc@vger.kernel.org
Cc: Guenter Roeck &lt;linux@roeck-us.net&gt;
Cc: Rafael J. Wysocki &lt;rjw@rjwysocki.net&gt;
Cc: Maxime Ripard &lt;maxime.ripard@free-electrons.com&gt;
Cc: Darren Hart &lt;dvhart@infradead.org&gt;
Cc: lm-sensors@lm-sensors.org
Signed-off-by: Zhang Rui &lt;rui.zhang@intel.com&gt;
</content>
</entry>
<entry>
<title>ACPI: Remove FSF mailing addresses</title>
<updated>2015-07-08T00:27:32Z</updated>
<author>
<name>Jarkko Nikula</name>
</author>
<published>2015-06-26T08:27:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4c62dbbce902cf2afa88cac89ec67c828160f431'/>
<id>urn:sha1:4c62dbbce902cf2afa88cac89ec67c828160f431</id>
<content type='text'>
There is no need to carry potentially outdated Free Software Foundation
mailing address in file headers since the COPYING file includes it.

Signed-off-by: Jarkko Nikula &lt;jarkko.nikula@linux.intel.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>thermal: of: fix cooling device weights in device tree</title>
<updated>2015-05-05T04:27:50Z</updated>
<author>
<name>Kapileshwar Singh</name>
</author>
<published>2015-02-18T16:04:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6cd9e9f629f11b9412d4e9aa294c029dbb36b3cf'/>
<id>urn:sha1:6cd9e9f629f11b9412d4e9aa294c029dbb36b3cf</id>
<content type='text'>
Currently you can specify the weight of the cooling device in the device
tree but that information is not populated to the
thermal_bind_params where the fair share governor expects it to
be.  The of thermal zone device doesn't have a thermal_bind_params
structure and arguably it's better to pass the weight inside the
thermal_instance as it is specific to the bind of a cooling device to a
thermal zone parameter.

Core thermal code is fixed to populate the weight in the instance from
the thermal_bind_params, so platform code that was passing the weight
inside the thermal_bind_params continue to work seamlessly.

While we are at it, create a default value for the weight parameter for
those thermal zones that currently don't define it and remove the
hardcoded default in of-thermal.

Cc: Zhang Rui &lt;rui.zhang@intel.com&gt;
Cc: "Rafael J. Wysocki" &lt;rjw@rjwysocki.net&gt;
Cc: Len Brown &lt;lenb@kernel.org&gt;
Cc: Peter Feuerer &lt;peter@piie.net&gt;
Cc: Darren Hart &lt;dvhart@infradead.org&gt;
Cc: Eduardo Valentin &lt;edubezval@gmail.com&gt;
Cc: Kukjin Kim &lt;kgene@kernel.org&gt;
Cc: Durgadoss R &lt;durgadoss.r@intel.com&gt;
Signed-off-by: Kapileshwar Singh &lt;kapileshwar.singh@arm.com&gt;
Signed-off-by: Eduardo Valentin &lt;edubezval@gmail.com&gt;
</content>
</entry>
<entry>
<title>Thermal: move the KELVIN_TO_MILLICELSIUS macro to thermal.h</title>
<updated>2014-10-10T05:57:15Z</updated>
<author>
<name>Aaron Lu</name>
</author>
<published>2014-03-25T02:40:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7b83fd9d91a411158f72d36958103c708c3b5a86'/>
<id>urn:sha1:7b83fd9d91a411158f72d36958103c708c3b5a86</id>
<content type='text'>
This macro can be used by other component so move it to a common header,
but in a slightly different way: define two macros, one macro with an
offset and the other doesn't.

Signed-off-by: Aaron Lu &lt;aaron.lu@intel.com&gt;
Signed-off-by: Zhang Rui &lt;rui.zhang@intel.com&gt;
</content>
</entry>
<entry>
<title>Merge back earlier ACPI thermal material.</title>
<updated>2014-05-29T11:28:14Z</updated>
<author>
<name>Rafael J. Wysocki</name>
</author>
<published>2014-05-29T11:28:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f70977fbd6359efb17bb93adac37b9f226d910a7'/>
<id>urn:sha1:f70977fbd6359efb17bb93adac37b9f226d910a7</id>
<content type='text'>
</content>
</entry>
<entry>
<title>ACPI / thermal: Use acpi_bus_attach_private_data() to attach private data</title>
<updated>2014-05-26T23:21:44Z</updated>
<author>
<name>Lan Tianyu</name>
</author>
<published>2014-05-20T12:59:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e6f8a4d60b905eae1a20cbb0c72c67b26b2f02fd'/>
<id>urn:sha1:e6f8a4d60b905eae1a20cbb0c72c67b26b2f02fd</id>
<content type='text'>
Use acpi_bus_attach_private_data() to attach private data
instead of acpi_attach_data().

Reviewed-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
Signed-off-by: Lan Tianyu &lt;tianyu.lan@intel.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>ACPI / thermal: fix workqueue destroy order</title>
<updated>2014-05-26T12:34:07Z</updated>
<author>
<name>Aaron Lu</name>
</author>
<published>2014-05-26T12:34:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2807bd18cc60ec471917b5158e98e4d7b7e030fb'/>
<id>urn:sha1:2807bd18cc60ec471917b5158e98e4d7b7e030fb</id>
<content type='text'>
When the thermal module is to be removed, we should destroy the wq
acpi_thermal_pm_queue after the ACPI driver's remove callback is
executed as we will need to flush the workqueue there, or a NULL pointer
access will be hit.

Reported-and-tested-by: Kui Zhang &lt;kuizhang@gmail.com&gt;
References: http://www.spinics.net/lists/kernel/msg1747251.html
Cc: All applicable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Aaron Lu &lt;aaron.lu@intel.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
</feed>
