Commit graph

589410 commits

Author SHA1 Message Date
Sahitya Tummala
d07d314e7d fs/mbcache: fix use after free issue in mb_cache_shrink_scan()
Fix the below potential race between these two contexts -
mb_cache_entry_get() and mb_cache_shrink_scan(), which results
into use after free issue.

			     task a:
			     mb_cache_shrink_scan()
			       |--if(!list_empty(&mb_cache_lru_list))
				      |--get the ce entry
				      |--list_del_init(&ce->e_lru_list);
				      |--check ce->e_used, ce->e_queued,
					 ce->e_refcnt and continue
				      -> gets prempted here
task b:
ext4_xattr_release_block()
 |--mb_cache_entry_get()
    |--get ce from hlist_bl_for_each_entry()
      |--increment ce->e_used and
         list_del_init(&ce->e_lru_list)
 |--mb_cache_entry_free()
				      |--hlist_bl_lock(ce->e_block_hash_p);
				      -> results into use after free

Also, fix similar potential race between mb_cache_entry_alloc() and
mb_cache_entry_get() in case if cache->c_max_entries is reached.

Change-Id: I01049bae5d914cfb8494ab299ec2e068745d1110
Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
2017-05-04 09:41:48 +05:30
Yingwei Zhao
fe26f221ff ARM: dts: msm: Add batt_therm coefficients for QRD SDM660/630
Configure battery thermal coefficients for QRD660/630 to make sure the
device could read the correct battery temperatures.

CRs-Fixed: 2038922
Change-Id: I21d0eedfec0a0529d8864d11b703659f4ba43b6a
Signed-off-by: Yingwei Zhao <cyizhao@codeaurora.org>
2017-05-03 20:23:21 -07:00
Can Guo
d70b0a18f6 scsi: ufs: add command logging infrastructure
Add the necessary infrastructure to keep timestamp history
of commands, events and other useful info for debugging
complex issues. This helps in diagnosing events leading
upto failure.

Change-Id: I34f78b0c875262fa06c16d476be6255f7ae4d92f
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
Signed-off-by: Sayali Lokhande <sayalil@codeaurora.org>
Signed-off-by: Can Guo <cang@codeaurora.org>
2017-05-04 09:12:11 +08:00
Abhijeet Dharmapurikar
b65544bd63 Revert "smb138x: introduce support for smb1355"
This reverts commit 566b44214c (smb138x:
introduce support for smb1355).

This is not required since smb1355 support is moved to its own driver.

Change-Id: Ibad8595c09a865e273adb6f30d6a75f931220131
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2017-05-03 13:51:53 -07:00
Abhijeet Dharmapurikar
df7b29506b Revert "smb138x: use chg src bit to disable parallel charger"
This reverts commit 0f0e36134d ("smb138x:
use chg src bit to disable parallel charger)

This is not required, since smb1355 support is moved to its own driver.

Change-Id: I1bd454030d29195f03be132d167ec8294169b9d5
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2017-05-03 13:51:53 -07:00
Abhijeet Dharmapurikar
9d0fdc3738 qpnp-smb2: Support faking input current limited state
Support faking input current limited state. This is very helpful
in testing/debugging the software based vbus changing algorithms.

Change-Id: I7cf548c94397ee680c9d65343c49ec7b16873e88
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2017-05-03 13:51:52 -07:00
Fenglin Wu
15a68a61bd power: qcom: smb2: Add REAL_TYPE property for usb power_supply
Add POWER_SUPPLY_PROP_REAL_TYPE property for usb_psy to present its real
charger type. POWER_SUPPLY_PROP_TYPE in usb_psy is always set to
POWER_SUPPLY_TYPE_USB_PD for healthd to recognize it as an AC charger.
Also add usb_port_psy with POWER_SUPPLY_TYPE_USB type is added for healthd
to recognize it as an USB host. Their ONLINE properties will be updated
according to the VBUS status, type-c mode and real charger type.
With this type being set statically, update the usb phy and pd policy
engine code to look at real type.

Change-Id: I90aa69325cc82b09dfb513c0eeecbc61e092a57f
Signed-off-by: Fenglin Wu <fenglinw@codeaurora.org>
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2017-05-03 13:48:19 -07:00
Lingutla Chandrasekhar
198c5bc334 soc: qcom: minidump: move elf global variables to structure
Current driver implementation uses global variables to create
minidump elf header.

Move all elf global variables into a structure, and also replace
'msm_minidump_enabled' API with 'minidump_enabled' global variable.
And also add minidump_table address in elf, which would be useful
for parsers to get memory dump table addresses without vmlinux symbols.

