History

Merge branches 'pm-opp' and 'pm-tools'

* pm-opp: opp: ti-opp-supply: Correct the supply in _get_optimal_vdd_voltage call opp: ti-opp-supply: Dynamically update u_volt_min * pm-tools: tools cpupower: Override CFLAGS assignments tools cpupower debug: Allow to use outside build flags tools/power/cpupower: fix compilation with STATIC=true

Rafael J. Wysocki committed 7 years ago

Commit bec00cb2 parents 6eb5c9b 0db699f7 files · +14 −14Browse files

Unified · Split

7 files
  1. tools/power/cpupower/Makefile +6 −6
  2. tools/power/cpupower/bench/Makefile +1 −1
  3. tools/power/cpupower/debug/x86_64/Makefile +2 −2
  4. tools/power/cpupower/lib/cpufreq.c +1 −1
  5. tools/power/cpupower/lib/cpuidle.c +1 −1
  6. tools/power/cpupower/lib/cpupower.c +2 −2
  7. tools/power/cpupower/lib/cpupower_intern.h +1 −1
tools/power/cpupower/Makefile+6−6
@@ -129,7 +129,7 @@ WARNINGS += $(call cc-supports,-Wno-pointer-sign) · 128 unmodified lines
129129 WARNINGS += $(call cc-supports,-Wdeclaration-after-statement)
130130 WARNINGS += -Wshadow
131131
132−CFLAGS += -DVERSION=\"$(VERSION)\" -DPACKAGE=\"$(PACKAGE)\" \
132+override CFLAGS += -DVERSION=\"$(VERSION)\" -DPACKAGE=\"$(PACKAGE)\" \
133133 -DPACKAGE_BUGREPORT=\"$(PACKAGE_BUGREPORT)\" -D_GNU_SOURCE
134134
135135 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 · 20 unmodified lines
156156 LIB_OBJS = lib/cpufreq.o lib/cpupower.o lib/cpuidle.o
157157 LIB_OBJS := $(addprefix $(OUTPUT),$(LIB_OBJS))
158158
159−CFLAGS += -pipe
159+override CFLAGS += -pipe
160160
161161 ifeq ($(strip $(NLS)),true)
162162 INSTALL_NLS += install-gmo
163163 COMPILE_NLS += create-gmo
164− CFLAGS += -DNLS
164+ override CFLAGS += -DNLS
165165 endif
166166
167167 ifeq ($(strip $(CPUFREQ_BENCH)),true)
@@ -175,7 +175,7 @@ ifeq ($(strip $(STATIC)),true) · 7 unmodified lines
175175 UTIL_SRC += $(LIB_SRC)
176176 endif
177177
178−CFLAGS += $(WARNINGS)
178+override CFLAGS += $(WARNINGS)
179179
180180 ifeq ($(strip $(V)),false)
181181 QUIET=@
@@ -188,10 +188,10 @@ export QUIET ECHO · 6 unmodified lines
188188
189189 # if DEBUG is enabled, then we do not strip or optimize
190190 ifeq ($(strip $(DEBUG)),true)
191− CFLAGS += -O1 -g -DDEBUG
191+ override CFLAGS += -O1 -g -DDEBUG
192192 STRIPCMD = /bin/true -Since_we_are_debugging
193193 else
194− CFLAGS += $(OPTIMIZATION) -fomit-frame-pointer
194+ override CFLAGS += $(OPTIMIZATION) -fomit-frame-pointer
195195 STRIPCMD = $(STRIP) -s --remove-section=.note --remove-section=.comment
196196 endif
197197
tools/power/cpupower/bench/Makefile+1−1
@@ -9,7 +9,7 @@ endif · 8 unmodified lines
99 ifeq ($(strip $(STATIC)),true)
1010 LIBS = -L../ -L$(OUTPUT) -lm
1111 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
1313 else
1414 LIBS = -L../ -L$(OUTPUT) -lm -lcpupower
1515 OBJS = $(OUTPUT)main.o $(OUTPUT)parse.o $(OUTPUT)system.o $(OUTPUT)benchmark.o
tools/power/cpupower/debug/x86_64/Makefile+2−2
@@ -13,10 +13,10 @@ INSTALL = /usr/bin/install · 12 unmodified lines
1313 default: all
1414
1515 $(OUTPUT)centrino-decode: ../i386/centrino-decode.c
16− $(CC) $(CFLAGS) -o $@ $<
16+ $(CC) $(CFLAGS) -o $@ $(LDFLAGS) $<
1717
1818 $(OUTPUT)powernow-k8-decode: ../i386/powernow-k8-decode.c
19− $(CC) $(CFLAGS) -o $@ $<
19+ $(CC) $(CFLAGS) -o $@ $(LDFLAGS) $<
2020
2121 all: $(OUTPUT)centrino-decode $(OUTPUT)powernow-k8-decode
2222
tools/power/cpupower/lib/cpufreq.c+1−1
@@ -28,7 +28,7 @@ static unsigned int sysfs_cpufreq_read_file(unsigned int cpu, const char *fname, · 27 unmodified lines
2828
2929 snprintf(path, sizeof(path), PATH_TO_CPU "cpu%u/cpufreq/%s",
3030 cpu, fname);
31− return sysfs_read_file(path, buf, buflen);
31+ return cpupower_read_sysfs(path, buf, buflen);
3232 }
3333
3434 /* helper function to write a new value to a /sys file */
tools/power/cpupower/lib/cpuidle.c+1−1
@@ -319,7 +319,7 @@ static unsigned int sysfs_cpuidle_read_file(const char *fname, char *buf, · 318 unmodified lines
319319
320320 snprintf(path, sizeof(path), PATH_TO_CPU "cpuidle/%s", fname);
321321
322− return sysfs_read_file(path, buf, buflen);
322+ return cpupower_read_sysfs(path, buf, buflen);
323323 }
324324
325325
tools/power/cpupower/lib/cpupower.c+2−2
@@ -15,7 +15,7 @@ · 14 unmodified lines
1515 #include "cpupower.h"
1616 #include "cpupower_intern.h"
1717
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)
1919 {
2020 int fd;
2121 ssize_t numread;
@@ -95,7 +95,7 @@ static int sysfs_topology_read_file(unsigned int cpu, const char *fname, int *re · 73 unmodified lines
9595
9696 snprintf(path, sizeof(path), PATH_TO_CPU "cpu%u/topology/%s",
9797 cpu, fname);
98− if (sysfs_read_file(path, linebuf, MAX_LINE_LEN) == 0)
98+ if (cpupower_read_sysfs(path, linebuf, MAX_LINE_LEN) == 0)
9999 return -1;
100100 *result = strtol(linebuf, &endp, 0);
101101 if (endp == linebuf || errno == ERANGE)
tools/power/cpupower/lib/cpupower_intern.h+1−1
@@ -3,4 +3,4 @@ · 2 unmodified lines
33 #define MAX_LINE_LEN 4096
44 #define SYSFS_PATH_MAX 255
55
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);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t