Commit graph

899,310 commits

Author SHA1 Message Date
Maria Yu
64fdb4fa1d soc: wdog: Ensure missing user watchdog pet can trigger bite
The user watchdog was waiting the hardware watchdog bite by
stop petting it. But in the cpu suspend scenarios, the auto petting
by hardware prevent the expected watchdog bite. So add a new user pet
timer to explicitly trigger the watchdog bite by software when the user
watchdog petting is not happenned before timeout.

Change-Id: I71b1139192baa960ae00f7a27c630aedaf5a3ffa
Signed-off-by: Maria Yu <aiquny@codeaurora.org>
2021-07-01 05:55:35 -07:00
qctecmdr
9585c2cb84 Merge "net: tcp: check for NULL send head during MTU probe" 2021-06-30 20:51:42 -07:00
qctecmdr
d9d62284f5 Merge "Add support to vote for SMPS" 2021-06-30 05:37:34 -07:00
qctecmdr
26e5573f6c Merge "msm: mhi: Queue pending_ring WQ post channel DB check" 2021-06-30 01:37:50 -07:00
qctecmdr
dc8e61bd5a Merge "msm: pci : Avoid deadlock with recovery and enemurate lock" 2021-06-30 01:37:48 -07:00
qctecmdr
8694227de6 Merge "fuse: give wakeup hints to the scheduler" 2021-06-30 01:37:48 -07:00
qctecmdr
00e600676f Merge "mmc: sdhci-msm: Update TLMM_NORTH_SPARE register as per vdd_px2 supply" 2021-06-30 01:37:47 -07:00
Balakrishna Godavarthi
ef0d4d698c Add support to vote for SMPS
This change will add support to vote for SMPS node if regulator
handle is provided in DTS source.

Change-Id: Ib370fd2fecfe04585cd2ab643f597714ead18a93
Signed-off-by: Balakrishna Godavarthi <bgodavar@codeaurora.org>
2021-06-30 00:11:04 -07:00
qctecmdr
c568070453 Merge "input: touchscreen: focaltech: add a new property" 2021-06-29 21:37:02 -07:00
qctecmdr
a102e0a02d Merge "msm: ipa: macros to determine the structure mismatch" 2021-06-29 21:37:01 -07:00
qctecmdr
0e977f082b Merge "msm: mhi_dev: Check to prevent in_use_list access" 2021-06-29 21:37:00 -07:00
Fei Mao
29c674dd9c input: touchscreen: focaltech: add a new property
Add a new property to indicate power's state when sleep.

Change-Id: Ic54fbbd0adee8716ad0b2d892814f8ac38b683c5
Signed-off-by: Fei Mao <feim1@codeaurora.org>
2021-06-29 02:04:18 -07:00
Kaustubh Pandey
d2bdf73897 net: tcp: check for NULL send head during MTU probe
skb_peek() can return NULL when the socket write queue is empty. This
causes problems when using tcp_for_write_queue_from_safe(), as this
macro
resolves down to "for (tmp = skb->next; ...", causing a NULL
dereference.
Fix this by indicating that the tcp send queue head can not be coalesced
as there is nothing in it. This fixes the following:
Unable to handle kernel NULL pointer dereference
pc : tcp_write_xmit+0xe1c/0x1210
lr : tcp_write_xmit+0x38/0x1210
Call trace:
 tcp_write_xmit+0xe1c/0x1210
 tcp_tsq_write+0x110/0x140
 tcp_tasklet_func+0x120/0x170
 tasklet_action_common+0xec/0x128
 tasklet_action+0x20/0x28

By ending the MTU probe because of the empty send head.

Change-Id: I0c3283c37ee69a4941c8d9e88519e586c7905d25
Signed-off-by: Sean Tranchetti <stranche@codeaurora.org>
Signed-off-by: Kaustubh Pandey <kapandey@codeaurora.org>
2021-06-28 23:15:45 -07:00
Pradeep P V K
ac247e7425 fuse: give wakeup hints to the scheduler
Use synchronous wakeup interface to wakeup the userspace daemon. Scheduler
can make use of this hint to find a better CPU for the waker task.

