diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2017-11-09 17:33:43 -0500 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2017-11-09 17:33:43 -0500 |
commit | be89251d636d02b384aa22c8fe2e6ea6876dc3a3 (patch) | |
tree | 59d5238fb4f3d0be67bec6d3ae60741bc748a884 | |
parent | 10f2fe6efa5c3fc91ec6b700d3fc530845f5c1ab (diff) | |
parent | 69b6f8a9b7961efd7dcc11ab9b1d5be55ed8a15e (diff) |
Merge tag 'linux-cpupower-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux into pm-tools
Pull cpupower utility changes for v4.15 from Shuah Khan.
This cpupower update consists of fixes to the MHz frequency output and
adding 64-bit library detection.
* tag 'linux-cpupower-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux:
tools/power/cpupower: add libcpupower.so.0.0.1 to .gitignore
tools/power/cpupower: Add 64 bit library detection
cpupower: Fix no-rounding MHz frequency output
-rw-r--r-- | tools/power/cpupower/.gitignore | 3 | ||||
-rw-r--r-- | tools/power/cpupower/Makefile | 6 | ||||
-rw-r--r-- | tools/power/cpupower/utils/cpufreq-info.c | 2 |
3 files changed, 7 insertions, 4 deletions
diff --git a/tools/power/cpupower/.gitignore b/tools/power/cpupower/.gitignore index d42073f12609..1f9977cc609c 100644 --- a/tools/power/cpupower/.gitignore +++ b/tools/power/cpupower/.gitignore | |||
@@ -1,7 +1,6 @@ | |||
1 | .libs | 1 | .libs |
2 | libcpupower.so | 2 | libcpupower.so |
3 | libcpupower.so.0 | 3 | libcpupower.so.* |
4 | libcpupower.so.0.0.0 | ||
5 | build/ccdv | 4 | build/ccdv |
6 | cpufreq-info | 5 | cpufreq-info |
7 | cpufreq-set | 6 | cpufreq-set |
diff --git a/tools/power/cpupower/Makefile b/tools/power/cpupower/Makefile index d6e1c02ddcfe..da205d1fa03c 100644 --- a/tools/power/cpupower/Makefile +++ b/tools/power/cpupower/Makefile | |||
@@ -30,6 +30,8 @@ OUTDIR := $(shell cd $(OUTPUT) && /bin/pwd) | |||
30 | $(if $(OUTDIR),, $(error output directory "$(OUTPUT)" does not exist)) | 30 | $(if $(OUTDIR),, $(error output directory "$(OUTPUT)" does not exist)) |
31 | endif | 31 | endif |
32 | 32 | ||
33 | include ../../scripts/Makefile.arch | ||
34 | |||
33 | # --- CONFIGURATION BEGIN --- | 35 | # --- CONFIGURATION BEGIN --- |
34 | 36 | ||
35 | # Set the following to `true' to make a unstripped, unoptimized | 37 | # Set the following to `true' to make a unstripped, unoptimized |
@@ -79,7 +81,11 @@ bindir ?= /usr/bin | |||
79 | sbindir ?= /usr/sbin | 81 | sbindir ?= /usr/sbin |
80 | mandir ?= /usr/man | 82 | mandir ?= /usr/man |
81 | includedir ?= /usr/include | 83 | includedir ?= /usr/include |
84 | ifeq ($(IS_64_BIT), 1) | ||
85 | libdir ?= /usr/lib64 | ||
86 | else | ||
82 | libdir ?= /usr/lib | 87 | libdir ?= /usr/lib |
88 | endif | ||
83 | localedir ?= /usr/share/locale | 89 | localedir ?= /usr/share/locale |
84 | docdir ?= /usr/share/doc/packages/cpupower | 90 | docdir ?= /usr/share/doc/packages/cpupower |
85 | confdir ?= /etc/ | 91 | confdir ?= /etc/ |
diff --git a/tools/power/cpupower/utils/cpufreq-info.c b/tools/power/cpupower/utils/cpufreq-info.c index 3e701f0e9c14..df43cd45d810 100644 --- a/tools/power/cpupower/utils/cpufreq-info.c +++ b/tools/power/cpupower/utils/cpufreq-info.c | |||
@@ -93,8 +93,6 @@ static void print_speed(unsigned long speed) | |||
93 | if (speed > 1000000) | 93 | if (speed > 1000000) |
94 | printf("%u.%06u GHz", ((unsigned int) speed/1000000), | 94 | printf("%u.%06u GHz", ((unsigned int) speed/1000000), |
95 | ((unsigned int) speed%1000000)); | 95 | ((unsigned int) speed%1000000)); |
96 | else if (speed > 100000) | ||
97 | printf("%u MHz", (unsigned int) speed); | ||
98 | else if (speed > 1000) | 96 | else if (speed > 1000) |
99 | printf("%u.%03u MHz", ((unsigned int) speed/1000), | 97 | printf("%u.%03u MHz", ((unsigned int) speed/1000), |
100 | (unsigned int) (speed%1000)); | 98 | (unsigned int) (speed%1000)); |