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: Icaed922d80e271670fb0571852833d452771376c
CRs-Fixed: 530719
Signed-off-by: Sarang Joshi <spjoshi@codeaurora.org>
msm: vidc: add sleep of 100us before clock disable

ARM9 execute following sequence when venus is idle
1. Disable ARM9 watchdog
2. Set bit 30 of A_VENUS_CPU_CS_SCIACMDARG0 register
   to indicate venus is idle
3. Write HFI_MSG_SYS_IDLE to message queue
4. Raise interrupt to host
5. ARM9 execute wait for interrupt instruction to go
   into low power state. This will internally drain the
   ARM9 write buffer which can generate bus transaction.
6. ARM9 in idle

Host clock gate venus based on following sequence
1. Host receive HFI_MSG_SYS_IDLE from the msg queue
2. Host check both cmd / msg queue are empty by
   comparing the queue read/write pointers.
3. Host check bit 30 of A_VENUS_CPU_CS_SCIACMDARG0
   register to confirm it indicate idle
4. Host clock gate whole venus

As the host clock gate venus in step 4, ARM9 is still
in step 5&6. The sleep will ensure that step 5 and 6
are completed before host clock gates venus.

CRs-Fixed: 589417
CRs-Fixed: 595251
Change-Id: Idf1f788718adea2dacceca97afa4ba4fe4562ddd
Signed-off-by: Vikash Garodia <vgarodia@codeaurora.org>
radio: iris: Avoid memory leak and NULL pointer dereferencing

 - Avoid memory leak by freeing allocated memory
 - Do not derefer NULL pointer

CRs-Fixed: 537955
Signed-off-by: Ayaz Ahmad <aahmad@codeaurora.org>
Change-Id: I7624d73e5c25233e9d03c67e4204c611b9a8fff6
radio: iris: Avoid inconsistent free

There is a chance to of memory leak if we exit
from function early. Ensure to use free before
exiting from function.

Change-Id: I17dbecffc5713d95c66ecec0bffb5ed3c8660fe8
CRs-Fixed: 540334
Signed-off-by: Ayaz Ahmad <aahmad@codeaurora.org>
radio: iris: Avoid NULL pointer dereferencing

Before dereferencing a pointer check for NULL
pointer.

CRs-Fixed: 537890
Signed-off-by: Ayaz Ahmad <aahmad@codeaurora.org>
Change-Id: If010b89fd4f5930d944c9e327c51de4b40f33c3c
msm: ipa: add null check and initialize the variable

Add null check to avoid crash and initialize the
variable before using it.

CRs-Fixed: 556930 556936 556939

Change-Id: If6431ae5075dd96bfadce4c002786874aa5b6740
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
msm: ipa: Fix the format string vulnerability.

Fix the format string vulnerability by explicitly
specifiying string argument instead of just using user-specified
string. This will prevent read/write anywhere from the stack.

CRs-Fixed: 561941

Change-Id: Idffa9a04d0f6712205ac7701c7cd7cf4a246cde0
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
Signed-off-by: Gopal G Goberu <ggober@codeaurora.org>
wcnss: Fix Integer overflow

Integer overflow can lead to buffer
overflow in wcnss_wlan_write

Change-Id: I9e6f3439e1c8509bdb9c8c14b9aefe5611de8b03
CRs-Fixed: 547969
Signed-off-by: Arif Hussain <arifhussain@codeaurora.org>
NFC: add gpio clk interrupt for 8610 qrd device

Major rework for platforms where clock reference to qca199x is
sourced via MSM rather than PMIC. When the clock is sourced via the MSM
the CLK_REQ to the MSM does not control a clock enable pin (as in the
case of the PMIC), rather it is a standard MSM GPIO. In this instance, we
have implemented another interrupt handler which fires on both edges of
the CLK_REQ(from the qca199x). The control/mux of the CLK_REF is then
switched in the linked BH process. This has been tested on the 8x10 Hisense
qrd (MSM CLK_REF) and 8x26 MTP (PMIC CLK_REF) platforms. For other
platforms the configuration will be sourced from their respective device
tree files, however, there may still be some further aditional conditions
which need to be added to this driver.

Change-Id: I9aa62b9c2b07e7c6bbad7fdbc8e49e8c1b3babf8
Acked-by: Umesh Jagga <ujagga@qti.qualcomm.com>
Signed-off-by: Houston Hoffman <hhoffman@codeaurora.org>
NFC: Set PLL before attempting to prepare clk src

The msm would crash because the clock was not setup right.

Change-Id: I234fff3743e36ce8b33731e0aeafb3c4e7377b43
Acked-by: Umesh Jagga <ujagga@qti.qualcomm.com>
Signed-off-by: Houston Hoffman <hhoffman@codeaurora.org>
NFC: Introduce a presence check

Introduce a check for the QCA1990 NFC controller hardware.
If I2C communication is unsuccessful we exit start-up sequence early
and ensure HPD is set(incase faulty hardware is present) and clock
is disabled.

Change-Id: Ic20f8cfa0219927eb4b30343b916d414757a3b37
Acked-by: Umesh Jagga <ujagga@qti.qualcomm.com>
Signed-off-by: Houston Hoffman <hhoffman@codeaurora.org>
NFC: Fix for wrong chip version.

Whenever an ioctl call is made to check the nfcc_version we now
wake-up the nfcc. Apparently the revision ID register (metal
revision no.) is updated only when the controller comes out of
sleep. Some recent changes in the DT meant that sometimes
the incorrect chip ID was being returned and so the patch was not
being applied.This is intended to fix this problem and removes
this detail from the caller method in the DT.

Change-Id: If2ed0e38a9d0803fa03e1b2110b9c0d090b74c0d
Acked-by: Umesh Jagga <ujagga@qti.qualcomm.com>
Signed-off-by: Houston Hoffman <hhoffman@codeaurora.org>
Merge "Merge "msm: buspm: Correct size type in buspm_xfer_req""
Merge "NFC: add gpio clk interrupt for 8610 qrd device"
Merge "NFC: Set PLL before attempting to prepare clk src"
Merge "NFC: Introduce a presence check"
Merge "msm: ipa: add null check and initialize the variable"
Merge "wcnss: Fix Integer overflow"
Merge "Merge "Merge "msm: buspm: Correct size type in buspm_xfer_req"""
Merge "NFC: Fix for wrong chip version."