Added support for Intel GLK platforms (by intel-glk-support patch)
Added support for Intel CNL-U/Y platforms (by intel-cnluy-support patch) Fixed problem with some C-states overwriting others (by cstates-rewrite-fix patch)
This commit is contained in:
parent
28fabd0e29
commit
ca7d43bd06
41
powertop-2.9-cstates-rewrite-fix.patch
Normal file
41
powertop-2.9-cstates-rewrite-fix.patch
Normal file
@ -0,0 +1,41 @@
|
||||
From f3f350f138912dc89abb37676f7e65fc6057ec53 Mon Sep 17 00:00:00 2001
|
||||
From: Gautam Paranjape <gautam.paranjape@intel.com>
|
||||
Date: Fri, 21 Jul 2017 07:02:13 -0700
|
||||
Subject: [PATCH] Some c-states exposed by the intel_idle driver are assigned
|
||||
the same line_level, which means that the most recent one assigned can
|
||||
overwrite another c-state. For example, the C1-SKL c-state is overwritten by
|
||||
the C1E-SKL c-state because both have a "1" in the name and are assigned the
|
||||
same line level. To fix this, check if a "sub c-state" (ex. C1E-SKL) is being
|
||||
inserted. If so, check the vector of c-states if a c-state with similar name
|
||||
(ex. C1-SKL) exists, and increment the line level.
|
||||
|
||||
Signed-off-by: Gautam Paranjape <gautam.paranjape@intel.com>
|
||||
---
|
||||
src/cpu/abstract_cpu.cpp | 11 +++++++++++
|
||||
1 file changed, 11 insertions(+)
|
||||
|
||||
diff --git a/src/cpu/abstract_cpu.cpp b/src/cpu/abstract_cpu.cpp
|
||||
index bc32336..c59721c 100644
|
||||
--- a/src/cpu/abstract_cpu.cpp
|
||||
+++ b/src/cpu/abstract_cpu.cpp
|
||||
@@ -218,6 +218,17 @@ void abstract_cpu::insert_cstate(const char *linux_name, const char *human_name,
|
||||
}
|
||||
if (*c >= '0' && *c <='9') {
|
||||
state->line_level = strtoull(c, NULL, 10);
|
||||
+ if(*(c+1) != '-'){
|
||||
+ int greater_line_level = strtoull(c, NULL, 10);
|
||||
+ for(unsigned int pos = 0; pos < cstates.size(); pos++){
|
||||
+ if(*c == cstates[pos]->human_name[1]){
|
||||
+ if(*(c+1) != cstates[pos]->human_name[2]){
|
||||
+ greater_line_level = max(greater_line_level, cstates[pos]->line_level);
|
||||
+ state->line_level = greater_line_level + 1;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
break;
|
||||
}
|
||||
c++;
|
||||
--
|
||||
2.14.3
|
||||
|
||||
51
powertop-2.9-intel-cnluy-support.patch
Normal file
51
powertop-2.9-intel-cnluy-support.patch
Normal file
@ -0,0 +1,51 @@
|
||||
From 0d3a1cda2a95484fa41cc4c35294a4153b3a5e97 Mon Sep 17 00:00:00 2001
|
||||
From: Nivedita Swaminathan <nivedita.swaminathan@intel.com>
|
||||
Date: Wed, 31 Jan 2018 14:53:28 -0800
|
||||
Subject: [PATCH] Enable support for Intel CNL-U/Y
|
||||
|
||||
This commit adds support for Intel CNL-U/Y platforms
|
||||
|
||||
Signed-off-by: Nivedita Swaminathan <nivedita.swaminathan@intel.com>
|
||||
---
|
||||
src/cpu/intel_cpus.cpp | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/src/cpu/intel_cpus.cpp b/src/cpu/intel_cpus.cpp
|
||||
index 4980516..4c7b315 100644
|
||||
--- a/src/cpu/intel_cpus.cpp
|
||||
+++ b/src/cpu/intel_cpus.cpp
|
||||
@@ -68,6 +68,7 @@ static int intel_cpu_models[] = {
|
||||
0x5E, /* SKY */
|
||||
0x56, /* BDX-DE */
|
||||
0x5c, /* BXT-P */
|
||||
+ 0x66, /* CNL-U/Y */
|
||||
0x7A, /* GLK */
|
||||
0x8E, /* KBL */
|
||||
0x9E, /* KBL */
|
||||
@@ -166,6 +167,7 @@ nhm_core::nhm_core(int model)
|
||||
case 0x5E: /* SKY */
|
||||
case 0x3D: /* BDW */
|
||||
case 0x5c: /* BXT-P */
|
||||
+ case 0x66: /* CNL-U/Y */
|
||||
case 0x7A: /* GLK */
|
||||
case 0x8E: /* KBL */
|
||||
case 0x9E: /* KBL */
|
||||
@@ -347,6 +349,7 @@ nhm_package::nhm_package(int model)
|
||||
case 0x5E: /* SKY */
|
||||
case 0x3D: /* BDW */
|
||||
case 0x5c: /* BXT-P */
|
||||
+ case 0x66: /* CNL-U/Y */
|
||||
case 0x7A: /* GLK */
|
||||
case 0x8E: /* KBL */
|
||||
case 0x9E: /* KBL */
|
||||
@@ -380,6 +383,7 @@ nhm_package::nhm_package(int model)
|
||||
case 0x4E: /* SKY */
|
||||
case 0x5E: /* SKY */
|
||||
case 0x5c: /* BXT-P */
|
||||
+ case 0x66: /* CNL-U/Y */
|
||||
case 0x7A: /* GLK */
|
||||
case 0x8E: /* KBL */
|
||||
case 0x9E: /* KBL */
|
||||
--
|
||||
2.14.3
|
||||
|
||||
51
powertop-2.9-intel-glk-support.patch
Normal file
51
powertop-2.9-intel-glk-support.patch
Normal file
@ -0,0 +1,51 @@
|
||||
From 523b15bd892f036bb6b777ad6c88f334f0980347 Mon Sep 17 00:00:00 2001
|
||||
From: Nivedita Swaminathan <nivedita.swaminathan@intel.com>
|
||||
Date: Wed, 31 Jan 2018 14:41:18 -0800
|
||||
Subject: [PATCH] Enable support for Intel GLK
|
||||
|
||||
This commit enables support for Intel GLK platforms
|
||||
|
||||
Signed-off-by: Nivedita Swaminathan <nivedita.saminathan@intel.com>
|
||||
---
|
||||
src/cpu/intel_cpus.cpp | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/src/cpu/intel_cpus.cpp b/src/cpu/intel_cpus.cpp
|
||||
index 3901342..4980516 100644
|
||||
--- a/src/cpu/intel_cpus.cpp
|
||||
+++ b/src/cpu/intel_cpus.cpp
|
||||
@@ -68,6 +68,7 @@ static int intel_cpu_models[] = {
|
||||
0x5E, /* SKY */
|
||||
0x56, /* BDX-DE */
|
||||
0x5c, /* BXT-P */
|
||||
+ 0x7A, /* GLK */
|
||||
0x8E, /* KBL */
|
||||
0x9E, /* KBL */
|
||||
0 /* last entry must be zero */
|
||||
@@ -165,6 +166,7 @@ nhm_core::nhm_core(int model)
|
||||
case 0x5E: /* SKY */
|
||||
case 0x3D: /* BDW */
|
||||
case 0x5c: /* BXT-P */
|
||||
+ case 0x7A: /* GLK */
|
||||
case 0x8E: /* KBL */
|
||||
case 0x9E: /* KBL */
|
||||
has_c7_res = 1;
|
||||
@@ -345,6 +347,7 @@ nhm_package::nhm_package(int model)
|
||||
case 0x5E: /* SKY */
|
||||
case 0x3D: /* BDW */
|
||||
case 0x5c: /* BXT-P */
|
||||
+ case 0x7A: /* GLK */
|
||||
case 0x8E: /* KBL */
|
||||
case 0x9E: /* KBL */
|
||||
has_c2c6_res=1;
|
||||
@@ -377,6 +380,7 @@ nhm_package::nhm_package(int model)
|
||||
case 0x4E: /* SKY */
|
||||
case 0x5E: /* SKY */
|
||||
case 0x5c: /* BXT-P */
|
||||
+ case 0x7A: /* GLK */
|
||||
case 0x8E: /* KBL */
|
||||
case 0x9E: /* KBL */
|
||||
has_c8c9c10_res = 1;
|
||||
--
|
||||
2.14.3
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
Name: powertop
|
||||
Version: 2.9
|
||||
Release: 6%{?dist}
|
||||
Release: 7%{?dist}
|
||||
Summary: Power consumption monitor
|
||||
|
||||
Group: Applications/System
|
||||
@ -11,6 +11,9 @@ Source1: powertop.service
|
||||
|
||||
# Sent upstream
|
||||
Patch0: powertop-2.7-always-create-params.patch
|
||||
Patch1: powertop-2.9-cstates-rewrite-fix.patch
|
||||
Patch2: powertop-2.9-intel-glk-support.patch
|
||||
Patch3: powertop-2.9-intel-cnluy-support.patch
|
||||
BuildRequires: gettext-devel, ncurses-devel, pciutils-devel, zlib-devel, libnl3-devel
|
||||
BuildRequires: systemd
|
||||
BuildRequires: gcc, gcc-c++
|
||||
@ -26,6 +29,12 @@ computer use more power than necessary while it is idle.
|
||||
%prep
|
||||
%setup -q -n %{name}-v%{version}
|
||||
%patch0 -p1 -b .always-create-params
|
||||
# https://github.com/fenrus75/powertop/commit/f3f350f138912dc89abb37676f7e65fc6057ec53
|
||||
%patch1 -p1 -b .cstates-rewrite-fix
|
||||
# https://github.com/fenrus75/powertop/commit/523b15bd892f036bb6b777ad6c88f334f0980347
|
||||
%patch2 -p1 -b .intel-glk-support
|
||||
# https://github.com/fenrus75/powertop/commit/0d3a1cda2a95484fa41cc4c35294a4153b3a5e97
|
||||
%patch3 -p1 -b .intel-cnluy-support
|
||||
|
||||
%build
|
||||
%configure
|
||||
@ -63,6 +72,12 @@ touch %{_localstatedir}/cache/powertop/{saved_parameters.powertop,saved_results.
|
||||
%{_unitdir}/powertop.service
|
||||
|
||||
%changelog
|
||||
* Fri May 4 2018 Jaroslav Škarvada <jskarvad@redhat.com> - 2.9-7
|
||||
- Added support for Intel GLK platforms (by intel-glk-support patch)
|
||||
- Added support for Intel CNL-U/Y platforms (by intel-cnluy-support patch)
|
||||
- Fixed problem with some C-states overwriting others
|
||||
(by cstates-rewrite-fix patch)
|
||||
|
||||
* Fri Apr 20 2018 Jaroslav Škarvada <jskarvad@redhat.com> - 2.9-6
|
||||
- Made post scriptlet not to fail
|
||||
Resolves: rhbz#1569722
|
||||
|
||||
Loading…
Reference in New Issue
Block a user