Commit graph

588006 commits

Author SHA1 Message Date
Avaneesh Kumar Dwivedi
7961850500 soc:qcom: Synchronize service notifier task's
Queue the msg receive task in service notifier queue
so that it does not run concurrently with other notifier task. 
This avoid an issue where adsp ssr is stuck due to deadlock 
between msg receive and service arrive task.

Change-Id: I6ef9b765ae74eeb32021c2848ffc06d70df19c1b
Signed-off-by: Avaneesh Kumar Dwivedi <akdwived@codeaurora.org>
2017-04-16 23:29:28 -07:00
Divya Ojha
c57fa14c6a drivers: qcom: ultrasound: check concurrent device open operations
Make opened device count atomic variable to avoid probable race
condition. Race condition leads to memory leak and list corruption.

Change-Id: I4da98f27d36f616bc8fa7b1a848c20cc7eea04e5
Signed-off-by: Divya Ojha <dojha@codeaurora.org>
2017-04-16 23:12:58 -07:00
Jayant Shekhar
47756a03ed msm: mdss: Ensure MDSS GDSC switched off during FB PM suspend
There are some cases where MDSS GSDC is not turned off after FB
PM suspend ever after clock ref count is 0 as runtime suspend
is not triggered. Ensure that MDSS GDCC is toggled in these
cases.

Change-Id: I33389ad736960b619b32a9bec4b2b157eed4d20b
Signed-off-by: Jayant Shekhar <jshekhar@codeaurora.org>
2017-04-17 11:23:02 +05:30
Linux Build Service Account
0293b8a7d0 Merge "qcom: smb-lib: rerun APSD on insertion for micro USB mode" 2017-04-16 21:49:18 -07:00
Prashanth Bhatta
a16fc7b970 cnss_prealloc: Remove WARN_ON
WARN_ON is unnecessary if pre-alloc table doesn't have any free
memory. Remove the WARN_ON as error log is enough to find out
missing entry.

Change-Id: I5a46e1f259e88d1a19f05195f5d7bb0745d072c3
CRs-fixed: 2030272
Signed-off-by: Prashanth Bhatta <bhattap@codeaurora.org>
2017-04-16 20:09:40 -07:00
Yingwei Zhao
b18d9ef97a ARM: dts: msm: Configure pin state for SMB1381 interrupt
GPIO21 is connected to SMB1381 STAT pin for interrupt detection,
configure it to pull up for sensing SMB1381's interrupt.

CRs-Fixed: 2033882
Change-Id: Ib88aac4acb3b1094adb13839cccf1aa27903b9c7
Signed-off-by: Yingwei Zhao <cyizhao@codeaurora.org>
2017-04-16 19:42:43 -07:00
Ashay Jaiswal
dabce32c24 qcom: smb-lib: rerun APSD on insertion for micro USB mode
In case of very slow insertion of SDP/DCP there is a possibility
that D+/D- makes contact while APSD is in progress. This will
result in an incorrect type detection.
Fix this by doing a APSD rerun after charger-type detection is
complete.

CRs-Fixed: 2032590
Change-Id: I0037b90f29dbe65a2cdb2771d5caceff77862f03
Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
2017-04-16 21:30:29 +05:30
Linux Build Service Account
9b3e8a81dc Merge "qcom: smb2: ensure QC adapter is at 5V at shutdown" 2017-04-15 23:11:11 -07:00
Sandeep Panda
e871e6fd4a msm: mdss: make panel status check and dfps update exclusive
Since on some platforms DSI_CMD_OFFSET register has become
double buffered, so dynamic fps update and DSI DMA command
transfer can not happen at the same time. This changes makes
panel status check which in turn does a DSI DMA transfer, and
dfps update mutually exclusive.

Change-Id: If8591c55d31669dbf3f565db041c04bcd6cb616a
Signed-off-by: Sandeep Panda <spanda@codeaurora.org>
2017-04-15 20:11:33 +05:30
Pavankumar Kondeti
706e1daf94 core_ctl: Harden the adjustment_possible() check for unisolation
When the need for CPUs is more than the active CPUs and there are some
isolated CPUs, we wakeup the core_ctl thread to unisolate some CPUs.
The core_ctl task can't unisolate any CPU if all of them are isolated
by other clients. Track the number of isolated CPUs by core_ctl and
wakeup the core_ctl task when adjustment is really possible.