Change-Id: I8829d88ce234179f429ae9537a3582df794c2cdf
Signed-off-by: Lingutla Chandrasekhar <clingutla@codeaurora.org>
2017-05-03 23:04:19 +05:30
Lingutla Chandrasekhar
6437df9e5d soc: qcom: minidump: fix logic checks in elf traversals
Fix logical checks in minidump elf traversal functions.

Change-Id: I649fc9ae66d616982a61f71f66f2abe378212660
Signed-off-by: Lingutla Chandrasekhar <clingutla@codeaurora.org>
2017-05-03 23:02:11 +05:30
Lingutla Chandrasekhar
e1e90feb55 soc: qcom: minidump: update error message log level
Current implementation uses pr_info to print error messages.

Update driver prints log level with pr_err instead of
pr_info, and also update with proper error number for
minidump table update failure return.

Change-Id: I27667715c71b361b9ee0f7856c94242d3ca21014
Signed-off-by: Lingutla Chandrasekhar <clingutla@codeaurora.org>
2017-05-03 22:58:25 +05:30
Stephen Boyd
e18d923a3b defconfigs: Sync up defconfigs
We recently renamed CONFIG_UID_CPUTIME, but didn't update all the
defconfigs.

Change-Id: Ic52f904d6ada3d0e32a8278ec95f7b34b29f96b9
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2017-05-03 08:42:43 -07:00
Laxminath Kasam
a0e55defe1 ASoC: msm: qdsp6v2: Add routing controls for fm over mi2s
When routing FM over MI2S, add support for required
port mixer controls.

CRs-Fixed: 2034932
Change-Id: I04e08ae8f876fe08390b3dae96d4522c2546fb32
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2017-05-03 06:29:58 -07:00
Laxminath Kasam
f150591684 ASoC: sdm660_cdc: Avoid unclocked register access to digital codec
In particular SSR scenario, digital codec access happens without
clock enabled. While SSR down event notification in progress,
APR driver blocks request to DSP to enable clock since APR already
received down event. regmap access to digital codec register results in
AHB timeout error. If DSP clock enable request fails, set the regmap
access cache only mode to avoid any register access.

CRs-Fixed: 2034468
Change-Id: Id1141339d2673920167ed7ac74b13b6fee05173f
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2017-05-03 06:28:06 -07:00
Lior David
ebfdd0e131 wil6210: add option to ignore OTA regulatory hints
On some platforms, the regulatory domain (country) is set
using mechanisms external to WIFI, such as cellular modem
and GPS. In these scenarios the regulatory hints that
are received over the air (in beacons and similar) can
conflict and even cause an incorrect country to be set.
Add an option to ignore the OTA regulatory hints to better
support such scenarios.

Change-Id: Ia46fe2699f4cc9859713947c0153107462fdec06
Signed-off-by: Lior David <liord@codeaurora.org>
2017-05-03 15:11:10 +03:00
Linux Build Service Account
5d78c03af8 Merge "net: wireless: Update regdb for 60G band" 2017-05-03 03:42:42 -07:00
Linux Build Service Account
e8c139bc05 Merge "mmc: core: Use mmc_reset instead of power_restore" 2017-05-03 03:42:41 -07:00
Linux Build Service Account
ae001c2e2e Merge "mmc: core: Do regular power cycle when lacking eMMC HW reset support" 2017-05-03 03:42:40 -07:00
Linux Build Service Account
1b83a4b457 Merge "ASoC: sdm660_cdc: Update volatile register set for cache bypass" 2017-05-03 03:42:39 -07:00
Linux Build Service Account
7407b90c6d Merge "ASoC: msm: qdspv2: add result check when audio process fail" 2017-05-03 03:42:38 -07:00
Linux Build Service Account
1a410c53c6 Merge "defconfig: msm8998: Enable MHI related drivers" 2017-05-03 03:42:37 -07:00
Linux Build Service Account
107513ced3 Merge "tty: serial: msm: Move request_irq to the end of startup" 2017-05-03 03:42:36 -07:00
Kiran Gunda
08e56dd325 regulator: onsemi-ncp6335d: Fix compilation issues
Fix the compilation issue seen due to the regulator framework
changes from 3.10 to 4.4 kernel. Also remove the redundant error
messages during the memory allocation failures.

Change-Id: I4887c2d3acaff562fb41e6c2eaeb2c1ef2c1bde5
Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
2017-05-03 15:06:51 +05:30
Lingutla Chandrasekhar
d2e8712af2 defconfig: msm: perf: disable cache dumps support
During Mini dump collection, cache dump needs extra memory
and time hence disable it in perf builds.

