Cleanup
Some changes
Revert some bt changes
Oops
Linux 3.0.76-3.0.81
Changes in block and lmk/compaction
Revert "import badass from bricked"

This reverts commit 8df5bb9414cbbadbdc3da5309aa9ee918c95d944.

Conflicts:
	drivers/gpu/msm/kgsl_pwrctrl.c

Conflicts:
	drivers/cpufreq/cpufreq_badass.c
cpufreq: ondemand: Update
msm: cpufreq: fix a race between hotplug and cpufreq

When msm_cpufreq_target() is called without holding the policy
semaphore, there is a rare chance that the cpu gets hotplugged in
the acpuclk_set_rate. The probability of this issue increases
when cross-calling is used or using interactive governor which
tries to set all cpu frequencies from a single thread.

Add a hotplug notifier and set the device_suspended flag holding
the suspend mutex, when cpu is going down. This mutex is always
held when frequency changes are done.

Change-Id: Ide3aa6927ad60d2512d63761c51bb15117461250
Signed-off-by: Narayanan Gopalakrishnan <nargop@codeaurora.org>
msm: rq_stats: Support to know cpu utilization in userspace

Support to read utilization stats from userspace, used by
mpdecision. This implementation is independent of governor
and sampling rates.

Change-Id: I678c7462ba77d84ce4c51c36a61da7ac99ffecc8
Signed-off-by: Narayanan Gopalakrishnan <nargop@codeaurora.org>
Signed-off-by: Ajay Dudani <adudani@codeaurora.org>

Also fix building after previous update to ondemand governor
Change SF size to 110mb

Conflicts:
	arch/arm/mach-msm/board-msm8x60_s7pro.c
Linux 3.0.82-3.0.83
SF mem to 96mb
msm: audio: qdsp6v2: Add size safety check to ACDB driver

Check that the size sent by userspace is not larger
then the internal amount allowed. This protects
against overflowing the stack due to an invalid size.

Addresses security vulnerability:
https://www.codeaurora.org/projects/security-advisories/stack-based-buffer-overflow-acdb-audio-driver-cve-2013-2597

Change-Id: I5d97fcd6a59903c869967e55c3701e54efcb9728
Linux 3.0.84
power: wakelock: remove msleep from suspend
cgroup: fix exit() vs rmdir() race

In cgroup_exit() put_css_set_taskexit() is called without any lock,
which might lead to accessing a freed cgroup:

thread1                           thread2
---------------------------------------------
exit()
  cgroup_exit()
    put_css_set_taskexit()
      atomic_dec(cgrp->count);
                                   rmdir();
      /* not safe !! */
      check_for_release(cgrp);

rcu_read_lock() can be used to make sure the cgroup is alive.

Signed-off-by: Li Zefan <lizefan@huawei.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kernel: reduce sleep duration in wait_task_inactive

Sleeping for an entire tick adds unnecessary latency to
hotplugging a cpu (cpu_up).

Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
(cherry picked from commit 099aa69b9cfb6f4c5b56dd1d1d06ce9ef92cf2d5)

Change-Id: Ic3dd51cb4d5b9acdc1ee3270e87d8ff0cc2e8287
Signed-off-by: Ram Kumar Chakravarthy Chebathini <rcheba@codeaurora.org>
msm: clock: Log clk_enable()/disable() to non-cached bitmap

In situations where bus hangs occur its useful to know which
clocks are on and which clocks are off. Therefore, save the state
of the clock to a bitmap where each bit in the bitmap represents
the state of a clock. If the bit is set the clock is enabled and
if the bit is clear the clock is disabled. Note that clocks which
are shared will not be accurately reflected in the bitmap, but at
least it will show what the clock driver thinks the state of the
clock is even if another master in the system is requesting the
clock to be on.

Change-Id: Id5d60396a5946226884146183aecd3fa2c25019a
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>

Conflicts:
	arch/arm/mach-msm/Kconfig
msm: clock-8xxx: Duplicate gfx2d frequency table for gfx2d1

The gfx2d clocks are getting stuck off randomly when the clock
is turned on. With clocks that are glitch-free dual banked clocks
we use the frequency tables to store information about the mn
enable bits. At compile time, both mn enable bits are set in the
frequency pointer (BIT(8) | BIT(5)). At runtime, the mnd_en_mask
is updated to reflect the current bank that's selected. The
mnd_en_mask is used to turn on the mn counter for the bank that's
being used.

This is all fine except that for gfx2d there are two clocks and
these two clocks share the same frequency table. This means that
gfx2d0 can change its rate and land on bank0 and gfx2d1 can
change its rate and land on bank1. If the two clocks are "out of
phase" and one clock is using bank0 and the other clock is using
bank1 we'll get into a situation where the frequency table will
reflect settings for one clock configured for bank0 and when we
go to enable the clock on bank1 it will program the incorrect
mn enable bit.

When this occurs the clock will have its correct bank chosen but
the mn counter will be off and the counter mode will not be
bypass. This will cause the bank to never turn on and then the
clock will get stuck.

Duplicate the tables so that both gfx2d cores can be used at the
same time and not conflict.

CRs-Fixed: 333496
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
(cherry picked from commit ff8f57f46a0485a0a19809af7847a16136564298)

Conflicts:

	arch/arm/mach-msm/clock-8960.c

Signed-off-by: Srivalli Oguri <oguri@codeaurora.org>
(cherry picked from commit e0fe23da200cea58a6363b8bd2791136399b64d7)

Change-Id: I2a4d97164a4e1128ac640a5880a8108f9c3aed28
Signed-off-by: Yen-Pin Hsiao <yphsiao@codeaurora.org>