Change-Id: I11ef10860532df25cbde572aabd4b925320db8fe
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
2017-04-15 17:48:48 +05:30
Pavankumar Kondeti
e0f82761c2 core_ctl: Update cluster->active_cpus in eval_need()
The cluster->active_cpus is not updated in eval_need(). The new need
for CPUs is compared against the previous cluster->active_cpus. If
another client isolates a CPU, cluster->active_cpus becomes stale and
we fail to detect the change in need for CPUs.

Change-Id: Ib58b8f0bd03dd2b4a174de2ac54eb0c60c59f9f7
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
2017-04-15 17:48:48 +05:30
Pavankumar Kondeti
d0b971c53d core_ctl: Handle only CPU_ONLINE and CPU_DEAD notifications
We are interested in only CPU_ONLINE and CPU_DEAD notifications. Don't
do anything when other notifications arrive.

Change-Id: Iea2e0e1c93e67ef278ee7c5a9813fbab6cea5c74
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
2017-04-15 17:48:22 +05:30
Sandeep Panda
69561f900e ARM: dts: msm: enable register read based ESD for sdm660
Enable register read based ESD check mechanism for nt35597
truly command mode panel used on sdm660 platform, as per HW
recommendation.

Change-Id: I11f897a24d29f215901c2d95d1c5070716ca6515
Signed-off-by: Sandeep Panda <spanda@codeaurora.org>
2017-04-15 12:38:40 +05:30
Sandeep Panda
2eea8dc19d msm: mdss: avoid fake ack and overflow errors during ESD
In the current implementation DSI driver is masking the
fake ACK and overflow errors that might occur during if
BTA mechanism is used to check ESD. But if register read
mechanism is used to check ESD, then also embedded BTA will
be triggered and fake ACK and overflow errors might be
reported. Mask the same for register based ESD check also.

Change-Id: If1ee0a7cc0171b96a3b7298aa5201372c6eb8139
Signed-off-by: Sandeep Panda <spanda@codeaurora.org>
2017-04-15 12:37:43 +05:30
Linux Build Service Account
af5e331c32 Merge "ANDROID: binder: add hwbinder,vndbinder to BINDER_DEVICES." 2017-04-14 22:59:22 -07:00
Linux Build Service Account
8c5d1ccf42 Merge "android: binder: move global binder state into context struct." 2017-04-14 22:59:21 -07:00
Linux Build Service Account
d7ac7905d9 Merge "power: qpnp-smb2: Specify the min/max charger switching frequency" 2017-04-14 15:19:41 -07:00
Linux Build Service Account
2a46b11757 Merge "soc: qcom: remove debugfs interface from ssr, service locator & notifier" 2017-04-14 15:19:40 -07:00
Linux Build Service Account
1a4b9a766f Merge "defconfig: msm: Enable HWBinder for SDM660" 2017-04-14 15:19:39 -07:00
Linux Build Service Account
043ca1f5fc Merge "ARM: dts: msm: Add usb master clock rate in high speed mode for sdm660" 2017-04-14 15:19:38 -07:00
Linux Build Service Account
6f0447450c Merge "input: misc: hbtp_input: Support for Region of Interest/sensors" 2017-04-14 15:19:37 -07:00
Linux Build Service Account
25127f043c Merge "ARM: dts: msm: Disable U1U2 low power modes for SDM660" 2017-04-14 15:19:35 -07:00
Aravind Venkateswaran
81fc1566e2 msm: mdss: dp: gracefully handle cable disconnect
When the downstream DP device is physically disconnected, ensure
that all pending events are removed and the event thread is parked.
Reset all the software state so that subsequent connection events
are handled correctly.

CRs-Fixed: 2034023
Change-Id: Ie94b1da903b8e78509220e373bec4ff54026885c
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
2017-04-14 12:37:33 -07:00
Harsh Sahu
64e4e29356 msm: mdss: fix race condition during mdp debugfs release
Fix race condition in the release of the mdp debugfs functions
panel_debug_base_release and mdss_debug_base_release by adding
the lock for unpreempted freeing of the buffer so that multiple
concurrent processes cannot affect the release which can possibly
lead to use-after-free operation on the buffer.