Change-Id: I68aae6edf676c27b8443fdcc88ece05fa3a26748
Signed-off-by: Lingutla Chandrasekhar <clingutla@codeaurora.org>
2017-05-03 14:41:14 +05:30
Hardik Kantilal Patel
8695eb7e45 icnss: Initialize the structure member properly
After cold boot calibration WLAN FW send pin connect result to
platform driver through qmi indication message. To avoid uninitialized
access of pin connect result structure member initialize it properly.

CRs-Fixed: 2042000
Change-Id: I5654583e890f9ee67ddcc632aecd9ecb8a160062
Signed-off-by: Hardik Kantilal Patel <hkpatel@codeaurora.org>
2017-05-03 14:24:51 +05:30
Liangliang Lu
091b49d5ea usb: gadget: mtp: Move mutex_init() to alloc_inst_mtp_ptp()
Now mutex_init() is in function_alloc_mtp_ptp() which will be
called when USB composition change.

In the corner case, USB composition change when do mtp_read(),
the mutex lock is initialized when do mutex_lock().

Change-Id: I7a61f6fe6d8865462c5445f7075722f4f151b03f
Signed-off-by: Liangliang Lu <luliang@codeaurora.org>
2017-05-03 16:47:13 +08:00
Maya Erez
cb6db5d817 ARM: dts: msm: enable SMMU stage1 for 11AD devices on msm8998
Set smmu-s1-en to enable SMMU stage1.
This change also sets SMMU base address and size, required when
SMMU stage1 is enabled.

Change-Id: I30f4528c665c7623cb56de0773a0a3da2b4c21bf
Signed-off-by: Maya Erez <merez@codeaurora.org>
2017-05-03 11:36:41 +03:00
Sharat Masetty
ae15407721 drm/msm: Fix the SNAPSHOT_HEADER macro
The "_header" field of the macro was being incorrectly expanded to just
"header". This was only working because all the functions which used this
macro already had "header" defined in scope.

Change-Id: I19e77ae78cfff471ddffd428cb3fd055c6340737
Signed-off-by: Sharat Masetty <smasetty@codeaurora.org>
2017-05-03 13:14:51 +05:30
Sharat Masetty
96605f759f drm/msm: Add preemption records to QTI GPU snapshot
This patch helps dump the full 64k per ring preemption
record to GPU snapshot which is collected during GPU
recovery step. We use the general object snapshot section
type to store these records and we only collect the preemption
records if preemption was going to kick in, which is when
the number of rings is greater than one.

Change-Id: I1872bc14c6b39c8c4963ce9c98e96b03cbfec907
Signed-off-by: Sharat Masetty <smasetty@codeaurora.org>
2017-05-03 12:53:29 +05:30
Sayali Lokhande
3970ec5d3d mmc: core: Use mmc_reset instead of power_restore
On 4.4 kernel, 'commit 364549ddc2 ("mmc: core: Remove
redundant ->power_restore() callback for MMC")' removed
power_restore callback for MMC since mmc_reset is
implemented. Hence use reset instead of power_restore in
mmc_cmdq_hw_reset. Also modify the caller function mmc_cmdq_hw_reset
to properly use the mmc_reset.

Change-Id: Ia06d579401b6a083b164dff7a253d1eb3caef1a3
Signed-off-by: Sayali Lokhande <sayalil@codeaurora.org>
Signed-off-by: Vijay Viswanath <vviswana@codeaurora.org>
2017-05-03 12:16:53 +05:30
Gwendal Grignou
ea7ba3abc3 mmc: core: Do regular power cycle when lacking eMMC HW reset support
The eMMC HW reset may be implemented either via the host ops ->hw_reset()
callback or through DT and the eMMC pwrseq. Additionally some eMMC cards
don't support HW reset.

To allow a reset to be done for the different combinations of mmc hosts
and eMMC/MMC cards, let's implement a fallback via trying a regular power
cycle. This improves the mmc block layer retry mechanism of failing I/O
requests.

Change-Id: I5cafd54327cde22ea9599543382f1b294272a42c
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
[Ulf: Rewrote changelog]
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Git-commit: 4e6c71788d6bb0e5438fc9211fa6e52dcca01474
Git-repo: git://git.linaro.org/people/ulf.hansson/mmc.git
[vviswana@codeaurora.org: resolve trivial merge conflicts]
Signed-off-by: Vijay Viswanath <vviswana@codeaurora.org>
2017-05-03 12:14:17 +05:30
Anirudh Ghayal
660dbf1cf4 drivers: regulator: Add snapshot of OnSemi NCP6335D regulator
This is snapshot of the OnSemi NCP6335D driver as of msm-3.10
'commit 156ba1726643 ("regulator: onsemi-ncp6335d: Add i2c retry logic")'.

