compilation: fix up for mismatched type for system_rev

Signed-off-by: Paul Reioux <reioux@gmail.com>
support for gcc 4.9
make it compile with CPU_FREQ_LIMIT and SEC_DEBUG disabled
cpufreq: interactive: fix compiling warnings

The gcc warns like:

  cpufreq_interactive.c:745:6: warning: operation on 'ret' may be undefined [-Wsequence-point]

It was introduced by commit cf0fad49d17cb8273ce555dd5b7afab67d7923bf.

Since sprintf(...) just return 1 (one character) in this case, ret should not changed.
Just discarding the result of sprintf(...) leads to the result that
the committer of cf0fad49d17cb8273ce555dd5b7afab67d7923bf wants.

Change-Id: Ifed1cef6d6a31c3ed23dad03a567b3b9eddf3a57
Signed-off-by: Chih-Wei Huang <cwhuang@android-x86.org>
Git-commit: 0715d10b9e6c04327adb189e13ecd6a3c2df48ce
Git-Repo: https://android.googlesource.com/kernel/common.git
Signed-off-by: Junjie Wu <junjiew@codeaurora.org>
cpufreq: force cpuN policy to match cpu0 when changing freq or gov
mdnie lite control: add initial control interface (version 1.3)

Version 1.3: updated sysfs interface
Version 1.2: fixed compatibility with samsung NA6 (kitkat) source.

available channels:
[/sys/class/mdnie/mdnie/*]
(* = red, green, blue, cyan, magenta, yellow, white, black)

set values for each channel:
[echo x y z > /sys/class/mdnie/mdnie/red]
(x = red; y = green; z = blue)
- range: 0-255

control for "sharpen" effect:
[echo x > /sys/class/mdnie/mdnie/sharpen]
- range: 0-11

override for all samsung modes and profiles:
[echo x > /sys/class/mdnie/mdnie/override]
- 0 = disabled
- 1 = enabled

copy color profile from existing mdnie profile:
[echo x > /sys/class/mdnie/mdnie/copy_mode]
- 0 = Standard
- 1 = Natural
- 2 = Movie

copy gamma curve from existing mdnie profile:
[echo x > /sys/class/mdnie/mdnie/gamma_curve]
- 0 = Movie
- 1 = Dynamic

Idea based on (mDNIe colour and brightness control) by AndreiLux.
Thanks to Yank555.lu for his hijack and mode copy implementation.

Signed-off-by: Wootever <Wootever@users.noreply.github.com>
scripts: Do not append plus character if dirty
log: quiet please
drivers: cpuidle: sync
msm_thermal: small cleanup
Fix this warning by removing a unneeded use of defined

TIMEC   kernel/timeconst.h
defined(@array) is deprecated at kernel/timeconst.pl line 373.
  	(Maybe you should just omit the defined()?)

Signed-off-by: Peter Foley <pefoley2@verizon.net>
This fixes a warning saying:

    warning: #warning "TODO: return_address should use unwind tables"

And, this enables return_address using unwind information. If ARM_UNWIND is
selected, unwind_frame in unwind.c will be called in walk_stackframe.

Signed-off-by: sahara <keun-o.park@windriver.com>
msm: hotplug: Add MSM Hotplug driver

- msm: hotplug: Check down lock for lowest load cpu
msm: msm_rq_stats: remove is_smp() API

is_smp() API is unavailable on few target codes.
Until this API is defined use CONFIG_SMP to know
whether target supports SPM are not.

CRs-fixed: 579034
Change-Id: I5bd5c208b18aae27d7f36e77e9d5b38639c2c00e
Signed-off-by: Murali Nalajala <mnalajal@codeaurora.org>
msm: rq_stats: Use cpufreq API to get the current frequency

Since the acpuclock APIs are deprecated, use the cpufreq to
get the current frequency of CPUs to calculate the cpu
normalized load value.

Change-Id: I6e381d584d6725ef964bad86c835d44f3046e9c3
Signed-off-by: Archana Sathyakumar <asathyak@codeaurora.org>
msm: rq_stats: Fix wrong usage of cpufreq_quick_get()

cpufreq_quick_get() returns frequency in KHz, which is exactly what
cur_freq expect. Remove the wrong multiplication.

CRs-fixed: 645518
Change-Id: Ia8b080a188023964f5eee77c8586828097d11ad4
Signed-off-by: Junjie Wu <junjiew@codeaurora.org>
msm: rq_stats: Calculate load based on current freq limit

We are not using rq_stats any more so this commit is just for the
sake of completeness.  Prior to this patch, load has been calculated
based on an initial value of policy.cpuinfo.max_freq. This value may
change for several reasons: userspace settings, thermal throttling
(hello hammerhead!) or extended frequency tables where the absolute
maximum level is often not used during regular operations. This
results in unreliable calculations. Consider current policy.max to
fix this behaviour.
msm: rq_stats: Disable hotplug and stats by default

Userspace closed source mpdecision binary is nessecary for PowerHAL to work.
As it depends on rq_stats, let's at least disable hotplugging and stats
collection by default. /sys/devices/system/cpu/cpu0/rq-stats/hotplug_disable
is now writable, so hotplug can be reenabled.

Also, add some bits related to current cpu policy.
soc: qcom: rq_stats: remove the redundant iowait check

Iowait_time check is redundant and it would lead to heavy load
due to miscaluculation of idle time. Hence remove this check
as iowait will considered based on io_busy flag.

[myfluxi: Adapt to msm 8974]

Change-Id: I4dd9f9c79205eca588daea8cc0fe892394a83391
CRs-fixed: 662052
Signed-off-by: Anji Jonnala <anjir@codeaurora.org>
msm: rq_stats: Use u64 for variables, arguments and return vals