defconfig: update hercules defconfig for new kernel

Change-Id: I93096691b3b6ed7c944ec50e30a01e75cae0b616
msm_fb: display: add mutex on overlay_play to fix iommu page fault

An iommu page fault may heppen When a pipe_commit is executed
in between of frame dropped and pipe_queue during overlay play.
An mutex is necessary to mutual exclusive between pipe_commit
and overlay_play.

Change-Id: I736e821c6c648a6ebd435303a1906a40e9b75791
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
ARM: smp: Fix cpu_up() racing with sys_reboot

Nothing stops a process from hotplugging in a CPU concurrently
with a sys_reboot() call. In such a situation we could have
ipi_cpu_stop() mark a cpu as 'offline' and _cpu_up() ignore the
fact that the CPU is not really offline and call the
CPU_UP_PREPARE notifier. When this happens stop_machine code will
complain that the cpu thread already exists and BUG_ON().

CPU0                      CPU1

sys_reboot()
 kernel_restart()
  machine_restart()
   machine_shutdown()
    smp_send_stop()
    ...                   ipi_cpu_stop()
                           set_cpu_online(1, false)
                            local_irq_disable()
                             while(1)
    <PREEMPT>
cpu_up()
 _cpu_up()
   if (!cpu_online(1))
    __cpu_notify(CPU_UP_PREPARE...)

cpu_stop_cpu_callback()
  BUG_ON(stopper->thread)

This is easily reproducible by hotplugging in and out in a tight
loop while also rebooting.

Since the CPU is not really offline and hasn't gone through the
proper steps to be marked as such, let's mark the CPU as inactive.
This is just as easily testable as online and avoids any possibility
of _cpu_up() trying to bring the CPU back online when it never was
offline to begin with.

Change-Id: Ia1daea407220578d4212ef6c65c4be837ca370fd
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
p5lte: Update board file and add CM defconfig

Change-Id: I850304267e41d4ae911c45e4617bc55140d66d12
bln: Turn BLN off by default

 * So long and thanks for all the kernel panics!

Change-Id: I87f9d983050f645d90a994dbcc18c9f3e9aa68d5
p5att: Update defconfig for JB

Change-Id: I208cb3e2571d4b480af2cb342662e034fec170ec
quincy: Enable KSM

Change-Id: Iefb417af6764437df496018356d11ac0712debc0
p5att: Update defconfig

 * Enable Netfilter RAW tables and USB networking

Change-Id: I4106c89f01a72f4906156447de34dbe6401c4f46
cpufreq: ondemand: Add boost interface

 * Boost interface will boost CPU to max freq. Useful for improving
   userspace interactivity when used in conjunction with Android power
   HAL.

Change-Id: I16a1e01023dcb933ccfe58595b49ddbed74e91df
p5att: Update defconfig again

Change-Id: Iec11c1687098ac4cdea1f6d3a149be9cd0c70eed
vibetonez: disable debug logging

Change-Id: Ib360ffab35424b5e6c616b6ee6bc668cf66f0989
msm8660: update skyrocket defconfig with latest from quincy

  * try to mimic as much as possible from quincy

Change-Id: Ic227ea5aef42848c8f8cb44358265c7df261656d
msm8660: update hercules defconfig

Change-Id: I3fe65346568c3a8ee4961d2dedc7ea8cc6d77128
cpufreq: ondemand: Remove earlysuspend hooks

 * This is all managed from userspace. Remove the screen-off hooks.

Change-Id: I4126eb2b20c4668df0cd0779d1e5b288b48d690f
Revert "cpufreq: ondemand: Add boost interface"

Switching to CAF's version which has more features.

This reverts commit 2a364f1f6cf7b411f3c6d4e04b0c337c18c75c02.
cpufreq: Add a boostpulse interface to ondemand

For applications that require a one-shot increase in frequency,
the boostpulse interface would help to scale to max for the time
specified in boostime. This helps applications that currently
increases scaling_min_freq and resets later after a fixed duration.
Instead of changing scaling_min_freq applications can directly write
to boostpulse and governer resets during regular timer after the time
expires.

Change-Id: Ie5f490ff06b41364aa76dd468573433495da28a4
Signed-off-by: Narayanan Gopalakrishnan <nargop@codeaurora.org>
cpufreq: Add cpu utilization statistics to aid decisions made by userspace.

Understanding system load as seen by cpufreq can help userspace
algorithms make better decisions to improve system responsiveness.
One such example would be the MP decision algorithm which mines
various system info to make decisions on hotplugging in/out
the additional cores.

Signed-off-by: Anitha Anand <anithas@codeaurora.org>
(cherry picked from commit cbeef6aafc4964c4a6cfafd26b23eaccd40804b4)

Change-Id: I8a5fb95380af898076fe0e246fb21e3aa48b33b1
Signed-off-by: Shruthi Krishna <skrish@codeaurora.org>
cpufreq: fix utilization statistics for sync cpus

If the cpus are using related_cpus policy, then the
current implementaion will overwrite the the calculated
load for every iteration in the for loop. Hence, mpdecision
will read incorrect value, if the cores are using related
cpus policy. With this change mpdecision will read the
sum of the loads of all cpu's, if related cpu policy is
used.

Change-Id: I242c8fe39fd75dc3e48750a5b78a5d218b536ddd
Signed-off-by: Narayanan Gopalakrishnan <nargop@codeaurora.org>
Signed-off-by: Shruthi Krishna <skrish@codeaurora.org>
cpufreq: notify avg load for short sampling_rate

If the sampling rate is less than 50ms reporting
the actual load may lead to poor decision making
at user space. So, for sampling rates less than 50ms
report the average of load across two samples.

Change-Id: I0d1cf00801732bee8e4380158d7e892758226594
Signed-off-by: Narayanan Gopalakrishnan <nargop@codeaurora.org>
cpufreq: boost the sampling rate on touch event

For better Ux responsiveness ondemand sampling rate
needs to be 20ms. But, a 20ms sampling rate increases power
consumption. So, boost the sampling rate to 20ms on every
touch event for 2.5 ms and later reset to default rate.
Also, change sampling down factor proportional to the
sampling rate.

Change-Id: I111b1cf3b8ed133347149afc34d329d0384ecfcb
Signed-off-by: Narayanan Gopalakrishnan <nargop@codeaurora.org>