Change-Id: I7d077235f9b8fe771869dd7e6fccee7d356d858b
Suggested-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Signed-off-by: Pradeep P V K <pragalla@codeaurora.org>
2021-06-28 22:59:55 -07:00
Pradeep P V K
45eba39e07 wait: add wake_up_sync()
The synchronous wakeup interface is available only for the interruptible
wakeup. Add it for normal wakeup.

Change-Id: Ia4460aa55690d14d203cdc843bd600c9e26c53f1
Suggested-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Signed-off-by: Pradeep P V K <pragalla@codeaurora.org>
2021-06-28 22:59:07 -07:00
Vivek Pernamitta
3bb65a0c8c msm: pci : Avoid deadlock with recovery and enemurate lock
Avoid deadlock scenario when wake interrupt arrives at enumeration
time and holds recovery lock and wake handler workqueue tries to
acquire enumeration lock. In parallel client driver can call
msm_pcie_pm_control for suspend where enumeration lock could
be successfully acquired by msm_pcie_pm_control instead by wake
handler and waiting for recovery lock which is currently acquired
by wake handler (which is currently waiting for enumertion lock)
which could leads to deadlock scenario.

msm_pcie_enumerate		wake handler		pm_control
	|			     |    	     (suspend thread)
	|			     |			   |
	|			     x acquired 	   |
	x acquired		     | recovery lock	   |
	| enumerate lock	     |  		   |
	|			     o waiting for	   |
  	|			       enumerate lock      |
	x released					   x acquired
	| enumerate lock			  	   | enumerate lock
							   |
							   o waiting for
							     recovery lock

we have fixed the order of locking in msm_pcie_pm_control to avoid
deadlock scenario.

Change-Id: Ifc72c643f7c0793cfa10a953723e953ce73a82b6
Signed-off-by: Vivek Pernamitta <vpernami@codeaurora.org>
2021-06-28 21:11:12 -07:00
qctecmdr
774e901388 Merge "usb: dwc3: Use pwr_evt_irq to wakeup if dp/dm directly connected to GIC" 2021-06-28 08:30:17 -07:00
Pradeep P V K
7c784bfe48 Revert "block: Enable BFQ io scheduler as default"
'commit abc0fc15dcec ("block: Enable BFQ io scheduler as default")'
This is to fix the Native Daemon and Zygote Preload regressions
during bootup.

Change-Id: I4cfb40d0622319ce84d17fa409a4fcb5ab429dbc
Signed-off-by: Pradeep P V K <pragalla@codeaurora.org>
2021-06-27 07:09:30 -07:00
qctecmdr
15c30a286b Merge "usb: dwc3-msm: Enable pwr_evt_irq for wakeup after LPM is done" 2021-06-25 19:46:42 -07:00
Rohith Kollalsi
11760143e6 usb: dwc3: Use pwr_evt_irq to wakeup if dp/dm directly connected to GIC
Currently support to enable/disable dplus hsphy irq and dminus hsphy
irq in case of resume/suspend is present only for pdc interrupts.
This support should be present even for non pdc interrupts if the
platform uses snps usb hs phy. Absence of this support leads to
dp/dm hsphy irq not being fired and usb stuck in lpm in host mode
eventhough there is a disconnect or remote wakeup issued from
hs/fs device connected to it. Hence add support to enable/disable
dp hsphy irq and dm hsphy irq for platforms that use snps hs phy.

On platforms which use snps phy and mpm interrupts, dp/dm lines are
directly connected to gic when cpu is active, mpm is involved only
when cpu is not active. Now in cpu active case, in host mode if usb
goes to lpm with hs/fs/ls device connected and unplug/remote wakeup
is issued, dp falling edge is monitored in software to detect that.
But gic is not capable of detecting a falling edge. Hence this
change adds support to program power event irq to wakeup the system
in this case. Note that gic takes care of dp rising edge wakeup
events like usb connect over otg when usb is in lpm and in host
mode. Only in case where dp falling edge is monitored i.e in case
of hs/fs/ls device connect and usb enteres lpm, then power event
irq is used to detect wakeup event as GIC cannot detect falling
edge.

Change-Id: I085b86c7df52daeedfb35cb71657c5163c2d5aaa
Signed-off-by: Rohith Kollalsi <rkollals@codeaurora.org>
2021-06-25 22:58:15 +05:30
Subramanian Ananthanarayanan
f2a589c5b1 msm: mhi: Queue pending_ring WQ post channel DB check
Change is to queue pending_ring post updating CH db_pend
variable. This is done to avoid chdb_ctrl_work WQ from getting
pre-empted and pending_ring WQ executing.

