[linux] 02/02: [x86] linux-cpupower: Add turbostat and x86_energy_perf_policy commands

debian-kernel at lists.debian.org debian-kernel at lists.debian.org
Tue Jan 24 03:55:58 UTC 2017


This is an automated email from the git hooks/post-receive script.

benh pushed a commit to branch sid
in repository linux.

commit 1b1a09ae426ce3ba5a972a2944f8a3ef25f53a06
Author: Ben Hutchings <ben at decadent.org.uk>
Date:   Tue Jan 24 03:03:17 2017 +0000

    [x86] linux-cpupower: Add turbostat and x86_energy_perf_policy commands
    
    Closes: #778249
---
 debian/changelog                                          |  2 ++
 debian/linux-cpupower.install                             |  1 +
 debian/rules.d/tools/Makefile                             |  2 +-
 debian/rules.d/tools/power/Makefile                       |  8 ++++++++
 debian/rules.d/tools/power/x86/Makefile                   |  5 +++++
 debian/rules.d/tools/power/x86/turbostat/Makefile         |  7 +++++++
 .../tools/power/x86/x86_energy_perf_policy/Makefile       |  5 +++++
 debian/rules.real                                         | 15 +++++++++++++++
 debian/templates/control.tools.in                         | 11 +++++------
 9 files changed, 49 insertions(+), 7 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 203ed9c..eac9504 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -350,6 +350,8 @@ linux (4.9.5-1) UNRELEASED; urgency=medium
   * cfg80211,memcg,power: Avoid ABI changes
   * cpuhp,orinoco,xhci: Ignore ABI changes
   * linux-image: Increase minimum version of initramfs-tools (Closes: #808038)
+  * [x86] linux-cpupower: Add turbostat and x86_energy_perf_policy commands
+    (Closes: #778249)
 
   [ Salvatore Bonaccorso ]
   * tmpfs: clear S_ISGID when setting posix ACLs (CVE-2017-5551)
diff --git a/debian/linux-cpupower.install b/debian/linux-cpupower.install
index 21cca7c..e79f8d1 100644
--- a/debian/linux-cpupower.install
+++ b/debian/linux-cpupower.install
@@ -1,2 +1,3 @@
 usr/bin
+usr/sbin
 usr/share/
diff --git a/debian/rules.d/tools/Makefile b/debian/rules.d/tools/Makefile
index e529f6b..787959c 100644
--- a/debian/rules.d/tools/Makefile
+++ b/debian/rules.d/tools/Makefile
@@ -1,7 +1,7 @@
 SUBDIRS = \
 	hv \
 	perf \
-	power/cpupower \
+	power \
 	usb/usbip
 #SUBDIRS += lib/lockdep
 
diff --git a/debian/rules.d/tools/power/Makefile b/debian/rules.d/tools/power/Makefile
new file mode 100644
index 0000000..c3fcc42
--- /dev/null
+++ b/debian/rules.d/tools/power/Makefile
@@ -0,0 +1,8 @@
+SUBDIRS = \
+	cpupower
+
+ifneq ($(filter i386 amd64 x32,$(DEB_HOST_ARCH)),)
+SUBDIRS += x86
+endif
+
+include $(top_rulesdir)/Makefile.inc
diff --git a/debian/rules.d/tools/power/x86/Makefile b/debian/rules.d/tools/power/x86/Makefile
new file mode 100644
index 0000000..2b9d773
--- /dev/null
+++ b/debian/rules.d/tools/power/x86/Makefile
@@ -0,0 +1,5 @@
+SUBDIRS = \
+	turbostat \
+	x86_energy_perf_policy
+
+include $(top_rulesdir)/Makefile.inc
diff --git a/debian/rules.d/tools/power/x86/turbostat/Makefile b/debian/rules.d/tools/power/x86/turbostat/Makefile
new file mode 100644
index 0000000..2cf6365
--- /dev/null
+++ b/debian/rules.d/tools/power/x86/turbostat/Makefile
@@ -0,0 +1,7 @@
+PROGS = turbostat
+
+installdir = /usr/sbin
+
+include $(top_rulesdir)/Makefile.inc
+
+CPPFLAGS += -DMSRHEADER='<asm/msr-index.h>'
diff --git a/debian/rules.d/tools/power/x86/x86_energy_perf_policy/Makefile b/debian/rules.d/tools/power/x86/x86_energy_perf_policy/Makefile
new file mode 100644
index 0000000..6abb918
--- /dev/null
+++ b/debian/rules.d/tools/power/x86/x86_energy_perf_policy/Makefile
@@ -0,0 +1,5 @@
+PROGS = x86_energy_perf_policy
+
+installdir = /usr/sbin
+
+include $(top_rulesdir)/Makefile.inc
diff --git a/debian/rules.real b/debian/rules.real
index cecbac4..868efa3 100644
--- a/debian/rules.real
+++ b/debian/rules.real
@@ -564,10 +564,25 @@ install-cpupower: $(STAMPS_DIR)/build-tools
 	dh_testroot
 	dh_prep
 	$(call make-tools,tools/power/cpupower) install DESTDIR=$(DIR)
+ifneq ($(filter i386 amd64 x32,$(DEB_HOST_ARCH)),)
+	$(call make-tools,tools/power/x86) install DESTDIR=$(DIR)
+	echo >> debian/linux-cpupower.substvars 'cpupower:Arch-Description='\
+'The turbostat command reports topology, frequency, idle power-state$${Newline}'\
+'statistics, temperature and power consumption information as provided$${Newline}'\
+'by the CPU.$${Newline}'\
+'$${Newline}'\
+'The x86_energy_perf_policy command sets a general policy on some Intel$${Newline}'\
+'CPU models for the relative importance of performance versus energy$${Newline}'\
+'savings.'
+endif
 	dh_install --sourcedir=$(DIR)
 	dh_installchangelogs
 ifeq (,$(filter nodoc,$(DEB_BUILD_PROFILES)))
 	dh_installdocs
+ifneq ($(filter i386 amd64 x32,$(DEB_HOST_ARCH)),)
+	dh_installman tools/power/x86/turbostat/turbostat.8 \
+		tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.8
+endif
 endif
 	dh_strip
 	dh_compress
diff --git a/debian/templates/control.tools.in b/debian/templates/control.tools.in
index 2dbf58a..735c88c 100644
--- a/debian/templates/control.tools.in
+++ b/debian/templates/control.tools.in
@@ -11,13 +11,12 @@ Build-Profiles: <!stage1 !pkg.linux.notools>
 Section: admin
 Architecture: linux-any
 Depends: ${shlibs:Depends}, ${misc:Depends}
-Description: CPU frequency and voltage scaling tools for Linux
- This package contains the 'power/cpupower' tools for Linux.
+Description: CPU power management tools for Linux
+ The cpupower command allows inspection and control of cpufreq and
+ cpuidle tunables for hardware that support these features.  It
+ replaces "cpufreq-info" and "cpufreq-set" in cpufrequtils.
  .
- This set of userspace tools allow inspection and control of cpufreq and
- cpuidle tunables for hardware that support these features.
- The "cpupower" command replaces "cpufreq-info" and "cpufreq-set" in
- cpufrequtils.
+ ${cpupower:Arch-Description}
 
 Package: libcpupower1
 Build-Profiles: <!stage1 !pkg.linux.notools>

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/kernel/linux.git



More information about the Kernel-svn-changes mailing list