Accepting request 664055 from home:jubalh:branches:Base:System

- Update to version 2.10:
  * new WakeUp tab which displays the devices wake up settings
  * Enable support for Intel GLK
  * Enable support for Intel CNL-U/Y
  * For details see https://01.org/powertop/downloads/powertop-v2.10
- Remove powertop_libc++_fix.patch: in new release
- Remove powertop_cstate_fix.patch: in new release

OBS-URL: https://build.opensuse.org/request/show/664055
OBS-URL: https://build.opensuse.org/package/show/Base:System/powertop?expand=0&rev=55
This commit is contained in:
Thomas Renninger 2019-01-09 11:09:55 +00:00 committed by Git OBS Bridge
parent 490a1944c2
commit c59df17582
6 changed files with 25 additions and 95 deletions

3
powertop-v2.10.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:d3b7459eaba7d01c8841dd33a3b4d369416c01e9bd8951b0d88234cf18fe4a75
size 722992

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:aa7fb7d8e9a00f05e7d8a7a2866d85929741e0d03a5bf40cab22d2021c959250
size 718763

View File

@ -1,3 +1,14 @@
-------------------------------------------------------------------
Tue Jan 8 12:00:55 UTC 2019 - mvetter@suse.com
- Update to version 2.10:
* new WakeUp tab which displays the devices wake up settings
* Enable support for Intel GLK
* Enable support for Intel CNL-U/Y
* For details see https://01.org/powertop/downloads/powertop-v2.10
- Remove powertop_libc++_fix.patch: in new release
- Remove powertop_cstate_fix.patch: in new release
-------------------------------------------------------------------
Mon Mar 19 14:23:40 UTC 2018 - mvetter@suse.com

View File

@ -1,7 +1,7 @@
#
# spec file for package powertop
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -17,28 +17,25 @@
Name: powertop
Version: 2.9
Version: 2.10
Release: 0
#Git-Clone: git://github.com/fenrus75/powertop
Summary: A Linux Tool to Find out What is Using Power on a Laptop
License: GPL-2.0
License: GPL-2.0-only
Group: System/Monitoring
Url: https://01.org/powertop/
Source0: https://01.org/sites/default/files/downloads/%{name}/%{name}-v%{version}.tar.gz
URL: https://01.org/powertop/
Source0: https://01.org/sites/default/files/downloads/%{name}-v%{version}.tar.gz
Source1: powertop.service
Patch1: powertop_cstate_fix.patch
Patch2: powertop_libc++_fix.patch
BuildRequires: gcc-c++
BuildRequires: gettext
BuildRequires: ncurses-devel
BuildRequires: pkg-config
BuildRequires: pkgconfig
BuildRequires: systemd-rpm-macros
BuildRequires: pkgconfig(libnl-3.0)
BuildRequires: pkgconfig(libnl-genl-3.0)
BuildRequires: pkgconfig(libpci)
BuildRequires: pkgconfig(zlib)
Recommends: %{name}-lang
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%{?systemd_requires}
%description
@ -49,9 +46,7 @@ doing in terms of power savings.
%lang_package
%prep
%setup -qn powertop-v%{version}
%patch1 -p1
%patch2 -p1
%setup -q -n powertop-v%{version}
# Delete objects files left in tarball
find . -name '*.o' -delete
@ -62,7 +57,7 @@ export CFLAGS="%{optflags} -D_GNU_SOURCE"
make %{?_smp_mflags} V=1
%install
make %{?_smp_mflags} DESTDIR=%{buildroot} install
%make_install
install -Dd %{buildroot}%{_localstatedir}/cache/powertop
touch %{buildroot}%{_localstatedir}/cache/powertop/{saved_parameters.powertop,saved_results.powertop}
install -D -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/powertop.service
@ -85,17 +80,16 @@ touch %{_localstatedir}/cache/powertop/saved_results.powertop
%service_del_postun %{name}.service
%files
%defattr(-,root,root)
%doc COPYING README
%license COPYING
%doc README
%dir %{_localstatedir}/cache/powertop
%ghost %{_localstatedir}/cache/powertop/saved_parameters.powertop
%ghost %{_localstatedir}/cache/powertop/saved_results.powertop
%{_sbindir}/%{name}
%{_mandir}/man8/powertop.8.gz
%{_mandir}/man8/powertop.8%{?ext_man}
%{_unitdir}/%{name}.service
%{_sbindir}/rc%{name}
%files lang -f %{name}.lang
%defattr(-,root,root)
%changelog

View File

@ -1,38 +0,0 @@
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++;

View File

@ -1,37 +0,0 @@
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;