t-base-202: Enable crytpo clocks for MSM8x26 platforms.

Change-Id: I8bb32144a44501f751d212f78fd790064b10e994
Signed-off-by: Oana Medvesan <medvesan.oana@gmail.com>
Signed-off-by: Hariprasad Dhalinarasimha <hnamgund@codeaurora.org>
Acked-by: Tony Hamilton <tonyh@qti.qualcomm.com>
defconfig: 8226: enable free page read only

Recently we have seen several reports of memory
corruption on 8926 baselines. This config marks
any freed page as read only enabling us to detect
use after free.

This is a hot fix which is planned to be reverted at
a later point of time.

CRs-Fixed: 675914
Change-Id: I6a492d9581f392a729cdc6c51b1bece70a8ec4b6
Signed-off-by: Vignesh Radhakrishnan <vigneshr@codeaurora.org>
sched: fix race between try_to_wake_up() and move_task()

Until a task's state has been seen as interruptible/uninterruptible
and it is no longer on_cpu, it is possible that the task may move
to another CPU (load balancing may cause this). Here is an example
where the race condition results in incorrect operation:

- cpu 0 calls put_prev_task on task A, task A's state is TASK_RUNNING
- cpu 0 runs task B, which attempts to wake up A
- cpu 0 begins try_to_wake_up(), recording src_cpu for task A as cpu 0
- cpu 1 then pulls task A (perhaps due to idle balance)
- cpu 1 runs task A, which then sleeps, becoming INTERRUPTIBLE
- cpu 0 continues in try_to_wake_up(), thinking task A's previous
  cpu is 0, where it is actually 1
- if select_task_rq returns cpu 0, task A will be woken up on cpu 0
  without properly updating its cpu to 0 in set_task_cpu()

CRs-Fixed: 665958
Change-Id: Icee004cb320bd8edfc772d9f74e670a9d4978a99
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
target/rd: Refactor rd_build_device_space + rd_release_device_space

This patch refactors rd_build_device_space() + rd_release_device_space()
into rd_allocate_sgl_table() + rd_release_device_space() so that they
may be used seperatly for setup + release of protection information
scatterlists.

Also add explicit memset of pages within rd_allocate_sgl_table() based
upon passed 'init_payload' value.

v2 changes:
  - Drop unused sg_table from rd_release_device_space (Wei)

Change-Id: I0d42113c0e2d703fe7567a804003b034fd4fa0b7
Cc: Martin K. Petersen <martin.petersen@oracle.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Hannes Reinecke <hare@suse.de>
Cc: Sagi Grimberg <sagig@mellanox.com>
Cc: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Git-commit:4442dc8a92b8f9ad8ee9e7f8438f4c04c03a22dc
Git-repo:https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git
[ggober@codeaurora.org:resolve trivial merge conflicts in target_core_rd.c]
Signed-off-by: Gopal G Goberu <ggober@codeaurora.org>
Merge "sched: fix race between try_to_wake_up() and move_task()"
Merge "target/rd: Refactor rd_build_device_space + rd_release_device_space"
msm: kgsl: Fix memory entry leak when calling adreno_convertaddr

When adreno_convertaddr is called the memory searched in this function
may have a memory entry associated with it if this allocation belongs
to user space. A reference to this memory entry is taken when
this function is called which should be returned when the caller is
done using the memory. Made changes to return a reference to the
entry when calling this function which is returned when caller is
done using the memory.

Change-Id: I610553fd4b119d3c47cbfcec970d50046dbb2863
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
Signed-off-by: Lynus Vaz <lvaz@codeaurora.org>
msm: kgsl: Keep track of kernel space mappings to memory

Add a counter to count number of times a memory descriptor is
mapped in the kernel and unmap the kernel mapping only when the
count reaches 0. There can be multiple threads using the kernel
mapping at the same time hence a counter is used to make sure
that we do not unmap the mapping before the last thread has
finished using it.

Change-Id: I9c53deb6af12fb1f6ed30e46b386e1cd60dafdda
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
Signed-off-by: Lynus Vaz <lvaz@codeaurora.org>
Merge "msm: kgsl: Fix memory entry leak when calling adreno_convertaddr"
Merge "msm: kgsl: Keep track of kernel space mappings to memory"
Merge "defconfig: 8226: enable free page read only"
Merge 708057bca31b51e921db36a97703447cab911144 on remote branch

Change-Id: I21c40d459d71fa28b0bb9d23bf6444e129de5da8
Merge "t-base-202: Enable crytpo clocks for MSM8x26 platforms."
Merge 6f0ea29216bcf6cfc877f936672d9fc4993d1c77 on remote branch

Change-Id: I7614fbd205642ab214a45bb0a557d1c3a211b3a3
Merge "Merge 6f0ea29216bcf6cfc877f936672d9fc4993d1c77 on remote branch"
ASoC: msm: Fix ADM GET PARAM callback

Add size check on inband get param call and do
not process inband if RTAC is active.

Change-Id: I2c099f5ea254a214f224dda556773a7fe6754fe5
CRs-fixed: 548397
Signed-off-by: Ben Romberger <bromberg@codeaurora.org>
Merge "ASoC: msm: Fix ADM GET PARAM callback"