ARM: 7735/2: Preserve the user r/w register TPIDRURW on context switch and fork

Since commit 6a1c53124aa1 the user writeable TLS register was zeroed to
prevent it from being used as a covert channel between two tasks.

There are more and more applications coming to Windows RT,
Wine could support them, but mostly they expect to have
the thread environment block (TEB) in TPIDRURW.

This patch preserves that register per thread instead of clearing it.
Unlike the TPIDRURO, which is already switched, the TPIDRURW
can be updated from userspace so needs careful treatment in the case that we
modify TPIDRURW and call fork(). To avoid this we must always read
TPIDRURW in copy_thread.

Change-Id: Ib1e25be7b9faa846ba5335aad2574e21a1246066
Signed-off-by: André Hentschel <nerv@dawncrow.de>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Jonathan Austin <jonathan.austin@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Git-commit: a4780adeefd042482f624f5e0d577bf9cdcbb760
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
[joonwoop@codeaurora.org: fixed merge conflict]
CRs-fixed: 561044
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
d2: camera: Finish fixing video enable/disable sequence

Change-Id: Id03a18aec8acafc78d018b09f23b7f924ff5083e
cpufreq: interactive: delete timers for GOV_START

Make sure that timers cpu_timer and cpu_slack_timer
deactivated before addition of new.

Change-Id: If31c4049606871df6f00efdc24b1d713c86a6f69
Signed-off-by: Shridhar Rasal <srasal@nvidia.com>
Signed-off-by: Bharat Nihalani <bnihalani@nvidia.com>
Git-commit: b430123367e78a6557bac3cf1558bcb85193fb12
Git-repo: https://android.googlesource.com/kernel/common/
[mattw@codeaurora.org: resolved trivial context conflict]
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
input: touchscreen: d2_fw: Update firmware

Update the d2 melfas (mms_ts) binary.

From the latest Samsung VZW kernel update.

Signed-off-by: Luis Cruz <ljc2491@gmail.com>
More compiler fixes
CHROMIUM: mm: Fix calculation of dirtyable memory

The system uses global_dirtyable_memory() to calculate
number of dirtyable pages/pages that can be allocated
to the page cache.  A bug causes an underflow thus making
the page count look like a big unsigned number.  This in turn
confuses the dirty writeback throttling to aggressively write
back pages as they become dirty (usually 1 page at a time).

Fix is to ensure there is no underflow while doing the math.

Signed-off-by: Sonny Rao <sonnyrao@chromium.org>
Signed-off-by: Puneet Kumar <puneetster@chromium.org>

BUG=chrome-os-partner:16011
TEST=Manual; boot kernel, powerwash, login with testaccount and
make sure no jank occurs on sync of applications

Change-Id: I614e7c3156e014f0f28a4ef9bdd8cb8a2cd07b2a
Reviewed-on: https://gerrit.chromium.org/gerrit/37612
Reviewed-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Olof Johansson <olofj@chromium.org>
Commit-Ready: Puneet Kumar <puneetster@chromium.org>
Reviewed-by: Puneet Kumar <puneetster@chromium.org>
Tested-by: Puneet Kumar <puneetster@chromium.org>
 (CR) msm_fb: display: reduce turn-on display time.

    When turning on panel, increase its priority and restore it
    after panel has been turned on to reduce Turn-on display
    time when press power key.

    cherry pick commit:c43ca6a4 from main-jb-qc branch.

Change-Id: Ie0e8e55fc7498a6b2d43ad9e1995fa96c609c81e
Reviewed-on: http://gerrit.pcs.mot.com/500101
Tested-by: Jira Key <JIRAKEY@motorola.com>
Reviewed-by: Bang Nguyen <BNGUYEN1@motorola.com>
Reviewed-by: Jason Hrycay <jason.hrycay@motorola.com>

Conflicts:

	drivers/video/msm/mipi_dsi.c

Signed-off-by: Luis Cruz <ljc2491@gmail.com>
input: mms_ts: Increase touchscreen sensitivity

With the updated d2 firmware, the previous sensitivity was
just too much. Since 0xlab used the value of 0xFFFF on their
development board, let's keep the pattern and use the value
of 0x0FFF [0xFFF]

Signed-off-by: Luis Cruz <ljc2491@gmail.com>

Conflicts:
	drivers/input/touchscreen/mms_ts_144.c

Conflicts:
	drivers/input/touchscreen/mms_ts_144.c
Allow d2dcm access to charging data table

Change-Id: I67d599724868d9eeb710dc5d8750ecc5f1fbda49
Merge branch 'cm-11.0' of https://github.com/CyanogenMod/android_kernel_samsung_d2 into personal