defconfig: remove support for /dev/mem and /dev/kmem on perf builds

Keeping /dev/mem and /dev/kmem exposed to userspace allows userspace
to peek/poke to these areas and is a security risk. Remove support for
/dev/mem and /dev/kmem on perf builds.

Change-Id: Iad85b34039a67c5f8796adfd16543a94a1bc3054
CRs-Fixed: 530719
Signed-off-by: Sarang Joshi <spjoshi@codeaurora.org>
driver core: fix possible missing of device probe

Inside bus_add_driver(), one device might be added(device_add()) into
the bus or probed which is triggered by deferred probe
just after completing of driver_attach() and before
'klist_add_tail(&priv->knode_bus, &bus->p->klist_drivers)',
so the device won't be probed by this driver.

This patch moves the below line

	'klist_add_tail(&priv->knode_bus, &bus->p->klist_drivers)'

before driver_attach() inside bus_add_driver() to fix the
problem.

CRs-Fixed: 588802
Change-Id: I9250b399d57a89870d1df220b97fdca275e2e1a9
Signed-off-by: Ming Lei <ming.lei@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Git-commit: 190888ac01d059e38ffe77a2291d44cafa9016fb
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Sagar Dharia <sdharia@codeaurora.org>
Signed-off-by: Swetha Chikkaboraiah <schikk@codeaurora.org>
mach-msm:bus_config:fix possible missing error check

There is a possibility of msm_bus_board_get_iid returning the error.
ERROR check is required before proceeding with the msm_bus_get_fabric_device

CRs-Fixed: 588802
Change-Id: I1353ed1b2505b117b61b72600e74b5d68d0bc508
Signed-off-by: Swetha Chikkaboraiah <schikk@codeaurora.org>
msm: bam_dmux: modify DL low memory algorithm

Bam_dmux maintains a pool of dynamically allocated buffers for the BAM DMA
engine to use as destination memory for Downlink (DL) data.  The allocation
requests for the buffers are done using flags to indicate delays are
tolerable and either the memory or an error should be returned immediately
to bam_dmux as the buffers are normally allocated within various hot paths
inside of the driver.  If a low memory allocation failure is encountered
when attempting to replenish the pool of buffers, bam_dmux will either
attempt the memory allocations later when the next scheduled pool refilling
occurs if there is at least one buffer remaining in the pool, or will
schedule a delayed task to retry the buffer allocation until atleast one
buffer can be put into the pool.

This mechanism of handling low memory situations has two flaws.  First, the
allocation type used by bam_dmux does not trigger the standard low memory
recovery mechanism within the memory management subsystem.  Second, the
peripeheral on the otherside do the DMA engine has a limited hardware based
flow control mechanism that will not release flow control with only one
buffer queued to the DMA engine.

To assist in system recovery, and avoid a data stall, create a cold path
that is tolerant of memory allocation delays and is triggered when the hot
path encounters an allocation failure.

CRs-Fixed: 589665
Change-Id: If72b0eaef285ac6dfd99e97bef1cd7df154e3a48
Signed-off-by: Jeffrey Hugo <jhugo@codeaurora.org>
msm: vidc: enable pic_order_cnt_type for H264 encoding

-current implementation will result in poc_type as 0 in SPS
params (even though the poc increment value is 2 in the
encoded stream).
-So changes done to return poc_type as 2 in SPS params

Change-Id: I5a22af422b0e1591a69a0b5b868342667ee60bbf
Signed-off-by: srikarri <sridur@codeaurora.org>
Revert "Execute shader on wakeup from power collapse"

This reverts commit 28eabf6987637c6c438c461aa31ce25e0f7edcc5.

Conflicts:

	drivers/gpu/msm/adreno.c
	drivers/gpu/msm/adreno.h
	drivers/gpu/msm/adreno_a3xx.c
	drivers/gpu/msm/adreno_ringbuffer.c

Change-Id: I0a979f33d9030546d1e72b63cff88d269f63a4c7
Signed-off-by: Hareesh Gundu <hareeshg@codeaurora.org>
msm: kgsl: Fix mem leak when page allocation fails

Page allocation may fail during OOM condition. Update
sglen and size to correct value (allocated) so that
they get freed in kgsl_sharedmem_free().

Change-Id: I1aa0ca77bb767523dfcf0f6cc3a21eac2b6b80e4
Signed-off-by: Hareesh Gundu <hareeshg@codeaurora.org>
arm: if there's no handler we need to restore sigmask, syscall or no syscall

CRs-fixed: 592079
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Git-commit: 7dfae72027cd8345247e675a3b27439df95fe06e
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-stable.git
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
arm: new way of handling ERESTART_RESTARTBLOCK

new "syscall start" flag; handled in syscall_trace() by switching
syscall number to that of syscall_restart(2).  Restarts of that
kind (ERESTART_RESTARTBLOCK) are handled by setting that bit;
syscall number is not modified until the actual call.

CRs-fixed: 592079
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Git-commit: 6b5c8045ecc7e726cdaa2a9d9c8e5008050e1252
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-stable.git
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
wcnss: Add new device interface for user control messages

