add compress mode for cortex-A7

Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>

Conflicts:
	arch/arm/boot/compressed/Makefile
Logger: reclaim more memory

Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>

Conflicts:
	drivers/staging/android/logger.c
ROW: Hardcode Enable Quantum more larger and read queues more larger too

Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
Deadline: hardcode values

Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
block: queue work on power efficient wq

Adapted for 3.4 from lsk-v3.10

Block layer uses workqueues for multiple purposes. There is no real dependency
of scheduling these on the cpu which scheduled them.

On a idle system, it is observed that and idle cpu wakes up many times just to
service this work. It would be better if we can schedule it on a cpu which the
scheduler believes to be the most appropriate one.

This patch replaces normal workqueues with power efficient versions.

Cc: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
Sigend-off-by: Carlos Jesús <xxx.reptar.rawrr.xxx@gmail.com>
Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
more faster wake lock

Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
cpufreq/cpufreq_intellidemand: intellidemand cpufreq governor (version 4.0)

Intellidemand is inspired by ondemand governor. Its main features are:

 - auto cpu hotplugging based on runnable thread average calculations
 - detection of browsing mode (long screen on activities with moderate run
   queue depth =< 45 )
 - limit max frequencies when in browsing mode to conserve battery for long
   duration tasks

Browsing State Determination:
 1- Browsing state is enabled as power-on default. Browsing state is disabled
    when run queue depth is > 45 (very high instantaneous spikes)

Browsing State Limit Max Freq Logic (sliding window algorithm):
 1- While Screen is ON > 3 min, and average load of the CPU is < 35%, then
    CPU Max frequencies will remain power-on default
 2- While Screen is On, if average CPU load > 35%, both CPUs max frequencies
    will be limited to a lower user configurable max value
 3- While Screen is On, After both CPUs' Max is limited to lowered max, when
    the average CPU load has dropped down to less than < 25%, then both CPUs
    Max freq will be restored to back to power-on default

Runnable Thread Auto-hotplug (fast hotplug / slow unplug algorithm):
 1- When average number of running thread is < threshold, 2nd cpu will be
    unplugged.
 2- When > threshold, 2nd cpu will be hotplugged.
 3- The logic applies a fast hotplug and slow unplug algorithm so 2nd core
    will stay enabled longer to help deal with performance spikes

changes from Ver 2.0 -> Ver 3.0:
  - remove GPU Busy dependency for browsing state detection (this will make
    the governor more portable to other platforms without specific GPU
    architecture knowledge)

dependencies:
  -- Qualcomm's run queue average logic (SOC independent logic)
  -- TI's runnable thread average logic (SOC independent logic)

forward ported to Linux 3.4 for use on S-800

Signed-off-by: Paul Reioux <reioux@gmail.com>

Conflicts:
	arch/arm/mach-msm/cpufreq.c
Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
intellidemand: code derps clean up!

Signed-off-by: faux123 <reioux@gmail.com>
Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
Intellidemand: put cores 1~3 to sleep while screen is off

Signed-off-by: faux123 <reioux@gmail.com>
Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
arch/arm/mach-msm/cpufreq: remove deprecated logic

Signed-off-by: Paul Reioux <reioux@gmail.com>
Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
intellidemand: allow clean compilation when LMF is disabled

bumped version to 4.2

Signed-off-by: faux123 <reioux@gmail.com>

Conflicts:
	arch/arm/mach-msm/cpufreq.c
Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
arch/arm/mach-msm/cpufreq.c: remove legacy intellidemand leftovers

Signed-off-by: Paul Reioux <reioux@gmail.com>
Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
Fixes and bump intellidemand to 5.5

Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>

Conflicts:
	drivers/cpufreq/Kconfig
	drivers/cpufreq/Makefile
	include/linux/cpufreq.h
Add Intellidemand to defconfig and fix generic get-cpu-idle-time
Fix arch/arm/boot/compressed/Makefile derp