Commit graph

893,562 commits

Author SHA1 Message Date
Subramanian Ananthanarayanan
e6af79bae9 msm: mhi_dev: Change to not enable ERDB interrupts
We see spurious interrupts during modem standby if ERDB is enabled.
Making changes to not enable ERDB interrupts.

Change-Id: I5a51101b54f67e7c8e56d46c56bddd739c8852a5
Signed-off-by: Subramanian Ananthanarayanan <skananth@codeaurora.org>
Signed-off-by: Gauri Joshi <gaurjosh@codeaurora.org>
2021-02-04 18:02:13 -08:00
Subramanian Ananthanarayanan
c0a31b28b1 msm: mhi_dev: Enable CMDB during restore mmio
During mhi_dev_restore_mmio() we call mhi_dev_mmio_mask_interrupts,
restore the backup registers and we enable only CTRL,CHDB interrupts.
This causes the CMDB do be in disabled state, so after first D3 cold
transition we don't get CMDB interrupt until it fires along with one of
the already enabled interrupts. This causes delay in processing CMDB
interrupts that host might have queued at a very early stage.
Change is to enable CMDB interrupts post mmio restore along with the
other interrupts.

Change-Id: I75acbeda3f6e7c50669be4db9190b8ccd5b1dd1e
Signed-off-by: Subramanian Ananthanarayanan <skananth@codeaurora.org>
Signed-off-by: Gauri Joshi <gaurjosh@codeaurora.org>
2021-02-04 18:01:45 -08:00
Subramanian Ananthanarayanan
137bc0157e msm: mhi_dev: Fix interrupt storm during Enable/disable
mhi_dev_backup_mmio() and mhi_dev_restore_mmio() does backup/restore
of INTR registers of MHI device, causing it to restore interrupts
that are not valid during PCIE PM_RST_DEAST event. The fix is to
skip the INTR register space.

Change-Id: I2a8cde174cf4c6acd7acce13ad0195ed6a9a6f0b
Signed-off-by: Subramanian Ananthanarayanan <skananth@codeaurora.org>
Signed-off-by: Gauri Joshi <gaurjosh@codeaurora.org>
2021-02-04 18:01:05 -08:00
Subramanian Ananthanarayanan
b3e7aed275 msm: mhi_dev: Avoid MSI trigger during device cold boot scenario
In hibernate scenario, due to recent changes on host side the
BHI register value is updated before M0 is issued. This causes a
mismatch with the reset value 0xfffffff expectations. As a result
device ends up sending an MSI to indicate ready status.

This is not expected from host side, and causes race conditions
where it leads the host to process MHI initialization and MHI reset
concurrently in two thread contexts. This manifest into two different
signatures primarily:
a) M0 is acknowledged in Thread 1 context, host keep waiting for device to
Acknowledged M0 sent as part of Thread 2. Device ignores the 2nd request
as its already in M0.
b) MMIO event ring is initialized with a primary value x, because of
Thread 2 doing a re-installation the event ring base is updated by the
host to another value y. The device which is only aware of the primary
value send completion event with RP value corresponding to x. This is
treated as a junk RP and ends up resulting in a host crash with
BSOD 0xdeaddead.

Change-Id: Iae0ee996ad086ff5e6430c198f29e56d994c1ef7
Signed-off-by: Subramanian Ananthanarayanan <skananth@codeaurora.org>
Signed-off-by: Gauri Joshi <gaurjosh@codeaurora.org>
2021-02-04 18:00:28 -08:00
Subramanian Ananthanarayanan
3645569660 msm: mhi_dev: Update num_reqs for ADB channel
num_reqs feild as part of chan_attr is not updated properly, it is set
to true. So there is only 1 reqs allocated for this channel. This causes
the channel to run of reqs easily causing ADB to stall. Updated num_reqs
to 50.

Change-Id: I1d4ec246c5879dbf1e9ca38ceeec7ffd6b8feccb
Signed-off-by: Subramanian Ananthanarayanan <skananth@codeaurora.org>
Signed-off-by: Gauri Joshi <gaurjosh@codeaurora.org>
2021-02-04 17:59:46 -08:00
Subramanian Ananthanarayanan
c4c214940e msm: mhi_dev: UCI memory leak fix
mhi_init_read_chan() allocates max_packet_size*nr_trbs for async client for
inbound channel. Multiple open/close of channels can cause memory leak.
Adding free operation during channel release to resolve this.