Change-Id: I3504c89006c1231251be6efdfebac52b0fd35cc9
Signed-off-by: Subramanian Ananthanarayanan <skananth@codeaurora.org>
Signed-off-by: Gauri Joshi <gaurjosh@codeaurora.org>
2021-06-25 10:25:59 -07:00
qctecmdr
71719650a3 Merge "Fix root mounting with no mount options" 2021-06-25 10:22:07 -07:00
qctecmdr
37585ba4dd Merge "net: qrtr: mhi_dev: Handle mhi register error case" 2021-06-25 10:22:07 -07:00
qctecmdr
3dc60644cc Merge "net: qrtr: ns: Fix Announce services for all nodes" 2021-06-25 10:22:07 -07:00
Ajay Agarwal
3cb01862db usb: dwc3-msm: Enable pwr_evt_irq for wakeup after LPM is done
Platforms using Synopsys SS phy are enabling pwr_evt_irq for
wakeup events in host mode as a part of dwc3_msm_suspend, but
before all the resources have been relinquished. So it is
possible that an IRQ is fired before dwc->in_lpm could be set to
1. Because of this, the pwr_event_handler will try to read
STAT_REG without issuing resume_work leading to unclocked access.
Fix this by enabling pwr_evt_irq only after in_lpm flag is set to
1, hence ensuring resume when the irq is fired.

Change-Id: I9772f427ecd10c2922c998cf0d57734362413051
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
2021-06-25 08:16:17 -07:00
Nitesh Gupta
fa2304691b msm: mhi_dev: Handle potential deadlock situation
With the current logic, MHI driver will hold channel
lock while processing the ring element and triggers
callback for the clients. Some clients are issuing
read requests for the channel in the callback context.
MHI driver will try to acquire the same channel lock
in read api leading to a deadlock situation.

Modify the logic to avoid holding channel lock
while processing the ring elements.

Change-Id: I62ac28d5eb06e3c9b12437f02288cfe1cdb2bea2
Signed-off-by: Nitesh Gupta <nitegupt@codeaurora.org>
Signed-off-by: Gauri Joshi <gaurjosh@codeaurora.org>
2021-06-24 23:04:04 -07:00
Subramanian Ananthanarayanan
cdc28c2b3f msm: mhi_dev: Check to prevent in_use_list access
Added a check for accessing in_use_list only in async case.

Change-Id: I842f9b9feb688d75152f7b2639c17c25c3376236
Signed-off-by: Subramanian Ananthanarayanan <skananth@codeaurora.org>
Signed-off-by: Gauri Joshi <gaurjosh@codeaurora.org>
2021-06-24 19:33:54 -07:00
Subramanian Ananthanarayanan
e1a0f4d9f1 msm: mhi_dev: Use req_lock spinlock during client release
The change is to use req_lock spinlock during client release
and to use the same spinlock while checking for is_stale
during read/write completion callbacks.

Change-Id: I7ebafecb7503fa8521fa8f849cabf4b82bbc2f53
Signed-off-by: Subramanian Ananthanarayanan <skananth@codeaurora.org>
Signed-off-by: Gauri Joshi <gaurjosh@codeaurora.org>
2021-06-24 19:33:21 -07:00
Subramanian Ananthanarayanan
db6c7f0843 msm: mhi_dev: Serialize UCI open and close file node operations
Multiple clients might perform open and close file operations
simultaneously on the same file node created by UCI. To avoid
race conditions which might result in invalid accesses or crashes,
the open and close operations are serialized.

Change-Id: Ic6a290a2c6af25bcd60983a7b531bf1287201821
Signed-off-by: Subramanian Ananthanarayanan <skananth@codeaurora.org>
Signed-off-by: Gauri Joshi <gaurjosh@codeaurora.org>
2021-06-24 19:27:01 -07:00
Gauri Joshi
bb1be52e1c msm: mhi: Prevent flush queue if channel is closed
Change is to prevent flush events being queued post channel close and
wait for pending flush event callbacks prior to channel close.

