Commit graph

899,680 commits

Author SHA1 Message Date
Linux Build Service Account
367fb88df6 Merge "smcinvoke: Add retry mechanism for scm calls" 2021-07-14 02:51:12 -07:00
Gerrit - the friendly Code Review server
ac9d07b28e Merge changes into kernel.lnx.5.4.r1-rel 2021-07-13 13:38:06 -07:00
Linux Build Service Account
e96e5d2ed7 Merge "soc: qcom: Return correct error code when program_key fails fails" 2021-07-13 09:05:36 -07:00
Linux Build Service Account
d1cce4f6ba Merge "usb: gadget: Restart USB session if start xfer fails for ep0" 2021-07-13 09:05:34 -07:00
Linux Build Service Account
32086a6e54 Merge "sched: Improve the scheduler" 2021-07-13 09:05:18 -07:00
Vaibhav Agrawal
85d2cfc357 soc: qcom: Return correct error code when program_key fails fails
When we call crypto_qti_program_key to program the key, and
it fails due to trustzone busy issue, we try to call invalidate
key method just after that, and in the process, overwrite the
error code returned by the program key failure. Fix this by handling
the errors from both program key and invalidate key separately,
and return the program key error code to caller.

Test: Verified device boot up and reboot.

Change-Id: Iaff0844f68b4886c23e1840d7e0e4a404d38fc96
Signed-off-by: Vaibhav Agrawal <vagrawa@codeaurora.org>
2021-07-13 00:54:14 -07:00
Pratham Pratap
edc887f787 usb: gadget: Restart USB session if start xfer fails for ep0
Currently driver is just proceding further if start xfer times
out for ep0. Start xfer failing for ep0 indicates that the
controller is already in bad state and it can access unmapped
address leading to SMMU fault. Prevent this by marking this as
an error event and restart USB session.

Change-Id: Ia46387e16a79318ad945079ced7209a8f2bf47ef
Signed-off-by: Pratham Pratap <prathampratap@codeaurora.org>
2021-07-13 00:54:07 -07:00
Lingutla Chandrasekhar
f620062dd6 sched: Improve the scheduler
This change is for general scheduler improvements.

Change-Id: I37d6cb75ca8b08d9ca155b86b7d71ff369f46e14
Signed-off-by: Lingutla Chandrasekhar <clingutla@codeaurora.org>
2021-07-13 00:53:58 -07:00
Vivek Pernamitta
c513eaa708 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-07-13 00:53:50 -07:00
Anmolpreet Kaur
69f3574313 smcinvoke: Add retry mechanism for scm calls
This chage adds retry mechanism to smcinvoke driver
in case when secure side is busy. Driver will wait for
30 milliseconds before retrying the scm call. This
change also makes smcinvoke driver at par with qseecom
in terms of trying for around 2 seconds before sending
EBUSY error back to client.

Change-Id: Ie9523bc81f3aa03497836f06180c9d3f8a8efc99
Signed-off-by: Anmolpreet Kaur <anmolpre@codeaurora.org>
2021-07-13 00:52:27 -07:00
Linux Build Service Account
b82eb1e1fa Merge 774e901388 on remote branch
Change-Id: Ibc8c93267cfdd3c78c80d62bdb38a2b10607f62f
2021-07-09 08:49:52 -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
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
Linux Build Service Account
f384908791 Merge "Revert "block: Enable BFQ io scheduler as default"" 2021-06-25 08:17:19 -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
Pradeep P V K
bd01babc4a 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-25 05:16:51 -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
Jeya R
4740816ec3 msm: adsprpc: Handle ramdump collection
Collect the ram dumps when process is
initialized and process is not cleaned
on DSP to fix UAF on init memory.

Change-Id: I3ddae176039efa57e057eca730e7ed1cec706484
Acked-by: Krishnaiah Tadakamalla <ktadakam@qti.qualcomm.com>
Signed-off-by: Jeya R <jeyr@codeaurora.org>
2021-06-24 05:41:26 -07:00
qctecmdr
fbb7d8a475 Merge "msm: kgsl: Use non-atomic snapshot memory if it is unused" 2021-06-24 02:40:06 -07:00
qctecmdr
8de6709364 Merge "pinctrl: qcom: Add blair tlmm spare registers" 2021-06-23 07:45:25 -07:00
Linux Build Service Account
12398f32a8 Merge 91a7f066e1 on remote branch
Change-Id: I826320b3aa563dabb7d6bfa1b5bc2f4ee5cd2b76
2021-06-23 05:14:20 -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
Sricharan R
f1b60eb496 net: qrtr: mhi_dev: Only post valid data
mhi_dev_read_channel returns the number of bytes read. Do not post a
packet to qrtr if the length returned is 0. This prevents an issue
where qrtr receives duplicates packets from the mhi_dev transport.

commit net: qrtr: mhi_dev: Only post valid data
(b4451ceb04138).

Change-Id: Ib1a31665730293baa9af61a9ae61bd8bdf6cab6f
Signed-off-by: Sricharan R <sricharan@codeaurora.org>
Signed-off-by: Chris Lew <clew@codeaurora.org>
Signed-off-by: Manoharan Vijaya Raghavan <mraghava@codeaurora.org>
2021-06-22 20:13:41 -07:00
Jay Jayanna
66aeb46272 net: qrtr: Loop on mhi_dev_read_channel until it returns 0
qrtr_mhi_dev_event_cb will be called only once if there is
more than one packet at that time. Hence, call mhi_dev_read_channel
in a loop until it returns zero.

commit net: qrtr: Loop on mhi_dev_read_channel until it returns 0
(1a79f2584ef87).