Change-Id: I7be4d47d28140a4d04b5070cb7db776a7f909238
Signed-off-by: Subramanian Ananthanarayanan <skananth@codeaurora.org>
Signed-off-by: Gauri Joshi <gaurjosh@codeaurora.org>
2021-02-04 17:59:08 -08:00
Subramanian Ananthanarayanan
7f1d9ff41a msm: mhi_dev: Prevent invalid memory access during channel read
ring_cache is NULL as channel has not yet been started, read operation
accesses ring_cache before checking if channel is in stopped state.
Adding a check in UCI layer to perform read/write transfers only
if the channel is in valid state.

Change-Id: Ic8e6ae19badf43a7f64f92349e9c2427750a98b6
Signed-off-by: Subramanian Ananthanarayanan <skananth@codeaurora.org>
Signed-off-by: Gauri Joshi <gaurjosh@codeaurora.org>
2021-02-04 17:58:23 -08:00
Siva Kumar Akkireddi
18e10bee09 msm: mhi_dev: Redesign UCI transfer request structure management
Invalid memory access can happen if a client closes its channels
with transfers pending because the mhi transfer request structure
gets freed in UCI when channel is closed, but MHI driver accesses the
request structure in the transfer completion callback.

To avoid the invalid memory access, following changes are done:
  * Allocate mhi transfer request structures for a client in the
    first UCI client open call
  * Do not free mhi transfer request structs when client calls release,
    to allow for subsequent re-use
  * Maintain an in-use list to track active transfers
  * If a client exits with transfers pending, move the request structs
    corresponding to pending transfers to free list and mark them as
    stale.
  * Stale transfers, if completed later, are ignored.

Change-Id: I170e06321de9c67b0a1d107b775d75b2ed97febb
Signed-off-by: Siva Kumar Akkireddi <sivaa@codeaurora.org>
Signed-off-by: Gauri Joshi <gaurjosh@codeaurora.org>
2021-02-04 17:57:14 -08:00
qctecmdr
2adfda1e32 Merge "cnss2: Add a 128kB to prealloc pool" 2021-01-21 08:58:51 -08:00
qctecmdr
2194883a58 Merge "interconnect: qcom: Fix re-initializing the bcm" 2021-01-21 08:58:51 -08:00
qctecmdr
eadeaeb231 Merge "sched/fair: Add sched_sync_hint_enable node" 2021-01-21 08:58:51 -08:00
qctecmdr
213e25baa7 Merge "usb: dwc3: gadget: Replace dev with its parent sysdev in ep_disable" 2021-01-21 08:58:50 -08:00
qctecmdr
12280a383f Merge "defconfig: enable debug page alloc config for holi" 2021-01-21 08:58:50 -08:00
qctecmdr
f9595c4291 Merge "soc: qcom: hab: add the guest_shm.h header file" 2021-01-21 08:58:50 -08:00
qctecmdr
156d735064 Merge "usb: phy: qmp: add missing hardware orientation debug function" 2021-01-21 08:58:49 -08:00
qctecmdr
8fea7e8845 Merge "ion: msm: dump invalid heap id" 2021-01-21 08:58:49 -08:00
qctecmdr
bd07c963db Merge "defconfig: Enable IPC logs for sdxlemur" 2021-01-21 04:59:13 -08:00
qctecmdr
31b7bc4b6d Merge "cnss2: Add support XO Clock selection leakage prevention" 2021-01-21 04:59:13 -08:00
qctecmdr
58dc954a3e Merge "net: qrtr: print error case for qrtr receive" 2021-01-21 04:59:13 -08:00
qctecmdr
e1a635a475 Merge "soc: qcom: mem-offline: isolate freepages in pageblock boundaries" 2021-01-21 04:59:12 -08:00
qctecmdr
b6766e400a Merge "msm: kgsl: Add GPU snapshot to minidump" 2021-01-21 04:59:12 -08:00
qctecmdr
154883363d Merge "msm: ipa: add mechanism to configure aggregation timeout" 2021-01-21 04:59:12 -08:00
qctecmdr
1fb9e4026b Merge "devfreq: Add devfreq-cpufreq governor" 2021-01-21 04:59:12 -08:00
qctecmdr
b0f3e1b860 Merge "clk: qcom: sm6150: define vdd_levels enum and vdd_corner[] map" 2021-01-21 01:09:21 -08:00
qctecmdr
6c81f26786 Merge "dt-bindings: msm: Add bindings for CSI PHY fuse support" 2021-01-21 01:09:20 -08:00
qctecmdr
82196787ec Merge "defconfig: gen3auto: Add IOMMU related configs" 2021-01-21 01:09:20 -08:00
qctecmdr
2568f47851 Merge "power: smb1398: Handle USB power path suspension appropriately" 2021-01-21 01:09:20 -08:00
qctecmdr
a0c321e210 Merge "cnss2: retry mhi suspend in case packets are pending in MHI layer" 2021-01-21 01:09:20 -08:00
qctecmdr
db07dbc01d Merge "net: aquantia: Change max supported IPA bandwidth" 2021-01-21 01:09:19 -08:00
qctecmdr
6efe743bf0 Merge "dmaengine: gpi: Log the assigned GPII per SE during probe" 2021-01-21 01:09:19 -08:00
qctecmdr
95cfe8c295 Merge "defconfig: Enable SMB1351 and other drivers for sdxnightjar" 2021-01-21 01:09:19 -08:00
qctecmdr
5e5bf5c150 Merge "drivers: pinctrl: qcom: Add SM6150 pinctrl driver" 2021-01-21 01:09:19 -08:00
qctecmdr
6c35b44472 Merge "defconfig: gen3auto: Enable LLCC driver" 2021-01-21 00:44:32 -08:00
qctecmdr
3909534a7a Merge "defconfig: sdxlemur: Remove CONFIG_NO_VM_RECLAIM" 2021-01-21 00:44:32 -08:00
qctecmdr
ab09338b78 Merge "defconfig: gen3auto: Enable msm_geni_console" 2021-01-20 23:52:15 -08:00
qctecmdr
56dfee3f47 Merge "defconfig: enable CONFIG_ARM_SMMU_SELFTEST for debug config" 2021-01-20 23:52:15 -08:00
qctecmdr
38de743e5a Merge "ANDROID: usb: gadget: Do not disconnect unregistered dev" 2021-01-20 23:52:15 -08:00
qctecmdr
5d0cb44821 Merge "scsi: ufs: Hold auto suspend until ufs async scan completes" 2021-01-20 23:52:13 -08:00
qctecmdr
fed9b0b727 Merge "drivers: soc: Add support for SDMSHRIKE llcc driver" 2021-01-20 23:52:13 -08:00
Biao Long
e8f6113085 sched/fair: Add sched_sync_hint_enable node
Add sched_sync_hint_enable not to enable/disable sync.

