diff options
Diffstat (limited to 'tools/power')
-rw-r--r-- | tools/power/cpupower/Makefile | 12 | ||||
-rw-r--r-- | tools/power/cpupower/bench/Makefile | 2 | ||||
-rw-r--r-- | tools/power/cpupower/debug/x86_64/Makefile | 4 | ||||
-rw-r--r-- | tools/power/cpupower/lib/cpufreq.c | 2 | ||||
-rw-r--r-- | tools/power/cpupower/lib/cpuidle.c | 2 | ||||
-rw-r--r-- | tools/power/cpupower/lib/cpupower.c | 4 | ||||
-rw-r--r-- | tools/power/cpupower/lib/cpupower_intern.h | 2 |
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) | |||
129 | WARNINGS += $(call cc-supports,-Wdeclaration-after-statement) | 129 | WARNINGS += $(call cc-supports,-Wdeclaration-after-statement) |
130 | WARNINGS += -Wshadow | 130 | WARNINGS += -Wshadow |
131 | 131 | ||
132 | CFLAGS += -DVERSION=\"$(VERSION)\" -DPACKAGE=\"$(PACKAGE)\" \ | 132 | override CFLAGS += -DVERSION=\"$(VERSION)\" -DPACKAGE=\"$(PACKAGE)\" \ |
133 | -DPACKAGE_BUGREPORT=\"$(PACKAGE_BUGREPORT)\" -D_GNU_SOURCE | 133 | -DPACKAGE_BUGREPORT=\"$(PACKAGE_BUGREPORT)\" -D_GNU_SOURCE |
134 | 134 | ||
135 | UTIL_OBJS = utils/helpers/amd.o utils/helpers/msr.o \ | 135 | UTIL_OBJS = utils/helpers/amd.o utils/helpers/msr.o \ |
@@ -156,12 +156,12 @@ LIB_SRC = lib/cpufreq.c lib/cpupower.c lib/cpuidle.c | |||
156 | LIB_OBJS = lib/cpufreq.o lib/cpupower.o lib/cpuidle.o | 156 | LIB_OBJS = lib/cpufreq.o lib/cpupower.o lib/cpuidle.o |
157 | LIB_OBJS := $(addprefix $(OUTPUT),$(LIB_OBJS)) | 157 | LIB_OBJS := $(addprefix $(OUTPUT),$(LIB_OBJS)) |
158 | 158 | ||
159 | CFLAGS += -pipe | 159 | override CFLAGS += -pipe |
160 | 160 | ||
161 | ifeq ($(strip $(NLS)),true) | 161 | ifeq ($(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 |
165 | endif | 165 | endif |
166 | 166 | ||
167 | ifeq ($(strip $(CPUFREQ_BENCH)),true) | 167 | ifeq ($(strip $(CPUFREQ_BENCH)),true) |
@@ -175,7 +175,7 @@ ifeq ($(strip $(STATIC)),true) | |||
175 | UTIL_SRC += $(LIB_SRC) | 175 | UTIL_SRC += $(LIB_SRC) |
176 | endif | 176 | endif |
177 | 177 | ||
178 | CFLAGS += $(WARNINGS) | 178 | override CFLAGS += $(WARNINGS) |
179 | 179 | ||
180 | ifeq ($(strip $(V)),false) | 180 | ifeq ($(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 |
190 | ifeq ($(strip $(DEBUG)),true) | 190 | ifeq ($(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 |
193 | else | 193 | else |
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 |
196 | endif | 196 | endif |
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 | |||
9 | ifeq ($(strip $(STATIC)),true) | 9 | ifeq ($(strip $(STATIC)),true) |
10 | LIBS = -L../ -L$(OUTPUT) -lm | 10 | LIBS = -L../ -L$(OUTPUT) -lm |
11 | OBJS = $(OUTPUT)main.o $(OUTPUT)parse.o $(OUTPUT)system.o $(OUTPUT)benchmark.o \ | 11 | OBJS = $(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 |
13 | else | 13 | else |
14 | LIBS = -L../ -L$(OUTPUT) -lm -lcpupower | 14 | LIBS = -L../ -L$(OUTPUT) -lm -lcpupower |
15 | OBJS = $(OUTPUT)main.o $(OUTPUT)parse.o $(OUTPUT)system.o $(OUTPUT)benchmark.o | 15 | OBJS = $(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 | |||
13 | default: all | 13 | default: 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 | ||
21 | all: $(OUTPUT)centrino-decode $(OUTPUT)powernow-k8-decode | 21 | all: $(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 | ||
18 | unsigned int sysfs_read_file(const char *path, char *buf, size_t buflen) | 18 | unsigned 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 | ||
6 | unsigned int sysfs_read_file(const char *path, char *buf, size_t buflen); | 6 | unsigned int cpupower_read_sysfs(const char *path, char *buf, size_t buflen); |