wcnss userspace service will use this new control interface to configure
certain parameters required by wcnss driver. This interface is required
to configure the serial number (for MAC address auto-generation),
calibrated data availability etc. These parameters were earlier written
thru module parameters from wcnss service, however that required the
wcnss userspace daemon to have the root permission.

Change-Id: I92cc7f2c63eae08b7a467b834116883027361299
CRs-Fixed: 590457
Signed-off-by: Sameer Thalappil <sameert@codeaurora.org>
msm: qdsp6v2: memset stack buffer allocation.

This is needed to avoid garbage data in uninitialized variables.

Change-Id: Id5921e369055d846b990380be6355ad464518a10
CRs-Fixed: 554301
Signed-off-by: Yeleswarapu, Nagaradhesh <nagaradh@codeaurora.org>
Signed-off-by: Mohammad Johny Shaik <mjshai@codeaurora.org>
MDP: correct clock calculation logic for up-scaling scenario

Part of yscale calculation logic in mdp4_calc_req_mdp_clk
function is only applicable for downscale scenarios. The
incorrect clock calculation was unnecessarily creating
blt mode requirement even for upscale scenarios.

Change-Id: I036be2ceb2f59fb159885b2d15b208706808198b
Signed-off-by: Nirmal Abraham <nabrah@codeaurora.org>
Flash LED tps61310: use alloc_workqueue() instead of create_workqueue()

MSM8930 uses tps61310 in which work_queue was getting created
each time flash is turned ON. So using alloc_workqueue().

CRs-Fixed: 597864
Change-Id: I6e487cf4d17e66c22aed588f3ba55d32e41b21a2
Signed-off-by: Vijaya Kumar T M <vtmuni@codeaurora.org>
Merge "Merge "msm: bam_dmux: Fix race condition during SSR""
Merge "arm: if there's no handler we need to restore sigmask, syscall or no syscall"
Merge "arm: new way of handling ERESTART_RESTARTBLOCK"
radio: iris: Fixed an issue with search stations list.

RDS search, search station list were getting excluded
while checking bounds for allowed search types. Fixed
check to include them.

CRs-fixed: 597996
Change-Id: Ia2d7cc8a1bbf8e861a0e23dfc8ca56181b42b810
Signed-off-by: Satish Kodishala <skodisha@codeaurora.org>
Merge "Revert "Execute shader on wakeup from power collapse""
msm: bam_dmux: Reverts commit causing crash after data enable

Data call is not working and device is crashed when data is enabled.
sps_device_reset() call is failed when calling from disconnect_to_bam().
suspecting accessing to regiter when clocks are off.

Reverting all below commits to unblock and fix the actual issue.

Revert "msm: bam_dmux: Fix race condition during SSR"

This reverts commit e7c0d6229dda3a4949478356b4dd51d872b295ab.

Revert "msm: bam_dmux: add loopback support"

This reverts commit 89c96baacf357a9a9e419c0f0dbc4550d2b96d8f.

Revert "msm: bam_dmux: tune downlink polling parameters"

This reverts commit 308c38653b2677e9a6f0cc98084691d7774a70ca.

Revert "msm: bam_dmux: add downlink processing state logging"

This reverts commit 7c1856091b020ee4c2523cefc1ecd472dfc054fe.

Revert "msm: bam_dmux: prevent duplicate subsystem restart"

This reverts commit 7614a7fd15d8c3c8a5f73b3946c7f55422387450.

Revert "msm: bam_dmux: Update UL wakeup timeout to two seconds"

This reverts commit 1f31739b09b2a1546797e7b0d2409eb53a3305c0.

Revert "msm: bam_dmux: delay shutdown until DL polling is complete"

This reverts commit 096f7d336f88c814a3decfaf286632c1e3dad0fb.

Revert "msm: bam_dmux: increase shutdown logging granularity"

This reverts commit f7ae7a6010230835e609c67ad35a304415c617bd.

Revert "msm: bam_dmux: reduce notify_all() logging"

This reverts commit ac8152a4753fc5d01a1cb4ce90272b85f174887e.

Revert "msm: bam_dmux: correct sps_transfer_one() flag usage"

This reverts commit c85df96a0224fd1f891d6b00c949b882d8231879.

Revert "msm: bam_dmux: Use IPC Logging for string formatting"

This reverts commit f800bbaf86b6a2a8f9ab02ccd4089494fd000646.

Revert "msm: bam_dmux: wait for DL thread to shutdown in case of SSR"

This reverts commit 199294b2164e62a40dcf6853ede77215d619be31.

Revert "msm: bam_dmux: reset bam hardware when A2 goes into pc"

This reverts commit a82a95c209207c4f7721971785863e90603b93f2.

Change-Id: Idc66812ff48413794bc70920318ca535e62eeba8
Signed-off-by: Arun Kumar Neelakantam <aneela@codeaurora.org>
Merge "Merge "Merge "msm: bam_dmux: Fix race condition during SSR"""