import thermald-2.4.6-1.el8

This commit is contained in:
CentOS Sources 2021-11-16 04:22:32 +00:00 committed by Stepan Oksanichenko
parent da304d099a
commit 21bb9b5f0f
7 changed files with 103 additions and 93 deletions

2
.gitignore vendored
View File

@ -1 +1 @@
SOURCES/thermald-2.4.1.tar.gz
SOURCES/thermald-2.4.6.tar.gz

View File

@ -1 +1 @@
097a89cbebd1da546ef4af8ea106b9a69f0d712d SOURCES/thermald-2.4.1.tar.gz
1b5f2aab3b231ebcae292813424f4a54561caa12 SOURCES/thermald-2.4.6.tar.gz

View File

@ -1,26 +0,0 @@
From d51e3d5f78ac0d90d3bf247f1fb61a53fa3b5a71 Mon Sep 17 00:00:00 2001
From: Benjamin Berg <bberg@redhat.com>
Date: Thu, 10 Dec 2020 11:35:46 +0100
Subject: [PATCH 1/3] adaptive: Fix missing initializer
The limit_1_valid attribute was not initialized to zero.
---
src/thd_engine_adaptive.cpp | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/thd_engine_adaptive.cpp b/src/thd_engine_adaptive.cpp
index d84f1ca..4824a9d 100644
--- a/src/thd_engine_adaptive.cpp
+++ b/src/thd_engine_adaptive.cpp
@@ -497,6 +497,8 @@ int cthd_engine_adaptive::parse_ppcc(char *name, char *buf, int len) {
if (ppcc.power_limit_1_max && ppcc.power_limit_1_min && ppcc.time_wind_1_min
&& ppcc.time_wind_1_max && ppcc.step_1_size)
ppcc.limit_1_valid = 1;
+ else
+ ppcc.limit_1_valid = 0;
ppccs.push_back(ppcc);
--
2.26.2

View File

@ -1,31 +0,0 @@
From a10d4ddeb8b55e238289d63a2623b8936eb6bda4 Mon Sep 17 00:00:00 2001
From: Benjamin Berg <bberg@redhat.com>
Date: Thu, 10 Dec 2020 11:36:43 +0100
Subject: [PATCH 2/3] adaptive: Fix use-after-free
The debug logging would access a recently free'ed variable. Fix this by
changing the order.
---
src/thd_engine_adaptive.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/thd_engine_adaptive.cpp b/src/thd_engine_adaptive.cpp
index 4824a9d..b68cc40 100644
--- a/src/thd_engine_adaptive.cpp
+++ b/src/thd_engine_adaptive.cpp
@@ -692,10 +692,11 @@ int cthd_engine_adaptive::parse_gddv_key(char *buf, int size, int *end_offset) {
str = strtok(key, "/");
if (!str) {
+ thd_log_debug("Ignoring key %s\n", key);
+
delete[] (key);
delete[] (val);
- thd_log_debug("Ignoring key %s\n", key);
/* Ignore */
return THD_SUCCESS;
}
--
2.26.2

View File

@ -1,27 +0,0 @@
From 268349088e0931421da65f4dce6997f197a10b12 Mon Sep 17 00:00:00 2001
From: Benjamin Berg <bberg@redhat.com>
Date: Thu, 10 Dec 2020 11:37:27 +0100
Subject: [PATCH 3/3] adaptive: Remove useless NULL check
_zone cannot be NULL in update_engine_state. Remove a useless check that
would have caused a crash earlier already.
---
src/thd_engine_adaptive.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/thd_engine_adaptive.cpp b/src/thd_engine_adaptive.cpp
index b68cc40..bc16ad2 100644
--- a/src/thd_engine_adaptive.cpp
+++ b/src/thd_engine_adaptive.cpp
@@ -1454,7 +1454,7 @@ void cthd_engine_adaptive::update_engine_state() {
_zone->zone_reset(1);
_zone->trip_delete_all();
- if (_zone && _zone->zone_active_status())
+ if (_zone->zone_active_status())
_zone->set_zone_inactive();
}
--
2.26.2

View File

@ -0,0 +1,93 @@
From d28613aea8179c068cfab853f5aa2a0c2b7adebf Mon Sep 17 00:00:00 2001
From: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Date: Thu, 19 Aug 2021 21:29:12 -0700
Subject: [PATCH 1/3] Added Jasper Lake CPU model
Support Jasper Lake.
---
src/thd_engine.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/thd_engine.cpp b/src/thd_engine.cpp
index e23f483..59c7659 100644
--- a/src/thd_engine.cpp
+++ b/src/thd_engine.cpp
@@ -697,6 +697,7 @@ static supported_ids_t id_table[] = {
{ 6, 0xa5 }, // Cometlake
{ 6, 0xa6 }, // Cometlake_L
{ 6, 0xa7 }, // Rocketlake
+ { 6, 0x9c }, // Jasper Lake
{ 0, 0 } // Last Invalid entry
};
--
2.31.1
From ffb226c62d3bc052f47970be9802254e48799bf4 Mon Sep 17 00:00:00 2001
From: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Date: Mon, 14 Jun 2021 10:12:38 -0700
Subject: [PATCH 2/3] Add AlderLake cpu model
Added AlderLake CPU models.
---
src/thd_engine.cpp | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/thd_engine.cpp b/src/thd_engine.cpp
index 59c7659..0202de5 100644
--- a/src/thd_engine.cpp
+++ b/src/thd_engine.cpp
@@ -698,6 +698,8 @@ static supported_ids_t id_table[] = {
{ 6, 0xa6 }, // Cometlake_L
{ 6, 0xa7 }, // Rocketlake
{ 6, 0x9c }, // Jasper Lake
+ { 6, 0x97 }, // Alderlake
+ { 6, 0x9a }, // Alderlake
{ 0, 0 } // Last Invalid entry
};
--
2.31.1
From d0c9e7fb5aea85b84841eba927feb8767765fda2 Mon Sep 17 00:00:00 2001
From: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Date: Tue, 22 Jun 2021 08:44:44 -0700
Subject: [PATCH 3/3] Update sysfs paths for Alader Lake
Update sysfs path for INT3400 device.
---
src/thd_engine_adaptive.cpp | 2 ++
src/thd_int3400.cpp | 2 ++
2 files changed, 4 insertions(+)
diff --git a/src/thd_engine_adaptive.cpp b/src/thd_engine_adaptive.cpp
index 20df937..247ca6c 100644
--- a/src/thd_engine_adaptive.cpp
+++ b/src/thd_engine_adaptive.cpp
@@ -1583,6 +1583,8 @@ int cthd_engine_adaptive::thd_engine_start(bool ignore_cpuid_check) {
int3400_base_path = "/sys/bus/platform/devices/INT3400:00/";
} else if (sysfs.exists("/sys/bus/platform/devices/INTC1040:00")) {
int3400_base_path = "/sys/bus/platform/devices/INTC1040:00/";
+ } else if (sysfs.exists("/sys/bus/platform/devices/INTC1041:00")) {
+ int3400_base_path = "/sys/bus/platform/devices/INTC1041:00/";
} else {
return THD_ERROR;
}
diff --git a/src/thd_int3400.cpp b/src/thd_int3400.cpp
index 4fabaee..a89f002 100644
--- a/src/thd_int3400.cpp
+++ b/src/thd_int3400.cpp
@@ -36,6 +36,8 @@ cthd_INT3400::cthd_INT3400(std::string _uuid) : uuid(_uuid), base_path("") {
base_path = "/sys/bus/acpi/devices/INT3400:00/physical_node/uuids/";
} else if (cdev_sysfs.exists("/sys/bus/acpi/devices/INTC1040:00/physical_node/uuids")) {
base_path = "/sys/bus/acpi/devices/INTC1040:00/physical_node/uuids/";
+ } else if (cdev_sysfs.exists("/sys/bus/acpi/devices/INTC1041:00/physical_node/uuids")) {
+ base_path = "/sys/bus/acpi/devices/INTC1041:00/physical_node/uuids/";
}
thd_log_info("INT3400 Base path is %s\n", base_path.c_str());
}
--
2.31.1

View File

@ -7,8 +7,8 @@
Name: thermald
Version: 2.4.1
Release: 2%{?dist}
Version: 2.4.6
Release: 1%{?dist}
Summary: Thermal Management daemon
License: GPLv2+
@ -36,11 +36,8 @@ Requires(pre): shadow-utils
%{?systemd_requires}
# https://github.com/intel/thermal_daemon/pull/286
Patch0001: 0001-adaptive-Fix-missing-initializer.patch
Patch0002: 0002-adaptive-Fix-use-after-free.patch
Patch0003: 0003-adaptive-Remove-useless-NULL-check.patch
# Alderlake and Jasperlake support have not been released yet
Patch0001: alderlake-jasperlake-upstream.patch
%description
%{name} monitors and controls platform temperature.
@ -248,6 +245,10 @@ exit 0
%changelog
* Fri Nov 12 2021 Benjamin Berg <bberg@redhat.com> - 2.4.6-1
- Update to 2.4.6 and newer CPU model support
Resolves: #1999368
* Thu Dec 10 2020 Benjamin Berg <bberg@redhat.com> - 2.4.1-2
- Fix problems reported by coverity
Related: #1875505