mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
Power management fixes for 4.20-rc4
- Fix tasks freezer deadlock in de_thread() that occurs if one
of its sub-threads has been frozen already (Chanho Min).
- Avoid registering a platform device by the ti-cpufreq driver
on platforms that cannot use it (Dave Gerlach).
- Fix a mistake in the ti-opp-supply operating performance points
(OPP) driver that caused an incorrect reference voltage to be
used and make it adjust the minimum voltage dynamically to avoid
hangs or crashes in some cases (Keerthy).
- Fix issues related to compiler flags in the cpupower utility
and correct a linking problem in it by renaming a file with
a duplicate name (Jiri Olsa, Konstantin Khlebnikov).
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQIcBAABCAAGBQJb99ANAAoJEILEb/54YlRxUk4QAIkpXmLdEm0zvQXJZKJxuxu/
8eiglPcoCAAVgR3uRjezTyQeFCDjqGIqmpiipFOkxgAaeb+aiFta2B88B4oZ3OAf
G5yJG4CMs5+Tp/oH2+McX4PMo2WfoEIDoOGVOdtlk4iGAIh9tT5KvNfCUyxHLP7c
cFjdeUQuc8PRPzutESxYHB23FmECCEprVmEFVckQ7vSCnWX6dm1mFteCiNZADH8/
YNgRWRYtyWXlPRNCPJuCvYmVHLgm0Tw6CVhG4ttXT9wIkYyiLK9Flx9X6gsBWdoS
ej1jbJM7R/EAUzHvCjUCSfMKDNWvQySR3gC2m0vG5Goext2UXWieSHaI6BfqjPP2
wTBX9lAKu3iIGISoorjJZAMe4v26Tpbs0v5ApsOGr50WNZKZtRkBwaJ0EFT2hEa8
MsDtUjr+d7CIQ+ZDHmAbOzghpDlSuhGypfkD7IPtA/AY1dy1wJ3BUYya8ucqSdr3
iKkQcndN3ASR1+Fyb3c1cflh9fWe84aeSmYPihcX2m+/D43keYXbj2ANdCH1dF3E
cwAXw9+VteUQ1tihqgJapFogK3VphMbRErPSGXryuyiMxr38g7tgHAd2rId0JG4g
QftqpZa19aEed8tJNaQWWjBaBFgYeAT9BQqcP6CjFOO9klPH//NSiqzQUFMdzsEc
Qql1V/aoOIsflb7gJH3/
=JQxr
-----END PGP SIGNATURE-----
Merge tag 'pm-4.20-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull power management fixes from Rafael Wysocki:
"These fix two issues in the Operating Performance Points (OPP)
framework, one cpufreq driver issue, one problem related to the tasks
freezer and a few build-related issues in the cpupower utility.
Specifics:
- Fix tasks freezer deadlock in de_thread() that occurs if one of its
sub-threads has been frozen already (Chanho Min).
- Avoid registering a platform device by the ti-cpufreq driver on
platforms that cannot use it (Dave Gerlach).
- Fix a mistake in the ti-opp-supply operating performance points
(OPP) driver that caused an incorrect reference voltage to be used
and make it adjust the minimum voltage dynamically to avoid hangs
or crashes in some cases (Keerthy).
- Fix issues related to compiler flags in the cpupower utility and
correct a linking problem in it by renaming a file with a duplicate
name (Jiri Olsa, Konstantin Khlebnikov)"
* tag 'pm-4.20-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
exec: make de_thread() freezable
cpufreq: ti-cpufreq: Only register platform_device when supported
opp: ti-opp-supply: Correct the supply in _get_optimal_vdd_voltage call
opp: ti-opp-supply: Dynamically update u_volt_min
tools cpupower: Override CFLAGS assignments
tools cpupower debug: Allow to use outside build flags
tools/power/cpupower: fix compilation with STATIC=true
This commit is contained in:
commit
b88af99487
10 changed files with 42 additions and 22 deletions
|
|
@ -129,7 +129,7 @@ WARNINGS += $(call cc-supports,-Wno-pointer-sign)
|
|||
WARNINGS += $(call cc-supports,-Wdeclaration-after-statement)
|
||||
WARNINGS += -Wshadow
|
||||
|
||||
CFLAGS += -DVERSION=\"$(VERSION)\" -DPACKAGE=\"$(PACKAGE)\" \
|
||||
override CFLAGS += -DVERSION=\"$(VERSION)\" -DPACKAGE=\"$(PACKAGE)\" \
|
||||
-DPACKAGE_BUGREPORT=\"$(PACKAGE_BUGREPORT)\" -D_GNU_SOURCE
|
||||
|
||||
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
|
|||
LIB_OBJS = lib/cpufreq.o lib/cpupower.o lib/cpuidle.o
|
||||
LIB_OBJS := $(addprefix $(OUTPUT),$(LIB_OBJS))
|
||||
|
||||
CFLAGS += -pipe
|
||||
override CFLAGS += -pipe
|
||||
|
||||
ifeq ($(strip $(NLS)),true)
|
||||
INSTALL_NLS += install-gmo
|
||||
COMPILE_NLS += create-gmo
|
||||
CFLAGS += -DNLS
|
||||
override CFLAGS += -DNLS
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(CPUFREQ_BENCH)),true)
|
||||
|
|
@ -175,7 +175,7 @@ ifeq ($(strip $(STATIC)),true)
|
|||
UTIL_SRC += $(LIB_SRC)
|
||||
endif
|
||||
|
||||
CFLAGS += $(WARNINGS)
|
||||
override CFLAGS += $(WARNINGS)
|
||||
|
||||
ifeq ($(strip $(V)),false)
|
||||
QUIET=@
|
||||
|
|
@ -188,10 +188,10 @@ export QUIET ECHO
|
|||
|
||||
# if DEBUG is enabled, then we do not strip or optimize
|
||||
ifeq ($(strip $(DEBUG)),true)
|
||||
CFLAGS += -O1 -g -DDEBUG
|
||||
override CFLAGS += -O1 -g -DDEBUG
|
||||
STRIPCMD = /bin/true -Since_we_are_debugging
|
||||
else
|
||||
CFLAGS += $(OPTIMIZATION) -fomit-frame-pointer
|
||||
override CFLAGS += $(OPTIMIZATION) -fomit-frame-pointer
|
||||
STRIPCMD = $(STRIP) -s --remove-section=.note --remove-section=.comment
|
||||
endif
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ endif
|
|||
ifeq ($(strip $(STATIC)),true)
|
||||
LIBS = -L../ -L$(OUTPUT) -lm
|
||||
OBJS = $(OUTPUT)main.o $(OUTPUT)parse.o $(OUTPUT)system.o $(OUTPUT)benchmark.o \
|
||||
$(OUTPUT)../lib/cpufreq.o $(OUTPUT)../lib/sysfs.o
|
||||
$(OUTPUT)../lib/cpufreq.o $(OUTPUT)../lib/cpupower.o
|
||||
else
|
||||
LIBS = -L../ -L$(OUTPUT) -lm -lcpupower
|
||||
OBJS = $(OUTPUT)main.o $(OUTPUT)parse.o $(OUTPUT)system.o $(OUTPUT)benchmark.o
|
||||
|
|
|
|||
|
|
@ -13,10 +13,10 @@ INSTALL = /usr/bin/install
|
|||
default: all
|
||||
|
||||
$(OUTPUT)centrino-decode: ../i386/centrino-decode.c
|
||||
$(CC) $(CFLAGS) -o $@ $<
|
||||
$(CC) $(CFLAGS) -o $@ $(LDFLAGS) $<
|
||||
|
||||
$(OUTPUT)powernow-k8-decode: ../i386/powernow-k8-decode.c
|
||||
$(CC) $(CFLAGS) -o $@ $<
|
||||
$(CC) $(CFLAGS) -o $@ $(LDFLAGS) $<
|
||||
|
||||
all: $(OUTPUT)centrino-decode $(OUTPUT)powernow-k8-decode
|
||||
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ static unsigned int sysfs_cpufreq_read_file(unsigned int cpu, const char *fname,
|
|||
|
||||
snprintf(path, sizeof(path), PATH_TO_CPU "cpu%u/cpufreq/%s",
|
||||
cpu, fname);
|
||||
return sysfs_read_file(path, buf, buflen);
|
||||
return cpupower_read_sysfs(path, buf, buflen);
|
||||
}
|
||||
|
||||
/* 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,
|
|||
|
||||
snprintf(path, sizeof(path), PATH_TO_CPU "cpuidle/%s", fname);
|
||||
|
||||
return sysfs_read_file(path, buf, buflen);
|
||||
return cpupower_read_sysfs(path, buf, buflen);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
#include "cpupower.h"
|
||||
#include "cpupower_intern.h"
|
||||
|
||||
unsigned int sysfs_read_file(const char *path, char *buf, size_t buflen)
|
||||
unsigned int cpupower_read_sysfs(const char *path, char *buf, size_t buflen)
|
||||
{
|
||||
int fd;
|
||||
ssize_t numread;
|
||||
|
|
@ -95,7 +95,7 @@ static int sysfs_topology_read_file(unsigned int cpu, const char *fname, int *re
|
|||
|
||||
snprintf(path, sizeof(path), PATH_TO_CPU "cpu%u/topology/%s",
|
||||
cpu, fname);
|
||||
if (sysfs_read_file(path, linebuf, MAX_LINE_LEN) == 0)
|
||||
if (cpupower_read_sysfs(path, linebuf, MAX_LINE_LEN) == 0)
|
||||
return -1;
|
||||
*result = strtol(linebuf, &endp, 0);
|
||||
if (endp == linebuf || errno == ERANGE)
|
||||
|
|
|
|||
|
|
@ -3,4 +3,4 @@
|
|||
#define MAX_LINE_LEN 4096
|
||||
#define SYSFS_PATH_MAX 255
|
||||
|
||||
unsigned int sysfs_read_file(const char *path, char *buf, size_t buflen);
|
||||
unsigned int cpupower_read_sysfs(const char *path, char *buf, size_t buflen);
|
||||
|
|
|
|||
Loading…
Reference in a new issue