Change-Id: I9586081b65ae2eb0e7f6e30c606ee748ae9ef7e8
Signed-off-by: Harsh Sahu <hsahu@codeaurora.org>
2017-04-14 11:28:14 -07:00
Vinayak Menon
8769a23ac3 defconfig: msm: enable page poisoning by default
Enable page poisoning by default on MSM8998
and SDM660.

Change-Id: If0b873888f21fd7e7057df43cf223e3c50372bed
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
2017-04-14 23:43:05 +05:30
Vinayak Menon
6f4a4c2a6c mm: allow page poisoning to be enabled by default.
Add a config option to enable page poisoning by
default. The kernel command line option "page_poison"
can be used to change the behaviour during boot.

Change-Id: Ie70763841191a722b1c6125dfad119a29ed0f605
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
2017-04-14 23:43:05 +05:30
Vinayak Menon
49118fe6a3 mm: enable page poisoning early at boot
On SPARSEMEM systems page poisoning is enabled after buddy is up, because
of the dependency on page extension init.  This causes the pages released
by free_all_bootmem not to be poisoned.  This either delays or misses the
identification of some issues because the pages have to undergo another
cycle of alloc-free-alloc for any corruption to be detected.

Enable page poisoning early by getting rid of the PAGE_EXT_DEBUG_POISON
flag.  Since all the free pages will now be poisoned, the flag need not be
verified before checking the poison during an alloc.

Link: http://lkml.kernel.org/r/1490358246-11001-1-git-send-email-vinmenon@codeaurora.org
Acked-by: Laura Abbott <labbott@redhat.com>
Tested-by: Laura Abbott <labbott@redhat.com>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
[vinmenon@codeaurora.org: resolve trivial merge conflicts.
 Remove the redundant free pages RO feature from the
 page_poison.c file which is the reason for conflicts +
 squash the addendum commit 40961ef8d65f51093bc94de110b97b590b6b9275
 ('mm-enable-page-poisoning-early-at-boot-v2')]
Git-commit: c5b7cd344fd6341e6db79e55c0f1f4d1d9c67a7e
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
Change-Id: I1bb1f99d3a2e1135131911905e0916c837ba9d8a
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
2017-04-14 23:43:05 +05:30
Laura Abbott
2c00b603db mm/page_poisoning.c: allow for zero poisoning
By default, page poisoning uses a poison value (0xaa) on free.  If this
is changed to 0, the page is not only sanitized but zeroing on alloc
with __GFP_ZERO can be skipped as well.  The tradeoff is that detecting
corruption from the poisoning is harder to detect.  This feature also
cannot be used with hibernation since pages are not guaranteed to be
zeroed after hibernation.

Credit to Grsecurity/PaX team for inspiring this work

Change-Id: If7116e6bff246abbafc38bdfeb3601d3ea063ad2
Signed-off-by: Laura Abbott <labbott@fedoraproject.org>
Acked-by: Rafael J. Wysocki <rjw@rjwysocki.net>
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Mathias Krause <minipli@googlemail.com>
Cc: Dave Hansen <dave.hansen@intel.com>
Cc: Jianyu Zhan <nasa4836@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Git-commit: 1414c7f4f7d72d138fff35f00151d15749b5beda
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
2017-04-14 23:43:04 +05:30
Laura Abbott
5c69adad61 mm/page_poison.c: enable PAGE_POISONING as a separate option
Page poisoning is currently set up as a feature if architectures don't
have architecture debug page_alloc to allow unmapping of pages.  It has
uses apart from that though.  Clearing of the pages on free provides an
increase in security as it helps to limit the risk of information leaks.
Allow page poisoning to be enabled as a separate option independent of
kernel_map pages since the two features do separate work.  Because of
how hiberanation is implemented, the checks on alloc cannot occur if
hibernation is enabled.  The runtime alloc checks can also be enabled
with an option when !HIBERNATION.

Credit to Grsecurity/PaX team for inspiring this work