Change-Id: I4cf0acd272fcf498462d4397385cd62f144eadf8
Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
2017-05-03 10:45:09 +05:30
Linux Build Service Account
e3c33c9d53 Merge "tty: serial: msm: fix potential race b/w startup and irq handling" 2017-05-02 19:30:29 -07:00
Linux Build Service Account
199c942a22 Merge "msm: ipa3: fix a race condition on clock vote from suspend" 2017-05-02 19:30:28 -07:00
Linux Build Service Account
79fecc9a9a Merge "fs: ecryptfs: Cache to be cleared after file write" 2017-05-02 19:30:26 -07:00
Linux Build Service Account
5a54c56e49 Merge "msm: ipa: Add mutext protection when updating notify req cache" 2017-05-02 19:30:25 -07:00
Linux Build Service Account
8afac4e65f Merge "msm: camera: Fix NULL pointer dereference in msm_vb2.c." 2017-05-02 19:30:19 -07:00
Sujeev Dias
49da06535b defconfig: msm8998: Enable MHI related drivers
MHI host and related drivers provide communication between
host and external modem. Enable it.

CRs-Fixed: 2041725
Change-Id: I1fbdfa7f17d158c1b6a33eb14497add495454bd1
Signed-off-by: Sujeev Dias <sdias@codeaurora.org>
2017-05-02 16:55:36 -07:00
Subash Abhinov Kasiviswanathan
3b3ac3a93a net: pppolac/pppopns: Add back the msg_flags
Commit 26fc40a092 ("net: pppolac/pppopns: Replace msg.msg_iov
with iov_iter_kvec()") removed the msg_flags when removing the
iov fields. This lead to problems with VPN data transfers.

Fixes: 26fc40a092 ("net: pppolac/pppopns: Replace msg.msg_iov with
iov_iter_kvec()")
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>

Git-commit: Ib86ab3f927c5cf36cbad0bab501575999dc2b084
Git-repo:https://android.googlesource.com/kernel/common/
Change-Id: I5da64a60552d4c49b5c9042db40fb990cceaa646
Signed-off-by: Tejaswi Tanikella <tejaswit@codeaurora.org>
2017-05-02 23:42:18 +05:30
Sudarshan Rajagopalan
058ccb2933 iommu/iommu-debug: Add validation support for per-buffer coherent mappings
Added new debugfs files/nodes to perform basic validation of the
per-buffer IO coherent dma-mapping that was recently implemented.
Also, added a node to print out the PTE for a given IOVA.

Nodes added:
dma_attach
dma_map
dma_unmap
dma_atos
virt_addr
pte

Change-Id: I041ab5f4e37e50dd3f58e2def3fdd3125a60629c
Signed-off-by: Sudarshan Rajagopalan <sudaraja@codeaurora.org>
2017-05-02 10:32:42 -07:00
Linux Build Service Account
8d60131090 Merge "ASoC: msm: qdsp6v2: Clear pass-through mode on routing close" 2017-05-02 09:07:43 -07:00
Linux Build Service Account
238421b96e Merge "ASoC: msm-lsm-client: use kzalloc instead of kmalloc" 2017-05-02 09:07:41 -07:00
Linux Build Service Account
34ca0e6f1d Merge "icnss: remove pre-alloc memory leak check in platform driver" 2017-05-02 09:07:40 -07:00
Linux Build Service Account
3939f41b22 Merge "Merge remote-tracking branch 'remotes/quic/dev/msm-4.4-8996au' into msm-4.4" 2017-05-02 09:07:39 -07:00
Linux Build Service Account
9edaf67e54 Merge "input: synaptics: fix for buggy code poined by SIL tool" 2017-05-02 09:07:38 -07:00
Linux Build Service Account
f7a2f37c6b Merge "usb: gadget: MIDI: Add support for SuperSpeed enumeration" 2017-05-02 09:07:37 -07:00
Linux Build Service Account
0a9ca6c6b2 Merge "diag: Open glink channels in workqueue context" 2017-05-02 09:07:36 -07:00
Linux Build Service Account
52f8817d78 Merge "clk: Add support to dump state of all clocks into ftrace" 2017-05-02 09:07:35 -07:00
Linux Build Service Account
49c218cafe Merge "SDM660: ADSPRPC: Align the size of IOVA to 128MB" 2017-05-02 09:07:34 -07:00
Linux Build Service Account
9b50e3d6ba Merge "esoc: mdm-4x: Separate out callback function for 9x45" 2017-05-02 09:07:32 -07:00
Linux Build Service Account
e9ee15387e Merge "ARM: dts: msm: Add support mdm9x45 external modem" 2017-05-02 09:07:31 -07:00