Change-Id: Ic168be0a187b3edcfeccedc565fb02673eaee883
Signed-off-by: Subramanian Ananthanarayanan <skananth@codeaurora.org>
Signed-off-by: Gauri Joshi <gaurjosh@codeaurora.org>
2021-06-24 19:26:00 -07:00
Subramanian Ananthanarayanan
446bace1c8 msm: mhi_dev: Use Ring event lock while sending write completion
Change involes usage of event ring mutex while sending write
channel completion events.

Change-Id: I3817e140551954a732e26d097d53176d573bf7f5
Signed-off-by: Subramanian Ananthanarayanan <skananth@codeaurora.org>
2021-06-24 19:20:38 -07:00
Gauri Joshi
bf72f4d92f msm: mhi_dev: stop reading host CH ring when CH is reset
The host can asynchronously reset the channel and this can happen when
there are pending ch interrupts to process on the EP.

The change is to prevent processing the old DB rung by the host by
adding delaying channel reset cmd ack.

Change-Id: I020a9961196867a7cc1ac8e4f309d0a75c38f6f5
Signed-off-by: Subramanian Ananthanarayanan <skananth@codeaurora.org>
Signed-off-by: Gauri Joshi <gaurjosh@codeaurora.org>
2021-06-24 19:19:11 -07:00
Subramanian Ananthanarayanan
24bf1e88dd msm: mhi: Stop sending event completion, during channel reset
The change is to prevent sending channel completion events,
post a channel stop or reset command.

Sending a channel completion post reset can cause the RP
to in reset value and hence the completion will be treated
as an out of order event.

Change-Id: I2cdd7a705a001689609ff8fa1f31fe11d61e5ea8
Signed-off-by: Subramanian Ananthanarayanan <skananth@codeaurora.org>
Signed-off-by: Gauri Joshi <gaurjosh@codeaurora.org>
2021-06-24 19:17:07 -07:00
Gauri Joshi
485572902c msm: mhi-dev: Send channel state broadcasts for QRTR channels
Set the channel attribute for QRTR channels (MHI_CLIENT_IPCR_OUT
and MHI_CLIENT_IPCR_IN) so that QRTR client gets the uevent
broadcast when the channel state changes. Change the naming
for the structure to mhi_chan_attr_table since kernel clients are
also configured using the same structure.

Change-Id: I40232a09c27d7410d772055448d0354fb0c359b1
Signed-off-by: Gauri Joshi <gaurjosh@codeaurora.org>
2021-06-24 18:04:51 -07:00
qctecmdr
234c300f15 Merge "irqchip: mpm: Add mpm mapping for Blair" 2021-06-24 07:09:05 -07:00
qctecmdr
fbb7d8a475 Merge "msm: kgsl: Use non-atomic snapshot memory if it is unused" 2021-06-24 02:40:06 -07:00
Sarthak Garg
d80149a113 mmc: sdhci-msm: Update TLMM_NORTH_SPARE register as per vdd_px2 supply
On blair some current leakage is seen wrt to vdd_px2 pads.
Pad team recommended to update bit 15 of TLMM_NORTH_SPARE register
which is mapped to core_ie bit of SDC2 pads to avoid this leakage.

As per blair TLMM HPG, recommendation is to write 0/1 to
TLMM_NORTH_SPARE register before turning off/after turning ON vdd_px2.

Change-Id: I7aaecd93de86f5d5b9af57656ac85e36b2d519fb
Signed-off-by: Sarthak Garg <sartgarg@codeaurora.org>
2021-06-24 13:21:00 +05:30
qctecmdr
8de6709364 Merge "pinctrl: qcom: Add blair tlmm spare registers" 2021-06-23 07:45:25 -07:00
qctecmdr
64c433fac3 Merge "msm: mhi: Send Ch cmd ack in async fashion" 2021-06-23 03:51:22 -07:00
qctecmdr
1d93666c90 Merge "SIP crash: Unregister Net sysctl as part of unloading the module" 2021-06-23 03:51:21 -07:00
qctecmdr
cff2da1a99 Merge "msm: mhi_dev: Poll for ipa_dma_disable during MHI suspend" 2021-06-23 03:51:21 -07:00
Mayank Grover
1711db1ab9 pinctrl: qcom: Add blair tlmm spare registers
Add support to enable access for tlmm spare registers
for blair.