Change-Id: I77a36f844ddae54695089c98a97bf0a6e226a025
Signed-off-by: Laura Abbott <labbott@fedoraproject.org>
Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Mathias Krause <minipli@googlemail.com>
Cc: Dave Hansen <dave.hansen@intel.com>
Cc: Jianyu Zhan <nasa4836@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Git-commit: 8823b1dbc05fab1a8bec275eeae4709257c2661d
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
2017-04-14 23:43:04 +05:30
Patrick Fay
c079e157fd Perf: arm64: disable irq for hotplug offline
Currently the hotplug notifier calls cpu_pmu_enable_percpu_irq
when a CPU comes online. The notifier doesn't have a corresponding
call to cpu_pmu_disable_percpu_irq when the CPU goes offline.
Change the code to follow what was done in 3.18 including
tracking whether the PMU is active and the IRQ number in use.

Change-Id: I1835fb543eb483713a30eb6c0ccd4e4a4b9908be
Signed-off-by: Patrick Fay <pfay@codeaurora.org>
2017-04-14 10:24:02 -07:00
Linux Build Service Account
4e6f40f24c Merge "ASoC: wcd9335: Initialize variables before use" 2017-04-14 07:30:09 -07:00
Linux Build Service Account
396203de3f Merge "ASoC: wcd_cpe_core: Initialize variables before use" 2017-04-14 07:30:08 -07:00
Linux Build Service Account
8ab454448f Merge "ASoC: msm: qdsp6v2: Initialize variables before use" 2017-04-14 07:30:06 -07:00
Linux Build Service Account
6e1631fbaa Merge "ASoC: wcd-spi: Initialize variables before use" 2017-04-14 07:30:05 -07:00
Linux Build Service Account
21f62e1d1e Merge "Revert "ASoC: msm: decrement slim channel ref to set the property"" 2017-04-14 07:30:04 -07:00
Linux Build Service Account
ff13dc2a6c Merge "ASoC: wcd934x: use analog mics in micbias mode for MAD" 2017-04-14 07:30:02 -07:00
Linux Build Service Account
9a97d47340 Merge "drivers: mfd: wcd934x: Set CDC_TOP_TOP_CFG1 register as non-volatile" 2017-04-14 07:30:01 -07:00
Linux Build Service Account
891c4ddf05 Merge "ASoC: msm: Update proper clock frequency for slave mode" 2017-04-14 07:30:00 -07:00
Linux Build Service Account
dc013b9093 Merge "ASoC: msm: Update proper clock frequency for slave mode" 2017-04-14 07:29:59 -07:00
Linux Build Service Account
15bc4d7721 Merge "diag: Update the read buffers status properly" 2017-04-14 07:29:58 -07:00
Linux Build Service Account
9584dd9b54 Merge "msm: ADSPRPC: Use SMD on targets that doesn't support GLINK" 2017-04-14 07:29:57 -07:00
Linux Build Service Account
b35f50a370 Merge "usb: gadget: ccid: Fix data types of header structures" 2017-04-14 07:29:56 -07:00
Linux Build Service Account
83a539d288 Merge "defconfig: msmcortex_mediabox: Disable CONFIG_ICNSS_DEBUG" 2017-04-14 07:29:55 -07:00
Linux Build Service Account
14d7d63b27 Merge "msm: isp: Fix dead lock in ISR" 2017-04-14 07:29:54 -07:00
Linux Build Service Account
92421c8558 Merge "drivers: cpuidle: lpm-levels: Log hotplug events" 2017-04-14 07:29:53 -07:00
Linux Build Service Account
4a17c9bb0a Merge "msm: camera: Bypass redundant creation of video node in stereo" 2017-04-14 07:29:03 -07:00
Linux Build Service Account
be634a49f4 Merge "msm: camera: ispif: adds 3D support" 2017-04-14 07:29:01 -07:00
Linux Build Service Account
ed74c93ee8 Merge "ARM: dts: msm: Fix interrupt-map property for msm8996" 2017-04-14 07:29:00 -07:00
Linux Build Service Account
7e6011e45d Merge "msm: mdss: add mdss smmu fault handler for sdm660" 2017-04-14 07:28:59 -07:00
Linux Build Service Account
65b6b46b80 Merge "msm: mdss: dp: skip transfer unit setup on link training requests" 2017-04-14 07:28:58 -07:00