Accepting request 547222 from home:trenn:branches:Base:System
- Upgrade to version 2.9 Already mainline: D powertop-2.8-potential-segfaults.patch D powertop-no-date.patch From mainline (after 2.9): A powertop_cstate_fix.patch A powertop_libc++_fix.patch OBS-URL: https://build.opensuse.org/request/show/547222 OBS-URL: https://build.opensuse.org/package/show/Base:System/powertop?expand=0&rev=52
This commit is contained in:
parent
32e6460f43
commit
baf3fdf131
File diff suppressed because it is too large
Load Diff
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:a87b563f73106babfa3e74dcf92f252938c061e309ace20a361358bbfa579c5a
|
|
||||||
size 670000
|
|
3
powertop-v2.9.tar.gz
Normal file
3
powertop-v2.9.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:aa7fb7d8e9a00f05e7d8a7a2866d85929741e0d03a5bf40cab22d2021c959250
|
||||||
|
size 718763
|
@ -1,3 +1,15 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Dec 1 16:16:40 UTC 2017 - trenn@suse.de
|
||||||
|
|
||||||
|
- Upgrade to version 2.9
|
||||||
|
Already mainline:
|
||||||
|
D powertop-2.8-potential-segfaults.patch
|
||||||
|
D powertop-no-date.patch
|
||||||
|
|
||||||
|
From mainline (after 2.9):
|
||||||
|
A powertop_cstate_fix.patch
|
||||||
|
A powertop_libc++_fix.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Jun 12 13:42:07 UTC 2017 - adam.majer@suse.de
|
Mon Jun 12 13:42:07 UTC 2017 - adam.majer@suse.de
|
||||||
|
|
||||||
|
@ -17,18 +17,17 @@
|
|||||||
|
|
||||||
|
|
||||||
Name: powertop
|
Name: powertop
|
||||||
Version: 2.8
|
Version: 2.9
|
||||||
Release: 0
|
Release: 0
|
||||||
#Git-Clone: git://github.com/fenrus75/powertop
|
#Git-Clone: git://github.com/fenrus75/powertop
|
||||||
Summary: A Linux Tool to Find out What is Using Power on a Laptop
|
Summary: A Linux Tool to Find out What is Using Power on a Laptop
|
||||||
License: GPL-2.0
|
License: GPL-2.0
|
||||||
Group: System/Monitoring
|
Group: System/Monitoring
|
||||||
Url: https://01.org/powertop/
|
Url: https://01.org/powertop/
|
||||||
Source0: https://01.org/sites/default/files/downloads/%{name}/%{name}-%{version}.tar.gz
|
Source0: https://01.org/sites/default/files/downloads/%{name}/%{name}-v%{version}.tar.gz
|
||||||
Source1: powertop.service
|
Source1: powertop.service
|
||||||
Patch0: powertop-no-date.patch
|
Patch1: powertop_cstate_fix.patch
|
||||||
# PATCH-FIX-UPSTREAM powertop-2.8-potential-segfaults.patch zaitor@opensuse.org -- Fix potential segfaults.
|
Patch2: powertop_libc++_fix.patch
|
||||||
Patch1: powertop-2.8-potential-segfaults.patch
|
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
BuildRequires: gettext
|
BuildRequires: gettext
|
||||||
BuildRequires: ncurses-devel
|
BuildRequires: ncurses-devel
|
||||||
@ -50,9 +49,9 @@ doing in terms of power savings.
|
|||||||
%lang_package
|
%lang_package
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -qn powertop-v%{version}
|
||||||
%patch0 -p1
|
|
||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
|
%patch2 -p1
|
||||||
|
|
||||||
# Delete objects files left in tarball
|
# Delete objects files left in tarball
|
||||||
find . -name '*.o' -delete
|
find . -name '*.o' -delete
|
||||||
|
38
powertop_cstate_fix.patch
Normal file
38
powertop_cstate_fix.patch
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
commit f3f350f138912dc89abb37676f7e65fc6057ec53
|
||||||
|
Author: Gautam Paranjape <gautam.paranjape@intel.com>
|
||||||
|
Date: Fri Jul 21 07:02:13 2017 -0700
|
||||||
|
|
||||||
|
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>
|
||||||
|
|
||||||
|
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++;
|
37
powertop_libc++_fix.patch
Normal file
37
powertop_libc++_fix.patch
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
commit b9c431aad6cc5383c9571007469eee8e64ec85a6
|
||||||
|
Author: Manoj Gupta <manojgupta@chromium.org>
|
||||||
|
Date: Sat Nov 4 13:44:04 2017 -0700
|
||||||
|
|
||||||
|
Fix powertop build with libc++.
|
||||||
|
|
||||||
|
<ctime> header is not automatically included with libc++.
|
||||||
|
Add it explicitly to make powertop build with libc++.
|
||||||
|
|
||||||
|
This fixes the following errors:
|
||||||
|
devices/gpu_rapl_device.cpp:35:14: error: use of undeclared identifier
|
||||||
|
'time'; did you mean 'tie'?
|
||||||
|
last_time = time(NULL);
|
||||||
|
^~~~
|
||||||
|
devices/gpu_rapl_device.cpp:45:14: error:use of undeclared identifier
|
||||||
|
'time'; did you mean 'tie'?
|
||||||
|
last_time = time(NULL);
|
||||||
|
^~~~
|
||||||
|
|
||||||
|
parameters/learn.cpp:161:10: error: use of undeclared identifier
|
||||||
|
'time'; did you mean 'tie'?
|
||||||
|
start = time(NULL);
|
||||||
|
^~~~
|
||||||
|
|
||||||
|
diff --git a/src/lib.h b/src/lib.h
|
||||||
|
index b64bb0f..6d85eb6 100644
|
||||||
|
--- a/src/lib.h
|
||||||
|
+++ b/src/lib.h
|
||||||
|
@@ -54,7 +54,7 @@ extern const char *kernel_function(uint64_t address);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
-
|
||||||
|
+#include <ctime>
|
||||||
|
#include <string>
|
||||||
|
using namespace std;
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user