Change-Id: Id6bdff3d4b9ea1051d7b55ca4cfd1d802c92fa64
Signed-off-by: Biao Long <blong@codeaurora.org>
2021-01-21 08:55:43 +08:00
Mahesh Kumar Kalikot Veetil
200b7dec04 cnss2: Add a 128kB to prealloc pool
WLAN host driver has a new memory requirement for regulatory structure
allocation of order 5. Increase 128 kB slot by one.

Change-Id: If95291c96df0b7588b54f8e19b287d846896b479
Signed-off-by: Mahesh Kumar Kalikot Veetil <mkalikot@codeaurora.org>
2021-01-20 14:19:47 -08:00
qctecmdr
f64d2bf563 Merge "defconfig: monaco_go: add bpf configs" 2021-01-20 03:11:33 -08:00
qctecmdr
4e14ab3f8c Merge "drivers: soc: Add support for sm8150 llcc driver" 2021-01-20 03:11:33 -08:00
qctecmdr
b5358f2642 Merge "soc: qcom: add HAB driver" 2021-01-20 03:11:32 -08:00
Charan Teja Reddy
ae2a72e99d soc: qcom: mem-offline: isolate freepages in pageblock boundaries
Migrate isolate of a pageblock is being checked only at the pageblock
boundary pages thus the isolation of freepages should happen on that
pageblock which otherwise can still cause the isolation of freepages on
an isolated pageblock.

Consider the below case:

Pa					       Pb

check the pageblock
isolation

zone_lock
Isolate the SWAP_CLUSTER_MAX pages
Zone_unlock
					zone_lock
					Set Migrate isolate on the
					same page block that Pa is
					operating on.
					zone_unlock
zone_lock
Continue the isolate on the same
page block that was set Migrate
isolate by Pb which is an error.

