msm: qdsp6v2: memset stack buffer allocation.

This is needed to avoid garbage data in uninitialized variables.

Change-Id: Ia8e6148eef2cafe6931c6fdc35d7aafeb0c0bd97
CRs-Fixed: 556792
Signed-off-by: Asish Bhattacharya <asishb@codeaurora.org>
(cherry picked from commit 5699ad4945f1060b62b90680f4037f201cabd2d9)
Destination PS no: 2
ARM: fix executability of CMA mappings

The CMA region was being marked executable:

0xdc04e000-0xdc050000           8K     RW x      MEM/CACHED/WBRA
0xdc060000-0xdc100000         640K     RW x      MEM/CACHED/WBRA
0xdc4f5000-0xdc500000          44K     RW x      MEM/CACHED/WBRA
0xdcce9000-0xe0000000       52316K     RW x      MEM/CACHED/WBRA

This is mainly due to the badly worded MT_MEMORY_DMA_READY symbol, but
there are also a few other places in dma-mapping which should be
corrected to use the right constant.  Fix all these places:

0xdc04e000-0xdc050000           8K     RW NX     MEM/CACHED/WBRA
0xdc060000-0xdc100000         640K     RW NX     MEM/CACHED/WBRA
0xdc280000-0xdc300000         512K     RW NX     MEM/CACHED/WBRA
0xdc6fc000-0xe0000000       58384K     RW NX     MEM/CACHED/WBRA

Change-Id: I044360a8f08b1a4ae3e3e9e623fb77af2b427c51
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Git-commit: 71b55663c5d0a6f8473045db1c8b376803780191
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
[lauraa@codeaurora.org: Context fixups due to __dma_remap signature change]
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Merge "ARM: fix executability of CMA mappings"
net: ipc_router: Defer workqueue initialization

IPC Router workqueue is initialized before some of the core IPC router
data structures are initialized leading to uninitialized data structure
access.
Initialize the workqueue after initializing the core data structures.

CRs-Fixed: 611234
Change-Id: Ia6fbd2f517afcde30b2c924507fbb9f28ccc01e3
Signed-off-by: Zaheerulla Meer <zmeer@codeaurora.org>
Merge "net: ipc_router: Defer workqueue initialization"
ASoC: msm: Fix for passing correct data to userspace

The Copy_to_user function copies the whole frame structure
to the userspace. Only len bytes should be copied.
As the whole frame is being copied
(HPCM_MAX_VOC_PKT_SIZE bytes) the uninitialized bytes
in the buffer will be disclosed to the calling
user-space process.

Change-Id: I7d7f58d358aaf56d91a79cfe95c04d937b48da53
Signed-off-by: Vicky Sehrawat <vickys@codeaurora.org>
Merge "msm: qdsp6v2: memset stack buffer allocation."
msm: camera: Fix crash in ispif release.

There is a BUG_ON in ispif release function for
ispif base address. but in case of just open and close
of ispif subdevice leads to ispif base NULL.

BUG_ON is removed and proper error is added in ispif
release function to fix the issue.

Change-Id: I0cc12d52aff9db0d9bb8844473f9bd6547270e27
CRs-Fixed: 642603
Signed-off-by: Suresh Vankadara <svankada@codeaurora.org>
Signed-off-by: Venkata Aravind <venkata@codeaurora.org>
Merge "msm: camera: Fix crash in ispif release."
Merge "ASoC: msm: Fix for passing correct data to userspace"
msm: kgsl: Mark the IOMMU setstate memory as read only

Mark the IOMMU setstate memory as read only in the pagetable.

Change-Id: Ic0dedbadb19e499c749cd744c3e89be3bcb4c2a2
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
msm: kgsl: Setup a3xx protection in its start function

Setup the protection registers for a3xx towards the end of its
start function instead of doing it in generic ringbuffer start

Change-Id: I66df496afa5d1fdf7dea790306f5358c2098674d
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
msm: kgsl: Protect CP_STATE_DEBUG_INDEX

Put CP_STATE_DEBUG_INDEX and CP_STATE_DEBUG_DATA under protection
to keep it from being written from an IB1. Doing so however opens
up a subtle "feature" in the microcode: memory read opcodes turn off
protected mode in the microcode to do the read and then turns it
back on regardless of the initial state. This is a problem if the
memory read happens while protected mode is turned off and then we
try to access a protected register which then complains and goes boom.

To account for this irregularity explicitly turn back off protected
mode in all the places where we know this will be a problem.

Change-Id: Ic0dedbad1397ca9b80132241ac006560a615e042
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Merge "msm: kgsl: Mark the IOMMU setstate memory as read only"
Merge "msm: kgsl: Setup a3xx protection in its start function"
Merge "msm: kgsl: Protect CP_STATE_DEBUG_INDEX"