aboutsummaryrefslogtreecommitdiffstats
path: root/tools/power
diff options
context:
space:
mode:
Diffstat (limited to 'tools/power')
-rw-r--r--tools/power/cpupower/Makefile12
-rw-r--r--tools/power/cpupower/bench/Makefile2
-rw-r--r--tools/power/cpupower/debug/x86_64/Makefile4
-rw-r--r--tools/power/cpupower/lib/cpufreq.c2
-rw-r--r--tools/power/cpupower/lib/cpuidle.c2
-rw-r--r--tools/power/cpupower/lib/cpupower.c4
-rw-r--r--tools/power/cpupower/lib/cpupower_intern.h2
7 files changed, 14 insertions, 14 deletions
diff --git a/tools/power/cpupower/Makefile b/tools/power/cpupower/Makefile
index 1dd5f4fcffd5..db66a952c173 100644
--- a/tools/power/cpupower/Makefile
+++ b/tools/power/cpupower/Makefile
@@ -129,7 +129,7 @@ WARNINGS += $(call cc-supports,-Wno-pointer-sign)
129WARNINGS += $(call cc-supports,-Wdeclaration-after-statement) 129WARNINGS += $(call cc-supports,-Wdeclaration-after-statement)
130WARNINGS += -Wshadow 130WARNINGS += -Wshadow
131 131
132CFLAGS += -DVERSION=\"$(VERSION)\" -DPACKAGE=\"$(PACKAGE)\" \ 132override CFLAGS += -DVERSION=\"$(VERSION)\" -DPACKAGE=\"$(PACKAGE)\" \
133 -DPACKAGE_BUGREPORT=\"$(PACKAGE_BUGREPORT)\" -D_GNU_SOURCE 133 -DPACKAGE_BUGREPORT=\"$(PACKAGE_BUGREPORT)\" -D_GNU_SOURCE
134 134
135UTIL_OBJS = utils/helpers/amd.o utils/helpers/msr.o \ 135UTIL_OBJS = utils/helpers/amd.o utils/helpers/msr.o \
@@ -156,12 +156,12 @@ LIB_SRC = lib/cpufreq.c lib/cpupower.c lib/cpuidle.c
156LIB_OBJS = lib/cpufreq.o lib/cpupower.o lib/cpuidle.o 156LIB_OBJS = lib/cpufreq.o lib/cpupower.o lib/cpuidle.o
157LIB_OBJS := $(addprefix $(OUTPUT),$(LIB_OBJS)) 157LIB_OBJS := $(addprefix $(OUTPUT),$(LIB_OBJS))
158 158
159CFLAGS += -pipe 159override CFLAGS += -pipe
160 160
161ifeq ($(strip $(NLS)),true) 161ifeq ($(strip $(NLS)),true)
162 INSTALL_NLS += install-gmo 162 INSTALL_NLS += install-gmo
163 COMPILE_NLS += create-gmo 163 COMPILE_NLS += create-gmo
164 CFLAGS += -DNLS 164 override CFLAGS += -DNLS
165endif 165endif
166 166
167ifeq ($(strip $(CPUFREQ_BENCH)),true) 167ifeq ($(strip $(CPUFREQ_BENCH)),true)
@@ -175,7 +175,7 @@ ifeq ($(strip $(STATIC)),true)
175 UTIL_SRC += $(LIB_SRC) 175 UTIL_SRC += $(LIB_SRC)
176endif 176endif
177 177
178CFLAGS += $(WARNINGS) 178override CFLAGS += $(WARNINGS)
179 179
180ifeq ($(strip $(V)),false) 180ifeq ($(strip $(V)),false)
181 QUIET=@ 181 QUIET=@
@@ -188,10 +188,10 @@ export QUIET ECHO
188 188
189# if DEBUG is enabled, then we do not strip or optimize 189# if DEBUG is enabled, then we do not strip or optimize
190ifeq ($(strip $(DEBUG)),true) 190ifeq ($(strip $(DEBUG)),true)
191 CFLAGS += -O1 -g -DDEBUG 191 override CFLAGS += -O1 -g -DDEBUG
192 STRIPCMD = /bin/true -Since_we_are_debugging 192 STRIPCMD = /bin/true -Since_we_are_debugging
193else 193else
194 CFLAGS += $(OPTIMIZATION) -fomit-frame-pointer 194 override CFLAGS += $(OPTIMIZATION) -fomit-frame-pointer
195 STRIPCMD = $(STRIP) -s --remove-section=.note --remove-section=.comment 195 STRIPCMD = $(STRIP) -s --remove-section=.note --remove-section=.comment
196endif 196endif
197 197
diff --git a/tools/power/cpupower/bench/Makefile b/tools/power/cpupower/bench/Makefile
index d79ab161cc75..f68b4bc55273 100644
--- a/tools/power/cpupower/bench/Makefile
+++ b/tools/power/cpupower/bench/Makefile
@@ -9,7 +9,7 @@ endif
9ifeq ($(strip $(STATIC)),true) 9ifeq ($(strip $(STATIC)),true)
10LIBS = -L../ -L$(OUTPUT) -lm 10LIBS = -L../ -L$(OUTPUT) -lm
11OBJS = $(OUTPUT)main.o $(OUTPUT)parse.o $(OUTPUT)system.o $(OUTPUT)benchmark.o \ 11OBJS = $(OUTPUT)main.o $(OUTPUT)parse.o $(OUTPUT)system.o $(OUTPUT)benchmark.o \
12 $(OUTPUT)../lib/cpufreq.o $(OUTPUT)../lib/sysfs.o 12 $(OUTPUT)../lib/cpufreq.o $(OUTPUT)../lib/cpupower.o
13else 13else
14LIBS = -L../ -L$(OUTPUT) -lm -lcpupower 14LIBS = -L../ -L$(OUTPUT) -lm -lcpupower
15OBJS = $(OUTPUT)main.o $(OUTPUT)parse.o $(OUTPUT)system.o $(OUTPUT)benchmark.o 15OBJS = $(OUTPUT)main.o $(OUTPUT)parse.o $(OUTPUT)system.o $(OUTPUT)benchmark.o
diff --git a/tools/power/cpupower/debug/x86_64/Makefile b/tools/power/cpupower/debug/x86_64/Makefile
index 59af84b8ef45..b1b6c43644e7 100644
--- a/tools/power/cpupower/debug/x86_64/Makefile
+++ b/tools/power/cpupower/debug/x86_64/Makefile
@@ -13,10 +13,10 @@ INSTALL = /usr/bin/install
13default: all 13default: all
14 14
15$(OUTPUT)centrino-decode: ../i386/centrino-decode.c 15$(OUTPUT)centrino-decode: ../i386/centrino-decode.c
16 $(CC) $(CFLAGS) -o $@ $< 16 $(CC) $(CFLAGS) -o $@ $(LDFLAGS) $<
17 17
18$(OUTPUT)powernow-k8-decode: ../i386/powernow-k8-decode.c 18$(OUTPUT)powernow-k8-decode: ../i386/powernow-k8-decode.c
19 $(CC) $(CFLAGS) -o $@ $< 19 $(CC) $(CFLAGS) -o $@ $(LDFLAGS) $<
20 20
21all: $(OUTPUT)centrino-decode $(OUTPUT)powernow-k8-decode 21all: $(OUTPUT)centrino-decode $(OUTPUT)powernow-k8-decode
22 22
diff --git a/tools/power/cpupower/lib/cpufreq.c b/tools/power/cpupower/lib/cpufreq.c
index 1b993fe1ce23..0c0f3e3f0d80 100644
--- a/tools/power/cpupower/lib/cpufreq.c
+++ b/tools/power/cpupower/lib/cpufreq.c
@@ -28,7 +28,7 @@ static unsigned int sysfs_cpufreq_read_file(unsigned int cpu, const char *fname,
28 28
29 snprintf(path, sizeof(path), PATH_TO_CPU "cpu%u/cpufreq/%s", 29 snprintf(path, sizeof(path), PATH_TO_CPU "cpu%u/cpufreq/%s",
30 cpu, fname); 30 cpu, fname);
31 return sysfs_read_file(path, buf, buflen); 31 return cpupower_read_sysfs(path, buf, buflen);
32} 32}
33 33
34/* helper function to write a new value to a /sys file */ 34/* helper function to write a new value to a /sys file */
diff --git a/tools/power/cpupower/lib/cpuidle.c b/tools/power/cpupower/lib/cpuidle.c
index 9bd4c7655fdb..852d25462388 100644
--- a/tools/power/cpupower/lib/cpuidle.c
+++ b/tools/power/cpupower/lib/cpuidle.c
@@ -319,7 +319,7 @@ static unsigned int sysfs_cpuidle_read_file(const char *fname, char *buf,
319 319
320 snprintf(path, sizeof(path), PATH_TO_CPU "cpuidle/%s", fname); 320 snprintf(path, sizeof(path), PATH_TO_CPU "cpuidle/%s", fname);
321 321
322 return sysfs_read_file(path, buf, buflen); 322 return cpupower_read_sysfs(path, buf, buflen);
323} 323}
324 324
325 325
diff --git a/tools/power/cpupower/lib/cpupower.c b/tools/power/cpupower/lib/cpupower.c
index 9c395ec924de..9711d628b0f4 100644
--- a/tools/power/cpupower/lib/cpupower.c
+++ b/tools/power/cpupower/lib/cpupower.c
@@ -15,7 +15,7 @@
15#include "cpupower.h" 15#include "cpupower.h"
16#include "cpupower_intern.h" 16#include "cpupower_intern.h"
17 17
18unsigned int sysfs_read_file(const char *path, char *buf, size_t buflen) 18unsigned int cpupower_read_sysfs(const char *path, char *buf, size_t buflen)
19{ 19{
20 int fd; 20 int fd;
21 ssize_t numread; 21 ssize_t numread;
@@ -95,7 +95,7 @@ static int sysfs_topology_read_file(unsigned int cpu, const char *fname, int *re
95 95
96 snprintf(path, sizeof(path), PATH_TO_CPU "cpu%u/topology/%s", 96 snprintf(path, sizeof(path), PATH_TO_CPU "cpu%u/topology/%s",
97 cpu, fname); 97 cpu, fname);
98 if (sysfs_read_file(path, linebuf, MAX_LINE_LEN) == 0) 98 if (cpupower_read_sysfs(path, linebuf, MAX_LINE_LEN) == 0)
99 return -1; 99 return -1;
100 *result = strtol(linebuf, &endp, 0); 100 *result = strtol(linebuf, &endp, 0);
101 if (endp == linebuf || errno == ERANGE) 101 if (endp == linebuf || errno == ERANGE)
diff --git a/tools/power/cpupower/lib/cpupower_intern.h b/tools/power/cpupower/lib/cpupower_intern.h
index 92affdfbe417..4887c76d23f8 100644
--- a/tools/power/cpupower/lib/cpupower_intern.h
+++ b/tools/power/cpupower/lib/cpupower_intern.h
@@ -3,4 +3,4 @@
3#define MAX_LINE_LEN 4096 3#define MAX_LINE_LEN 4096
4#define SYSFS_PATH_MAX 255 4#define SYSFS_PATH_MAX 255
5 5
6unsigned int sysfs_read_file(const char *path, char *buf, size_t buflen); 6unsigned int cpupower_read_sysfs(const char *path, char *buf, size_t buflen);