Change-Id: I1504b031f434fb65ebb11e1472b73e9d34e388b8
Fixes: ff56a97530 ("mem-offline: disallow page migration to isolated page blocks")
Signed-off-by: Charan Teja Reddy <charante@codeaurora.org>
2021-01-20 16:16:29 +05:30
Veera Vegivada
cd30d2af63 interconnect: qcom: Fix re-initializing the bcm
Currently, qcom_icc_bcm_init always assumes the bcm is not initialized.
There is a possibility that same bcm can belong to multiple providers
and re-initing the bcm adds the same bcm multiple times to the nodes
which are under the control of the bcm.
Hence add condition to check for bcm inited.

Change-Id: I3961963a6ef1a7b76d7ab708f648146fe1a30c99
Signed-off-by: Veera Vegivada <vvegivad@codeaurora.org>
2021-01-20 11:32:59 +05:30
Kavya Nunna
c363bb6123 defconfig: Enable SMB1351 and other drivers for sdxnightjar
Enable smb1351, rtc and pwm drivers for sdxnightjar.

Change-Id: I874210518faa4b1429b6d2c842bf9af2b05ee01e
Signed-off-by: Kavya Nunna <knunna@codeaurora.org>
2021-01-20 10:37:04 +05:30
Veera Vegivada
5ace54dceb clk: qcom: sm6150: define vdd_levels enum and vdd_corner[] map
Define a vdd_levels enum and vdd_corner[] mapping table which can
be used by clock controller drivers to configure the vdd_class
associated with their clocks.

Change-Id: I7b1ad5f51c414694bc9d5101afc411b1d63bad42
Signed-off-by: Veera Vegivada <vvegivad@codeaurora.org>
2021-01-19 23:24:18 +05:30
Sarthak Garg
de2736fab5 defconfig: Enable IPC logs for sdxlemur
Enable IPC logs for sdxlemur.

Change-Id: I82ebb1f82f43f27229b4eff4c30ab8f829413d04
Signed-off-by: Sarthak Garg <sartgarg@codeaurora.org>
2021-01-19 21:15:57 +05:30
Nitin Rawat
f9f1deb3a3 scsi: ufs: Hold auto suspend until ufs async scan completes
To avoid any suspend during probe, we increment the device
usage counter before calling ufshcd_async_scan and decrement
before returning from ufshcd_async_scan function.

For the scenarios where ufs device initialisation fails
or if the ufs device is not present, we are decrementing
device usage counter before calling ufshcd_hba_exit.

Hence there is a possiblity that after we disable the clocks
as part of ufshcd_hba_exit call, runtime suspend may get
triggered. As part of runtime suspend, we are accessing
the register causing noc error due to unclocked access.

To fix this, we are removing pm_runtime_put_sync
from ufshcd_add_lus() and adding it in common place
at the end of ufshcd_async_scan so that we hold auto
suspend until async scan completes in both success and
failure case.

Call Stack:
 panic+0x17c
 panic+0x0
 arm64_serror_panic+0x74
 do_serror+0x15c
 el1_error+0xbc
 el1_irq+0xb0
 crypto_qti_resume+0x68
 ufshcd_crypto_qti_resume+0x18
 ufshcd_crypto_resume+0x3c
 ufshcd_suspend+0x5b0
 ufshcd_runtime_suspend+0x44
 ufshcd_pltfrm_runtime_suspend+0x14
 pm_generic_runtime_suspend+0x44
 __rpm_callback+0x98
 rpm_suspend+0x2a4
 rpm_idle+0x158

  schedule+0x8c
 schedule_preempt_disabled+0x24
 __mutex_lock+0x358
 __mutex_lock_slowpath+0x14
 mutex_lock+0x34
 clk_unprepare+0x58
 __ufshcd_setup_clocks+0x140
 ufshcd_hba_exit+0x170
 ufshcd_async_scan$d36fba0b664edbd124b5d17d005db4c5+0x118
 async_run_entry_fn$8847b5d726ee295ba72a029a76bec2f5+0x60
 process_one_work+0x2cc
 worker_thread$f31e2447a3fdcb60f4b193f95acd647c+0x278
 kthread$bf1537fa370ac32bde5f056194ddafc6+0x16c
 ret_from_fork+0x10.

Change-Id: I059de2b0eba642bf1a35c27e8e12d31c6f30a836
Signed-off-by: Nitin Rawat <nitirawa@codeaurora.org>
2021-01-19 21:02:14 +05:30