summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-04-17power: smb-lib: WA to fix legacy cable detectionAbhijeet Dharmapurikar
Currently a legacy cable is always assumed which causes decreased performance from non-legacy HVDCP adapters with 10k ohm Rp. Fix this by disabling and re-enabling Type-C to rerun the legacy cable detection. Moreover, the legacy cable IRQs are not used and cause unnecessary type-c-change IRQs to fire. Disable them. CRs-Fixed: 2020132 Change-Id: I57fc3762251ead028298f01b06d66f52fd119c6b Signed-off-by: Nicholas Troast <ntroast@codeaurora.org> Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2017-04-17power: smb-lib: cache USB Type-C statusAbhijeet Dharmapurikar
Currently the USB Type-C status is retrieved from the hardware in real time. The Type-C change IRQ should trigger on every change of the Type-C status, therefore it is not necessary to read the status registers multiple times if a Type-C change IRQ has not triggered. Furthermore, workarounds which force UFP/DFP mode, or disable Type-C altogether could mislead the software into thinking a removal has happened. Cache all of the USB Type-C status registers upon receiving a USB Type-C change IRQ, and use the cached status where appropriate. CRs-Fixed: 2020132 Change-Id: I99f2ff29633207898ae803672162db0c3cec80dc Signed-off-by: Nicholas Troast <ntroast@codeaurora.org> Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2017-04-17power: qcom: lock USB removalAbhijeet Dharmapurikar
During USB removal a lot of cleanup happens; votables are reset, flags are cleared, etc. After the cleanup is finished there is a chance that USB power supply consumers may set properties before getting the USB removal notification. This can lead to many problems where ICL limits are set based on the previous insertion, or APSD is disabled due to a late setting of PD_ACTIVE. Introduce a lock which prevents USB power supply consumers from setting properties when USB has been removed. This lock will ensure that the next insertion starts with a clean slate. CRs-Fixed: 2020132 Change-Id: I05a4145289b6097e41afc30aa09782722fa03fb6 Signed-off-by: Nicholas Troast <ntroast@codeaurora.org> Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2017-04-17power: smb-lib: cleanup everything upon USB removalNicholas Troast
Currently it is expected upon USB removal that consumers will receive a notification that USB has been removed and will cleanup after themselves. Unfortunately this makes it very difficult to keep track of all of the necessary cleanup steps upon removal. Also, in preparation of not allowing consumers to set properties after a USB removal has happened it is now the responsibility of the charger driver to cleanup on their behalf. Moreover, since we don't have a separate removal/insertion interrupt, the removal/insertion code may run even if the typeC cable is not physically inserted/removed. Fix it by tracking a typec_present flag. CRs-Fixed: 2020132 Change-Id: Ia514abaa4e12f72daec17fd1e95f3c51cc38a15f Signed-off-by: Nicholas Troast <ntroast@codeaurora.org> Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2017-04-17power: smb-lib: start CC2 removal WA when VBUS is lowAbhijeet Dharmapurikar
Currently the CC2 removal workaround starts whenever PD issues a hard reset. When PD issues a hard reset it is not guaranteed that VBUS will fall since the source may not even be PD capable. The CC2 removal workaround should only run during the time that VBUS is low and CC is debounced. Fix this by scheduling the CC2 removal workaround when VBUS falls and CC is debounced, and cancel the workaround when either VBUS rises, or the removal detection is successful. CRs-Fixed: 2020132 Change-Id: I6475d37911d90805ed8b3bb4b3a26a9f7557ebd6 Signed-off-by: Nicholas Troast <ntroast@codeaurora.org> Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2017-04-17Merge "ARM: dts: msm: Configure pin state for SMB1381 interrupt"Linux Build Service Account
2017-04-17Merge "soc:qcom: Synchronize service notifier task's"Linux Build Service Account
2017-04-17Merge "core_ctl: Harden the adjustment_possible() check for unisolation"Linux Build Service Account
2017-04-17Merge "usb: gadget: ffs: Fix runtime PM usage count for multiple set_alt"Linux Build Service Account
2017-04-17Merge "drivers: qcom: ultrasound: check concurrent device open operations"Linux Build Service Account
2017-04-17Merge "ARM: dts: msm: Enable register read based esd on sdm660 and sdm630"Linux Build Service Account
2017-04-17Merge "cpu-hotplug: Fix false error message in cpu_up()"Linux Build Service Account
2017-04-17Merge "defconfig: msm: enable page poisoning by default"Linux Build Service Account
2017-04-17Merge "mm: allow page poisoning to be enabled by default."Linux Build Service Account
2017-04-16soc:qcom: Synchronize service notifier task'sAvaneesh Kumar Dwivedi
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-16drivers: qcom: ultrasound: check concurrent device open operationsDivya Ojha
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-16Merge "qcom: smb-lib: rerun APSD on insertion for micro USB mode"Linux Build Service Account
2017-04-16cnss_prealloc: Remove WARN_ONPrashanth Bhatta
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-16ARM: dts: msm: Configure pin state for SMB1381 interruptYingwei Zhao
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-16qcom: smb-lib: rerun APSD on insertion for micro USB modeAshay Jaiswal
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-15Merge "qcom: smb2: ensure QC adapter is at 5V at shutdown"Linux Build Service Account
2017-04-15core_ctl: Harden the adjustment_possible() check for unisolationPavankumar Kondeti
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-15core_ctl: Update cluster->active_cpus in eval_need()Pavankumar Kondeti
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-15core_ctl: Handle only CPU_ONLINE and CPU_DEAD notificationsPavankumar Kondeti
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-14Merge "ANDROID: binder: add hwbinder,vndbinder to BINDER_DEVICES."Linux Build Service Account
2017-04-14Merge "android: binder: move global binder state into context struct."Linux Build Service Account
2017-04-14Merge "power: qpnp-smb2: Specify the min/max charger switching frequency"Linux Build Service Account
2017-04-14Merge "soc: qcom: remove debugfs interface from ssr, service locator & notifier"Linux Build Service Account
2017-04-14Merge "defconfig: msm: Enable HWBinder for SDM660"Linux Build Service Account
2017-04-14Merge "ARM: dts: msm: Add usb master clock rate in high speed mode for sdm660"Linux Build Service Account
2017-04-14Merge "input: misc: hbtp_input: Support for Region of Interest/sensors"Linux Build Service Account
2017-04-14Merge "ARM: dts: msm: Disable U1U2 low power modes for SDM660"Linux Build Service Account
2017-04-14defconfig: msm: enable page poisoning by defaultVinayak Menon
Enable page poisoning by default on MSM8998 and SDM660. Change-Id: If0b873888f21fd7e7057df43cf223e3c50372bed Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
2017-04-14mm: allow page poisoning to be enabled by default.Vinayak Menon
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-14mm: enable page poisoning early at bootVinayak Menon
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-14mm/page_poisoning.c: allow for zero poisoningLaura Abbott
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-14mm/page_poison.c: enable PAGE_POISONING as a separate optionLaura Abbott
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-14Merge "ASoC: wcd9335: Initialize variables before use"Linux Build Service Account
2017-04-14Merge "ASoC: wcd_cpe_core: Initialize variables before use"Linux Build Service Account
2017-04-14Merge "ASoC: msm: qdsp6v2: Initialize variables before use"Linux Build Service Account
2017-04-14Merge "ASoC: wcd-spi: Initialize variables before use"Linux Build Service Account
2017-04-14Merge "Revert "ASoC: msm: decrement slim channel ref to set the property""Linux Build Service Account
2017-04-14Merge "ASoC: wcd934x: use analog mics in micbias mode for MAD"Linux Build Service Account
2017-04-14Merge "drivers: mfd: wcd934x: Set CDC_TOP_TOP_CFG1 register as non-volatile"Linux Build Service Account
2017-04-14Merge "ASoC: msm: Update proper clock frequency for slave mode"Linux Build Service Account
2017-04-14Merge "ASoC: msm: Update proper clock frequency for slave mode"Linux Build Service Account
2017-04-14Merge "diag: Update the read buffers status properly"Linux Build Service Account
2017-04-14Merge "msm: ADSPRPC: Use SMD on targets that doesn't support GLINK"Linux Build Service Account
2017-04-14Merge "usb: gadget: ccid: Fix data types of header structures"Linux Build Service Account
2017-04-14Merge "defconfig: msmcortex_mediabox: Disable CONFIG_ICNSS_DEBUG"Linux Build Service Account