qseecom: Fix issue with incomplete command exiting prematurely

A process waiting on a signal can be awaken by any signal. We
need to only continue processing when the condition of the
wait event is met.

Change-Id: Ib2102babbb505876f89b04399729e6ff5a475605
Signed-off-by: Mona Hossain <mhossain@codeaurora.org>
Signed-off-by: Praveen Chavan <pchavan@codeaurora.org>
msm: msm_fb: Do not use ION_IOMMU_UNMAP_DELAYED flag.

Since iommu buffers will be unmapped after two newer commits
had passed, there is no need to request iommu driver to further
delay unmapping an iommu buffer.

Change-Id: I8f32ece3f4cfb69bcde52cca678c08c5f033107c
Signed-off-by: Vishnuvardhan Prodduturi <vproddut@codeaurora.org>
msm_fb: display: Add null check for base layer

Add null check for base layer in mdp4_overlay_borderfill_stage_up
to avoid NULL pointer dereference, and kernel panic.

Change-Id: Icc6db4807274bd44aafdabc3d8b8dae70587d8d0
Signed-off-by: Neti Ravi Kumar <ravineti@codeaurora.org>
Signed-off-by: Vishnuvardhan Prodduturi <vproddut@codeaurora.org>
arm: Add ARCH_RANDOM Kconfig

Some boards may support architecture generated random numbers. Add
the appropriate Kconfig.

Change-Id: I0077a982c9bb6d3a35435cc27fe40b7e0596ca84
CRs-Fixed: 498392
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
msm: implement ARCH_RANDOM

Currently, the software random number generator is not intialized
until relatively late in the boot process. Software that relies on
random numbers early will not be reliable. Entropy sources are
available early but not early enough for some use cases which means
that moving the software random number generation earlier is not an
option. As an alternate solution, implement the functions associated
with CONFIG_ARCH_RANDOM. These functions currently make a call into
trustzone to get reliable random numbers. The functions are disabled
once the regular random number generator is sufficiently reliable.

Change-Id: If40cfcb96b091fa26a28047c10a902287b26f6c1
CRs-Fixed: 498392
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
seq_file: Allocate memory using vmalloc when kmalloc failed

When dumpstate access /proc/xxx/binder, this binder include lots of info,
it will use seq_read in kernel, in this function, it will trigger
high order memory alloc, when read binder info or other large file,
this will cause memory presure when system don't have contious high order
memory, it will lead to high kswap workload to reclaim the page. so change
kmalloc to vmalloc, it can avoid contiously high order memory allocating.

CRs-fixed: 514982

Change-Id: I463d5f72c24b7bb298e14b0da49c5fc96091ecc1
Patch-mainline: linux-arm-kernel(lkml) @ Thu, 31 Jan 2013 14:11:32 +0800
Link : https://lkml.org/lkml/2013/1/31/20
Signed-off-by: Srinivasarao P <spathi@codeaurora.org>
sock_diag: Fix out-of-bounds access to sock_diag_handlers[]

Userland can send a netlink message requesting SOCK_DIAG_BY_FAMILY
with a family greater or equal then AF_MAX -- the array size of
sock_diag_handlers[]. The current code does not test for this
condition therefore is vulnerable to an out-of-bound access opening
doors for a privilege escalation.

CRs-fixed: 519050
Change-Id: I1466c4f56f3f4df90cf8a1ae17afa80c89b813e8
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Git-commit: 6e601a53566d84e1ffd25e7b6fe0b6894ffd79c0
Signed-off-by: Mathias Krause <minipli@googlemail.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sarang Joshi <spjoshi@codeaurora.org>
mm: Don't use CMA page for file cache

Despite the best efforts of redirection, the file system may still
allocate CMA pages with references held for long periods of time.
If a CMA page ends up being allocated, free it and get a non-CMA page.

Change-Id: I2001151a2936a6d0780d223dda85a87c04ddb8c6
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
ASoC:msm: Increase Proxy buffering

-Proxy buffering can overflow if BT
playback setup takes a lot of time
-Fix this by increasing the proxy
buffer size so that we will end
up buffering the additional data that
can come in during this time

Change-Id: I736937ad03684a3b9aff586b8f676ec60259a442
Signed-off-by: Alexy Joseph <alexyj@codeaurora.org>
Revert "msm: Make CONFIG_STRICT_MEMORY_RWX even stricter"

This reverts commit a9c567fb0f057b09aa8eef9d01a5182c606ffb0b

Change-Id: I68ec00bb5b24466ef591d1d4ef150d2bf96a816d
cpufreq: interactive: Sync with latest from Google

