* 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
Unified · Split
| @@ -129,7 +129,7 @@ WARNINGS += $(call cc-supports,-Wno-pointer-sign) · 128 unmodified lines | ||
| 129 | 129 | WARNINGS += $(call cc-supports,-Wdeclaration-after-statement) |
| 130 | 130 | WARNINGS += -Wshadow |
| 131 | 131 | |
| 132 | −CFLAGS += -DVERSION=\"$(VERSION)\" -DPACKAGE=\"$(PACKAGE)\" \ | |
| 132 | +override CFLAGS += -DVERSION=\"$(VERSION)\" -DPACKAGE=\"$(PACKAGE)\" \ | |
| 133 | 133 | -DPACKAGE_BUGREPORT=\"$(PACKAGE_BUGREPORT)\" -D_GNU_SOURCE |
| 134 | 134 | |
| 135 | 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 · 20 unmodified lines | ||
| 156 | 156 | LIB_OBJS = lib/cpufreq.o lib/cpupower.o lib/cpuidle.o |
| 157 | 157 | LIB_OBJS := $(addprefix $(OUTPUT),$(LIB_OBJS)) |
| 158 | 158 | |
| 159 | −CFLAGS += -pipe | |
| 159 | +override CFLAGS += -pipe | |
| 160 | 160 | |
| 161 | 161 | ifeq ($(strip $(NLS)),true) |
| 162 | 162 | INSTALL_NLS += install-gmo |
| 163 | 163 | COMPILE_NLS += create-gmo |
| 164 | − CFLAGS += -DNLS | |
| 164 | + override CFLAGS += -DNLS | |
| 165 | 165 | endif |
| 166 | 166 | |
| 167 | 167 | ifeq ($(strip $(CPUFREQ_BENCH)),true) |
| @@ -175,7 +175,7 @@ ifeq ($(strip $(STATIC)),true) · 7 unmodified lines | ||
| 175 | 175 | UTIL_SRC += $(LIB_SRC) |
| 176 | 176 | endif |
| 177 | 177 | |
| 178 | −CFLAGS += $(WARNINGS) | |
| 178 | +override CFLAGS += $(WARNINGS) | |
| 179 | 179 | |
| 180 | 180 | ifeq ($(strip $(V)),false) |
| 181 | 181 | QUIET=@ |
| @@ -188,10 +188,10 @@ export QUIET ECHO · 6 unmodified lines | ||
| 188 | 188 | |
| 189 | 189 | # if DEBUG is enabled, then we do not strip or optimize |
| 190 | 190 | ifeq ($(strip $(DEBUG)),true) |
| 191 | − CFLAGS += -O1 -g -DDEBUG | |
| 191 | + override CFLAGS += -O1 -g -DDEBUG | |
| 192 | 192 | STRIPCMD = /bin/true -Since_we_are_debugging |
| 193 | 193 | else |
| 194 | − CFLAGS += $(OPTIMIZATION) -fomit-frame-pointer | |
| 194 | + override CFLAGS += $(OPTIMIZATION) -fomit-frame-pointer | |
| 195 | 195 | STRIPCMD = $(STRIP) -s --remove-section=.note --remove-section=.comment |
| 196 | 196 | endif |
| 197 | 197 | |
| @@ -9,7 +9,7 @@ endif · 8 unmodified lines | ||
| 9 | 9 | ifeq ($(strip $(STATIC)),true) |
| 10 | 10 | LIBS = -L../ -L$(OUTPUT) -lm |
| 11 | 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 | 13 | else |
| 14 | 14 | LIBS = -L../ -L$(OUTPUT) -lm -lcpupower |
| 15 | 15 | OBJS = $(OUTPUT)main.o $(OUTPUT)parse.o $(OUTPUT)system.o $(OUTPUT)benchmark.o |
| @@ -13,10 +13,10 @@ INSTALL = /usr/bin/install · 12 unmodified lines | ||
| 13 | 13 | default: all |
| 14 | 14 | |
| 15 | 15 | $(OUTPUT)centrino-decode: ../i386/centrino-decode.c |
| 16 | − $(CC) $(CFLAGS) -o $@ $< | |
| 16 | + $(CC) $(CFLAGS) -o $@ $(LDFLAGS) $< | |
| 17 | 17 | |
| 18 | 18 | $(OUTPUT)powernow-k8-decode: ../i386/powernow-k8-decode.c |
| 19 | − $(CC) $(CFLAGS) -o $@ $< | |
| 19 | + $(CC) $(CFLAGS) -o $@ $(LDFLAGS) $< | |
| 20 | 20 | |
| 21 | 21 | all: $(OUTPUT)centrino-decode $(OUTPUT)powernow-k8-decode |
| 22 | 22 | |
| @@ -28,7 +28,7 @@ static unsigned int sysfs_cpufreq_read_file(unsigned int cpu, const char *fname, · 27 unmodified lines | ||
| 28 | 28 | |
| 29 | 29 | snprintf(path, sizeof(path), PATH_TO_CPU "cpu%u/cpufreq/%s", |
| 30 | 30 | cpu, fname); |
| 31 | − return sysfs_read_file(path, buf, buflen); | |
| 31 | + return cpupower_read_sysfs(path, buf, buflen); | |
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 | /* helper function to write a new value to a /sys file */ |
| @@ -319,7 +319,7 @@ static unsigned int sysfs_cpuidle_read_file(const char *fname, char *buf, · 318 unmodified lines | ||
| 319 | 319 | |
| 320 | 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 | |
| @@ -15,7 +15,7 @@ · 14 unmodified lines | ||
| 15 | 15 | #include "cpupower.h" |
| 16 | 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 | 20 | int fd; |
| 21 | 21 | ssize_t numread; |
| @@ -95,7 +95,7 @@ static int sysfs_topology_read_file(unsigned int cpu, const char *fname, int *re · 73 unmodified lines | ||
| 95 | 95 | |
| 96 | 96 | snprintf(path, sizeof(path), PATH_TO_CPU "cpu%u/topology/%s", |
| 97 | 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 | 99 | return -1; |
| 100 | 100 | *result = strtol(linebuf, &endp, 0); |
| 101 | 101 | if (endp == linebuf || errno == ERANGE) |
| @@ -3,4 +3,4 @@ · 2 unmodified lines | ||
| 3 | 3 | #define MAX_LINE_LEN 4096 |
| 4 | 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); | |