msm: hotplug: Underp input checks

Kids, don't drink and drive.
msm: smd: Use irq_set_affinity() API instead of the callback in irqchip.

When affinity is set by directly accessing the function pointer via
irqchip, the irq doesn't get migrated during hotplug and could result in
spurious wakeup of offlined cores. Switch to using irq_set_affinity
which ensures that the irq gets migrated during hotplug.

Change-Id: If700323f636d4ee4978b5e168077514e4d142cb9
Signed-off-by: Mahesh Sivasubramanian <msivasub@codeaurora.org>
(cherry picked from commit 00e4ba3a54e92cbb8f8353b8db38dd681332d2fe)
msm: vidc: Initialize kernel space stack variables

This change initializes kernel space stack variables
that are passed between kernel space and user space
using ioctls.
Non initialization of these variables may lead to
leakage of memory values from the kernel stack to
user space.

PS2-3: Correct authorship and date.

Change-Id: I5b45f3a7baf9c538fee2ec356cd8545f8b042b5e
CRs-fixed: 556771,563420
Signed-off-by: Deepak Verma <dverma@codeaurora.org>
diag: dci: Safeguard to prevent Integer Underflow and Memory Leak

At certain point in diag driver there can be integer underflow
thus can lead to memory leak. Added a safeguard for that.

Change-Id: I2a0304f5b9888fe12ca9ef5fbaa9a68ee4ab9c15
Crs-fixed: 556860
Signed-off-by: Katish Paran <kparan@codeaurora.org>
ARM: dts: msm: Add L2 perf monitor interrupts to bypass list

Corrected L2 perf monitor interrupt name to APCC_qgicL2PerfMonIrptReq in the list.

The L2 perf monitor interrupts can only come when the CPU subsystem is active
and powered on. So, put it in the bypass list so that XO shutdown is not
blocked to allow processing this interrupt when the CPU subsystem is power
collapsed.

Change-Id: I1ae4dc9e800ac2d7188d45ef7634530d93049340
Signed-off-by: Saravana Kannan <skannan@codeaurora.org>
Signed-off-by: Girish Ghongdemath <girishsg@codeaurora.org>
ARM: dts: msm: Add default prefetching size for secure playback

Prefetching for heaps designated for secure playback provides a
good performance boost. Add the optimized default prefetching
size for clients to use.

Change-Id: If8f5ecda5058d1142b1c4dfcdb5bbf7947f4e62c
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
jbd2: Fix use after free after error in jbd2_journal_dirty_metadata()

When jbd2_journal_dirty_metadata() returns error,
__ext4_handle_dirty_metadata() stops the handle. However callers of this
function do not count with that fact and still happily used now freed
handle. This use after free can result in various issues but very likely
we oops soon.

The motivation of adding __ext4_journal_stop() into
__ext4_handle_dirty_metadata() in commit 9ea7a0df seems to be only to
improve error reporting. So replace __ext4_journal_stop() with
ext4_journal_abort_handle() which was there before that commit and add
WARN_ON_ONCE() to dump stack to provide useful information.

Change-Id: Ibfd59e399f4a11abc378a237e10b3741bef2a15e
Reported-by: Sage Weil <sage@inktank.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Cc: stable@vger.kernel.org	# 3.2+
Git-commit: 91aa11fae1cf8c2fd67be0609692ea9741cdcc43
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Osvaldo Banuelos <osvaldob@codeaurora.org>
mmc: core: fix issue with HPI polling timeout

Out of CPU time for the MMC context included into measured timeout. System
under heavy load will easily exceed out_of_int_time (typically 20 ms),
because  the MMC context is not running and when it is back to running,
timeout already elapsed. In this case real card status checked again and
error reported for wrong card state only.

Change-Id: I0da3bd2e7d41e4933ad3b1333d7135705a1eafec
Signed-off-by: Konstantin Dorfman <kdorfman@codeaurora.org>
Signed-off-by: Sujit Reddy Thumma <sthumma@codeaurora.org>
msm: msm-pm: Remove outer cache functions

Remove outer cache functions to do cache maintenance
operations because all the newer targets having the
integrated cache controller and cache operations are
done by standard cache maintenance functions.

[myfluxi: Adapt to 8974/hammerhead]

Change-Id: Iaeaf5bc85ea629b89efabb1d3ea8cc9aa97f9790
Signed-off-by: Murali Nalajala <mnalajal@codeaurora.org>
msm: pm: Remove redundant cpu_init API

cpu_init() API setup the per-CPU stacks after cores
comes out of the low power modes. This API is not
needed after the PM driver start using the standard
ARM suspend/resume framework.

Change-Id: Ic384165e4fbc289c8338c66ebac1bb0d2bfadf8b
Signed-off-by: Murali Nalajala <mnalajal@codeaurora.org>