Change-Id: Iaf8e3272ed20ab49f2ccb2dbe90ee5ea36f6decc
Kconfig: Enable config to allow vmalloc savings

Enable the config to reclaim the vmalloc space in lowmem
and disable the map around the hole config, as both the
configs cannot be enabled together.

Change-Id: I5689d871e6b657f6de45ee22fed33cc77e508db9
Signed-off-by: Neeti Desai <neetid@codeaurora.org>
cpufreq: interactive: fix show_target_loads and show_above_hispeed_delay

Remove a trailing whitespace from target_loads and above_hispeed_delay. Problem
happens when user-space program tried to restore parameters that saved before
changing parameters. In this case was returned error(EINVAL).

Change-Id: I5a74e3824602cd6f2b74651adda5ec1b627e61e9
Signed-off-by: Minsung Kim <ms925.kim@samsung.com>
ARM: 7743/1: compressed/head.S: work around new binutils warning

commit da94a829305f1c217cfdf6771cb1faca0917e3b9 upstream.

In August 2012, Matthew Gretton-Dann checked a change into binutils
labelled "Error on obsolete & warn on deprecated registers", apparently as
part of ARMv8 support. Apparently, this was supposed to emit the message
"Warning: This coprocessor register access is deprecated in ARMv8" when
using certain mcr/mrc instructions and building for ARMv8. Unfortunately,
the message that is actually emitted appears to be '(null)', which is
less helpful in comparison.

Even more unfortunately, this is biting us on every single kernel
build with a new gas, because arch/arm/boot/compressed/head.S and some
other files in that directory are built with -march=all since kernel
commit 80cec14a8 "[ARM] Add -march=all to assembly file build in
arch/arm/boot/compressed" back in v2.6.28.

This patch reverts Russell's nice solution and instead marks the head.S
file to be built for armv7-a, which fortunately lets us build all
instructions in that file without warnings even on the broken binutils.

Without this patch, building anything results in:

arch/arm/boot/compressed/head.S: Assembler messages:
arch/arm/boot/compressed/head.S:565: Warning: (null)
arch/arm/boot/compressed/head.S:676: Warning: (null)
arch/arm/boot/compressed/head.S:698: Warning: (null)
arch/arm/boot/compressed/head.S:722: Warning: (null)
arch/arm/boot/compressed/head.S:726: Warning: (null)
arch/arm/boot/compressed/head.S:957: Warning: (null)
arch/arm/boot/compressed/head.S:996: Warning: (null)
arch/arm/boot/compressed/head.S:997: Warning: (null)
arch/arm/boot/compressed/head.S:1027: Warning: (null)
arch/arm/boot/compressed/head.S:1035: Warning: (null)
arch/arm/boot/compressed/head.S:1046: Warning: (null)
arch/arm/boot/compressed/head.S:1060: Warning: (null)
arch/arm/boot/compressed/head.S:1092: Warning: (null)
arch/arm/boot/compressed/head.S:1094: Warning: (null)
arch/arm/boot/compressed/head.S:1095: Warning: (null)
arch/arm/boot/compressed/head.S:1102: Warning: (null)
arch/arm/boot/compressed/head.S:1134: Warning: (null)

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: stable@vger.kernel.org
Cc: Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
[ccross: cherry-picked to 3.4]
Change-Id: If1c4c1a9f3f721a45d9833f2a36f1b7ce58c5e9a
Signed-off-by: Colin Cross <ccross@android.com>
mako: remove obsolete DMM code and config options

Change-Id: I94863d008d17df5b2fc6531c8b52fdaa663d0f87
Revert "msm: camera: Fix copyright"

This reverts commit 7dd2a48252cec55f04a5fb527883e7752a443915.
Revert "msm: camera: Fix AF for ISP32."

This reverts commit 986586383e1477742fc45200a6ff1349fb56a27f.
Revert "mako: Add actuator info in sensor info"

This reverts commit c943f419ca8fbbcb210f3dc1fd3694bf9641a514.

Change-Id: Ic0771981c0398f33461c6cd077bfd4962abaa426
Revert "msm: camera2: imx119 driver"

This reverts commit 0c9c17f7a97ad71f158ece4c0f869f2479ee78f9.

Change-Id: I051011e24045302b963c7ed7c018e0da93463190
Revert "msm: mako: board specific changes for camera 2.0 SW"

This reverts commit d2750bfe29b8b7453583e44d2c8878ee48db5b43.

Change-Id: I4e5a6d6a719a647af2e9fa9b5d7da795f01f778d