summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2015-03-02 21:40:10 +0000
committerMike Frysinger <vapier@gentoo.org>2015-03-02 21:40:10 +0000
commitb744226cfdb617891aab4e82779fbe021689e1f8 (patch)
tree07546cf24505d9a867df5c9b49f8b808b4d12748 /sys-power
parentbump; update license info, call include on later lines (diff)
downloadgentoo-2-b744226cfdb617891aab4e82779fbe021689e1f8.tar.gz
gentoo-2-b744226cfdb617891aab4e82779fbe021689e1f8.tar.bz2
gentoo-2-b744226cfdb617891aab4e82779fbe021689e1f8.zip
Add fix from upstream for running on newer Baytrail systems.
(Portage version: 2.2.17/cvs/Linux x86_64, signed Manifest commit with key D2E96200)
Diffstat (limited to 'sys-power')
-rw-r--r--sys-power/powertop/ChangeLog8
-rw-r--r--sys-power/powertop/files/powertop-2.7-baytrail-msr.patch33
-rw-r--r--sys-power/powertop/powertop-2.7-r1.ebuild97
3 files changed, 137 insertions, 1 deletions
diff --git a/sys-power/powertop/ChangeLog b/sys-power/powertop/ChangeLog
index 0999525e0802..1e35e78fc9bc 100644
--- a/sys-power/powertop/ChangeLog
+++ b/sys-power/powertop/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sys-power/powertop
# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-power/powertop/ChangeLog,v 1.108 2015/03/02 09:33:37 ago Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-power/powertop/ChangeLog,v 1.109 2015/03/02 21:40:10 vapier Exp $
+
+*powertop-2.7-r1 (02 Mar 2015)
+
+ 02 Mar 2015; Mike Frysinger <vapier@gentoo.org>
+ +files/powertop-2.7-baytrail-msr.patch, +powertop-2.7-r1.ebuild:
+ Add fix from upstream for running on newer Baytrail systems.
02 Mar 2015; Agostino Sarubbo <ago@gentoo.org> powertop-2.6.ebuild:
Stable for ppc, wrt bug #520616
diff --git a/sys-power/powertop/files/powertop-2.7-baytrail-msr.patch b/sys-power/powertop/files/powertop-2.7-baytrail-msr.patch
new file mode 100644
index 000000000000..9c4c17b3f8c1
--- /dev/null
+++ b/sys-power/powertop/files/powertop-2.7-baytrail-msr.patch
@@ -0,0 +1,33 @@
+From 037906c55374cbf045f197b43c22314617dbfc21 Mon Sep 17 00:00:00 2001
+From: Daniel Leung <daniel.leung@linux.intel.com>
+Date: Wed, 25 Feb 2015 16:36:45 -0800
+Subject: [PATCH] Baytrail does not have core C7 MSR to read
+
+So do not acquire core C7 from MSR, or else it fails
+and stops the program.
+
+Reported-by: Eoff, Ullysses A <ullysses.a.eoff@intel.com>
+Signed-off-by: Daniel Leung <daniel.leung@linux.intel.com>
+---
+ src/cpu/intel_cpus.cpp | 5 -----
+ 1 file changed, 5 deletions(-)
+
+diff --git a/src/cpu/intel_cpus.cpp b/src/cpu/intel_cpus.cpp
+index 04275e5..72ecd50 100644
+--- a/src/cpu/intel_cpus.cpp
++++ b/src/cpu/intel_cpus.cpp
+@@ -135,11 +135,6 @@ nhm_core::nhm_core(int model)
+ if (model == 0x37) {
+ has_c3_res = 0;
+ has_c1_res = 1;
+- this->byt_has_ahci();
+- if ((this->get_byt_ahci_support()) == 0)
+- has_c7_res = 1;/*BYT-T PC7 <- S0iX*/
+- else
+- has_c7_res = 0;
+ } else {
+ has_c3_res = 1;
+ has_c1_res = 0;
+--
+2.3.1
+
diff --git a/sys-power/powertop/powertop-2.7-r1.ebuild b/sys-power/powertop/powertop-2.7-r1.ebuild
new file mode 100644
index 000000000000..08eef72e67b4
--- /dev/null
+++ b/sys-power/powertop/powertop-2.7-r1.ebuild
@@ -0,0 +1,97 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-power/powertop/powertop-2.7-r1.ebuild,v 1.1 2015/03/02 21:40:10 vapier Exp $
+
+EAPI="5"
+
+inherit eutils linux-info
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="git://github.com/fenrus75/powertop.git"
+ inherit git-2 autotools
+ SRC_URI=""
+else
+ SRC_URI="https://01.org/sites/default/files/downloads/${PN}/${P}.tar.gz"
+ KEYWORDS="~amd64 ~arm ~ppc ~sparc ~x86 ~amd64-linux ~x86-linux"
+fi
+
+DESCRIPTION="tool that helps you find what software is using the most power"
+HOMEPAGE="https://01.org/powertop/"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="unicode X"
+
+COMMON_DEPEND="
+ dev-libs/libnl:3
+ sys-apps/pciutils
+ sys-libs/ncurses[unicode?]
+"
+
+DEPEND="${COMMON_DEPEND}
+ virtual/pkgconfig
+ sys-devel/gettext
+"
+RDEPEND="
+ ${COMMON_DEPEND}
+ X? ( x11-apps/xset )
+ virtual/libintl
+"
+
+DOCS=( TODO README )
+
+pkg_setup() {
+ CONFIG_CHECK="
+ ~X86_MSR
+ ~DEBUG_FS
+ ~PERF_EVENTS
+ ~TRACEPOINTS
+ ~NO_HZ
+ ~HIGH_RES_TIMERS
+ ~HPET_TIMER
+ ~CPU_FREQ_STAT
+ ~CPU_FREQ_GOV_ONDEMAND
+ ~PM_RUNTIME
+ ~FTRACE
+ ~BLK_DEV_IO_TRACE
+ ~TIMER_STATS
+ ~TRACING
+ "
+ ERROR_KERNEL_X86_MSR="X86_MSR is not enabled in the kernel, you almost certainly need it"
+ ERROR_KERNEL_DEBUG_FS="DEBUG_FS is not enabled in the kernel, you almost certainly need it"
+ ERROR_KERNEL_PERF_EVENTS="PERF_EVENTS should be enabled in the kernel for full powertop function"
+ ERROR_KERNEL_TRACEPOINTS="TRACEPOINTS should be enabled in the kernel for full powertop function"
+ ERROR_KERNEL_NO_HZ="NO_HZ should be enabled in the kernel for full powertop function"
+ ERROR_KERNEL_HIGH_RES_TIMERS="HIGH_RES_TIMERS should be enabled in the kernel for full powertop function"
+ ERROR_KERNEL_HPET_TIMER="HPET_TIMER should be enabled in the kernel for full powertop function"
+ ERROR_KERNEL_CPU_FREQ_STAT="CPU_FREQ_STAT should be enabled in the kernel for full powertop function"
+ ERROR_KERNEL_CPU_FREQ_GOV_ONDEMAND="CPU_FREQ_GOV_ONDEMAND should be enabled in the kernel for full powertop function"
+ ERROR_KERNEL_PM_RUNTIME="PM_RUNTIME should be enabled in the kernel for full powertop function"
+ ERROR_KERNEL_FTRACE="FTRACE needs to be turned on to enable BLK_DEV_IO_TRACE"
+ ERROR_KERNEL_BLK_DEV_IO_TRACE="BLK_DEV_IO_TRACE needs to be turned on to enable TIMER_STATS, TRACING and EVENT_POWER_TRACING_DEPRECATED"
+ ERROR_KERNEL_TIMER_STATS="TIMER_STATS should be enabled in the kernel for full powertop function"
+ ERROR_KERNEL_TRACING="TRACING should be enabled in the kernel for full powertop function"
+ linux-info_pkg_setup
+ if linux_config_exists; then
+ if kernel_is -lt 3 7 0; then
+ if linux_chkconfig_present SND_HDA_INTEL; then
+ CONFIG_CHECK="~SND_HDA_POWER_SAVE"
+ ERROR_KERNEL_SND_HDA_POWER_SAVE="SND_HDA_POWER_SAVE should be enabled in the kernel for full powertop function"
+ check_extra_config
+ fi
+ fi
+ if kernel_is -lt 3 9 0; then
+ CONFIG_CHECK="~EVENT_POWER_TRACING_DEPRECATED"
+ ERROR_KERNEL_EVENT_POWER_TRACING_DEPRECATED="EVENT_POWER_TRACING_DEPRECATED should be enabled in the kernel for full powertop function"
+ check_extra_config
+ fi
+ fi
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-baytrail-msr.patch
+}
+
+src_configure() {
+ export ac_cv_search_delwin=$(usex unicode -lncursesw -lncurses)
+ default
+}