sched: smart wake-affine
mach-msm: Introduce Dynamic hotplug driver for mako

Introduce a dynamic hotplug driver to automatically online/offline
CPUs proportional to load.

Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
mach-msm: dyn_hotplug: Clean up properly on exit

Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
mach-msm: dyn_hotplug: Prevent immediate online of a CPU

When a CPU goes offline we should wait at least 1 sec before online it
again.

Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
mach-msm: dyn_hotplug: Check for valid return of cpufreq_get_policy

Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
mach-msm: dyn_hotplug: Online all CPUs on resume

Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
cpufreq: Create a helper function to get CPU utilization

Use the new cpufreq_quick_get_util function in dyn_hotplug driver

Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
mach-msm: dyn_hotplug: Check if CPU is online/offline before hotplug

Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
mach-msm: dyn_hotplug: Add new line in pr_debug

Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
cpufreq: Increase utilization threshold to 25

Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
mach-msm: dyn_hotplug: Add module parameters to control driver

Add module parameters for
- up_threshold
- enabled
- min_online

Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
mach-msm: dyn_hotplug: Unregister early suspend on module exit

Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
mach_msm: dyn_hotplug: Register/unregister early suspend on enable/disable

Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
mach-msm: dyn_hotplug: Delay online next core

Bring online next core after 1sec.

Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
mach-msm: dyn_hotplug: Change method of online/offline cores

Fixes cpufreq stats breakage.

Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
mach-msm: dyn_hotplug: Use enabled flag to protect enable/disable ops

Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
mach-msm: dyn_hotplug: Remove debug info

Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
mach-msm: dyn_hotplug: Add checks in parameters set

Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
mach-msm: dyn_hotplug: Add max_online parameter

Add max_online tunable (default value 4) to control the max possible
online CPUs.

Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
mach-msm: dyn-hotplug: Use macros for down_timer and up_timer thresholds

Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>