Change-Id: I2f171cb45e66c1c439fcc7d0027c22d0edb4fb19
Signed-off-by: Jay Jayanna <jayanna@codeaurora.org>
Signed-off-by: Manoharan Vijaya Raghavan <mraghava@codeaurora.org>
2021-06-22 20:13:34 -07:00
Chris Lew
c571936778 net: qrtr: Change the in and out channels
MHI's IN channel is QRTR's OUT channel and vice-versa.

commit net: qrtr: Change the in and out channels
(5c9c165066de0).

Change-Id: If16790e629263cfa2787a08326c079b58f42617b
Signed-off-by: Chris Lew <clew@codeaurora.org>
Signed-off-by: Manoharan Vijaya Raghavan <mraghava@codeaurora.org>
2021-06-22 20:13:25 -07:00
Chris Lew
ea25f63fe3 net: qrtr: Add support for a mhi device transport
Add a transport that uses the mhi device APIs. The mhi device APIs are
used to transfer data from a device to the host over MHI. The modem
will generally be configured as a device and this transport is intended
to be used on the modem controller co-processor.

commit net: qrtr: Add support for a mhi device transport
(89754e5ed45dd).

Change-Id: Ie9276fe6c0846581192aff881e59baa5fecf1ca4
Signed-off-by: Chris Lew <clew@codeaurora.org>
Signed-off-by: Manoharan Vijaya Raghavan <mraghava@codeaurora.org>
2021-06-22 20:11:47 -07:00
Nitesh Gupta
29c57b487a msm: mhi_dev: Poll for ipa_dma_disable during MHI suspend
Poll for ipa_dma_disable prior to entering mhi suspend, until it returns
success. this is to prevent IPA disable failure in case on
pending transfers.

Change-Id: I38143284447b86ce34c47e100e6fe0c23cf28f0b
Signed-off-by: Subramanian Ananthanarayanan <skananth@codeaurora.org>
Signed-off-by: Nitesh Gupta <nitegupt@codeaurora.org>
Signed-off-by: Gauri Joshi <gaurjosh@codeaurora.org>
2021-06-22 10:47:08 -07:00
Vijay Patil
7b6c37ada2 icnss2: Enhance debugging information
Print subsystem notify event string for wpss & modem instead of
event code. Print proper file type in log while downloading BDF
and REGDB file. Log the error immediately if request_firmware
API get fail.

Change-Id: I32a07895faf2bce640e0bfe89e348c36b02c5150
Signed-off-by: Vijay Patil <vijaylil@codeaurora.org>
2021-06-22 04:44:26 -07:00
Linus Torvalds
67ac2d6862 Fix root mounting with no mount options
The "trivial conversion" in commit cccaa5e33525 ("init: use do_mount()
instead of ksys_mount()") was totally broken, since it didn't handle the
case of a NULL mount data pointer and while I had "tested" it (and
presumably Dominik had too) that was hidden by me having options.

Change-Id: I2b1db7b68e0e398ce803da40b37595c286c97d9c
Cc: Dominik Brodowski <linux@dominikbrodowski.net>
Cc: Arnd Bergmann <arnd@arndb.de>
Reported-by: Ondřej Jirman <megi@xff.cz>
Reported-by: Guenter Roeck <linux@roeck-us.net>
Reported-by: Naresh Kamboju <naresh.kamboju@linaro.org>
Reported-and-tested-by: Borislav Petkov <bp@suse.de>
Tested-by: Chris Clayton <chris2553@googlemail.com>
Tested-by: Eric Biggers <ebiggers@kernel.org>
Tested-by: Geert Uytterhoeven <geert@linux-m68k.org>
Tested-by: Guido Günther <agx@sigxcpu.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Git-commit: 7de7de7ca0ae0fc70515ee3154af33af75edae2c
Git-repo: https://github.com/torvalds/linux.git
[pragalla@codeaurora.org:fix merge conflicts and port changes to 5.4 kernel]
Signed-off-by: Pradeep P V K <pragalla@codeaurora.org>
2021-06-22 15:51:46 +05:30
Dominik Brodowski
6dcfbd35bd init: use do_mount() instead of ksys_mount()
In prepare_namespace(), do_mount() can be used instead of ksys_mount()
as the first and third argument are const strings in the kernel, the
second and fourth argument are passed through anyway, and the fifth
argument is NULL.

In do_mount_root(), ksys_mount() is called with the first and third
argument being already kernelspace strings, which do not need to be
copied over from userspace to kernelspace (again). The second and
fourth arguments are passed through to do_mount() anyway. The fifth
argument, while already residing in kernelspace, needs to be put into
a page of its own. Then, do_mount() can be used instead of
ksys_mount().

Once this is done, there are no in-kernel users to ksys_mount() left,
which can therefore be removed.

Change-Id: Ie21248b26e4a98796e092e20c9b8cb8126dc5eee
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Patch-mainline: linux-kernel@vger.kernel.org @ 12/12/2019, 14:57
[pragalla@codeaurora.org:fix merge conflicts and port changes to 5.4 kernel]
Signed-off-by: Pradeep P V K <pragalla@codeaurora.org>
2021-06-22 15:51:41 +05:30
qctecmdr
1afca709b6 Merge "msm: mhi-dev: Add support for AIO write API" 2021-06-21 21:13:27 -07:00
qctecmdr
c45fc80a7b Merge "spi: spi-msm-geni: Unset GSI mode flag if TVM usage is active" 2021-06-21 21:13:26 -07:00
qctecmdr
dab6ccdaf9 Merge "interconnect: qcom: holi: Configure QoS during probe" 2021-06-21 21:13:26 -07:00