Change-Id: I250c0fd796ca80e019c6d5732394817c7527cc1c
Signed-off-by: Mayank Grover <groverm@codeaurora.org>
2021-06-22 22:07:38 -07:00
Mayank Grover
51d46d049b drivers: pinctrl: Add support to access tlmm spare registers
Add support to read and write SPARE registers in TLMM block.

Change-Id: I6426b86510256983b509c5f48c2ab02f80b48ef8
Signed-off-by: Mayank Grover <groverm@codeaurora.org>
2021-06-22 22:07:20 -07:00
qctecmdr
f1515a9025 Merge "camera: add camera headers into exclude list" 2021-06-22 21:39:12 -07:00
Manoharan Vijaya Raghavan
aead58632e net: qrtr: ns: Fix Announce services for all nodes
ns service was notifying only local node ID services after
a pci disconnect and reconnect. Fix it to iterate over all
nodes and announce services of all nodes.

Change-Id: I4f91a71ad847b815318a7de47134f6b9c57dff53
Signed-off-by: Manoharan Vijaya Raghavan <mraghava@codeaurora.org>
2021-06-22 20:14:57 -07:00
Manoharan Vijaya Raghavan
f1cc6d4bb6 arm: defconfig: Fix qrtr node id conflict for sdx65
The default Node ID 1 has conflict, as node ID 1 is being used
in IPQ-RC too. Hence fix the Node ID to be 2, (similar to sdx55).

Change-Id: I887b6523119531158e33d706b3b9fca2281d9bf5
Signed-off-by: Manoharan Vijaya Raghavan <mraghava@codeaurora.org>
2021-06-22 20:14:51 -07:00
Manoharan Vijaya Raghavan
0fb619aac4 arm: defconfig: Enable QRTR over MHI device
Enable QRTR over MHI device.

Change-Id: Ie34e0ca68346bd1370c55d3fcbb3d4ba44dc6cae
Signed-off-by: Manoharan Vijaya Raghavan <mraghava@codeaurora.org>
2021-06-22 20:14:43 -07:00
Arun Prakash
2c04602122 net: qrtr: mhi_dev: Handle mhi register error case
Handle -EEXIST error case while register state callback
with mhi device. If channel is open during registration
no callback will issue instead mhi stack return -EEXIST
to notify the client. Further state change notification
will be informed via registered callback.

commit net: qrtr: mhi_dev: Handle mhi register error case
(f1eeca90b18b7).

Change-Id: Icf60de35d23393a0808ef90058c1108e950d02b9
Signed-off-by: Arun Prakash <app@codeaurora.org>
Signed-off-by: Manoharan Vijaya Raghavan <mraghava@codeaurora.org>
2021-06-22 20:14:03 -07:00
Arun Kumar Neelakantam
d7842ded91 qrtr: mhi-dev: Wait for RX channel to be enumerated
Registering only for endpoint RX channel to complete enumeration and
starting to open both RX/TX channels leads to race condition on TX channel.
Since the host does TX followed by RX init.

Wait for endpoint TX channel init to synchronise with host.

commit qrtr: mhi-dev: Wait for RX channel to be enumerated
(5593a67ad0546).

Change-Id: Ied002a89b51f71fa30cb7557f7dce27cfe1fd202
Signed-off-by: Sricharan R <sricharan@codeaurora.org>
Signed-off-by: Arun Kumar Neelakantam <aneela@codeaurora.org>
Signed-off-by: Manoharan Vijaya Raghavan <mraghava@codeaurora.org>
2021-06-22 20:13:57 -07:00
Siddartha Mohanadoss
74ac2ceb7f msm: mhi_dev: Update release function in MHI
After MHI device receives a reset command the internal
state machine suspends all activity on the channel and
processes the device reset. Clients are notified on
the channel close. Existing close function checks if
there are pending data to be read but since the device
is in the process of cleaning the transfer buffers
and the channels are suspended this check is not required.

commit msm: mhi_dev: Update release function in MHI
(6772e50d7b8fc).

Change-Id: Iafc5249762b1468ee2cca4ac141522ce0356d403
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
Signed-off-by: Manoharan Vijaya Raghavan <mraghava@codeaurora.org>
2021-06-22 20:13:51 -07:00