Commit Graph

1111418 Commits

Author SHA1 Message Date
qctecmdr
4e7a5df7d7 Merge "soc: qcom: Porting VM TLMM access driver for pineapple" 2022-08-12 21:20:25 -07:00
qctecmdr
19ad73622c Merge "gunyah: rm: Adding vm resource manager related drivers for pineapple" 2022-08-12 21:20:25 -07:00
qctecmdr
074ad97ebc Merge "pinctrl: Adding vm related pinctrl changes for pineapple" 2022-08-12 21:20:25 -07:00
qctecmdr
ec7da86053 Merge "modules.list.msm.pineapple: adding vm related drivers" 2022-08-12 19:19:10 -07:00
qctecmdr
cf6c961594 Merge "gunyah: Adding basic initial files needed for vm on Pineapple" 2022-08-12 19:19:10 -07:00
qctecmdr
7f51ff3bbe Merge "msm-kernel: add keygen to generate key-pair using openssl" 2022-08-12 19:19:10 -07:00
qctecmdr
51f53208c0 Merge "swiotlb: Handle swiotlb region outside of linear-mapped memory" 2022-08-12 19:19:09 -07:00
qctecmdr
022abff7a7 Merge "arm64: defconfig: kalama: Enable necessary drivers for Kalama" 2022-08-12 17:16:30 -07:00
qctecmdr
b54d798dfa Merge "pinctrl: qcom: Propagate set of changes to pinctrl-msm" 2022-08-12 17:16:29 -07:00
qctecmdr
fcd1028dbb Merge "gunyah: msgq: Porting messageq driver to pineapple" 2022-08-12 17:16:28 -07:00
Peng Yang
82023d3f20 modules.list.msm.pineapple: adding vm related drivers
Adding vm related drivers to modules list and symbols
for pineapple.

Change-Id: Ic6d2402c0c77c0d303bdfae67d3559a5736c0765
Signed-off-by: Peng Yang <quic_penyan@quicinc.com>
2022-08-11 20:25:54 -07:00
Peng Yang
9bdb8793f4 msm-kernel: add keygen to generate key-pair using openssl
Module signing and dm-verity needs key pair to be generated
using openssl. Add keygen file which is needed to generate
keys using openssl.

This is just snapshot of kalama's gh_ctrl driver from
'commit 5beb98404269 ("Merge "i3c: i3c-master-msm-geni: Fix
IBI for invalid device OR handler"")'from msm-5.15 branch.

Change-Id: I6d785f2a1695bf59969b7eba4f3f7a5df6342bf9
Signed-off-by: Peng Yang <quic_penyan@quicinc.com>
2022-08-11 19:59:10 -07:00
Sreenad Menon
b18abf055d swiotlb: Handle swiotlb region outside of linear-mapped memory
Porting "swiotlb: Handle swiotlb region outside of linear-mapped memory"
(Commit ID:cf0e9880897f635a2422a4479f498fcbc5b8468e)from msm-5.10.

Change-Id: I9bb5297994ac1a75c45f91b4a45969b9bf9bdb27
Signed-off-by: Sreenad Menon <sreemeno@codeaurora.org>
Signed-off-by: Peng Yang <quic_penyan@quicinc.com>
2022-08-11 19:29:26 -07:00
Peng Yang
08ba873b76 soc: qcom: Porting VM TLMM access driver for pineapple
Adding VM TLMM access driver for pineapple.

This is just snapshot of kalama's TLMM access driver from
'commit 5beb98404269 ("Merge "i3c: i3c-master-msm-geni: Fix
IBI for invalid device OR handler"")'from msm-5.15 branch.

Change-Id: Ifb567fbbd1bee5e3265f88592a3dedb45c693ecd
Signed-off-by: Peng Yang <quic_penyan@quicinc.com>
2022-08-11 08:14:52 -07:00
Peng Yang
07219d4f2b gunyah: Adding basic initial files needed for vm on Pineapple
Adding basic library, Kconfig, make and arch specific files
needed for vm on Pineapple.

This is just snapshot of kalama's basic initial files from
'commit 5beb98404269 ("Merge "i3c: i3c-master-msm-geni: Fix
IBI for invalid device OR handler"")'from msm-5.15 branch.

Change-Id: I958bcbda1136fb7b7e6d957f303af8cf7773322e
Signed-off-by: Peng Yang <quic_penyan@quicinc.com>
2022-08-10 23:11:03 -07:00
Peng Yang
4b03d7f62b gunyah: rm: Adding vm resource manager related drivers for pineapple
This is just snapshot of kalama's vm rm driver from
'commit 5beb98404269 ("Merge "i3c: i3c-master-msm-geni: Fix
IBI for invalid device OR handler"")'from msm-5.15 branch.

Change-Id: Ie7c45b6a96a2ec390a73b7347d4bff8bd88d0350
Signed-off-by: Peng Yang <quic_penyan@quicinc.com>
2022-08-10 23:06:58 -07:00
Peng Yang
213f1c589f gunyah: msgq: Porting messageq driver to pineapple
This is just snapshot of kalama's vm msgq driver from
'commit 5beb98404269 ("Merge "i3c: i3c-master-msm-geni: Fix
IBI for invalid device OR handler"")'from msm-5.15 branch.

Change-Id: I1eb3e01ebf7229f3c35bd8bc6782e80498a2db5e
Signed-off-by: Peng Yang <quic_penyan@quicinc.com>
2022-08-10 23:06:53 -07:00
Peng Yang
4bd7265ed2 gunyah: dbl: Porting doorbell driver pineapple
This is just snapshot of kalama's vm doorbell driver from
'commit 5beb98404269 ("Merge "i3c: i3c-master-msm-geni: Fix
IBI for invalid device OR handler"")'from msm-5.15 branch.

Change-Id: I6445cab51bc03d6a18ac11faa206979b659e5ef7
Signed-off-by: Peng Yang <quic_penyan@quicinc.com>
2022-08-10 23:06:47 -07:00
Peng Yang
b73b5f735b pinctrl: Adding vm related pinctrl changes for pineapple
Adding pinctrl related changes for pineapple vm.

Change-Id: Ifef2b38affea583dd2d08dfaf290f971a1d9c6e6
Signed-off-by: Peng Yang <quic_penyan@quicinc.com>
2022-08-10 04:39:14 -07:00
Huang Yiwei
d697a03532 arm64: defconfig: kalama: Enable necessary drivers for Kalama
Enable necessary drivers for Kalama, and add these modules to
kalama module list file.

Change-Id: Ida864dce76ec0494942acbe58398d5d839be09e2
Signed-off-by: Huang Yiwei <quic_hyiwei@quicinc.com>
2022-08-10 17:16:26 +08:00
Chris Lew
b7c0a63b43 rpmsg: glink: Add wakeup information
Add a function to query the glink core layer on whether a packet has
caused a wakeup. This function also takes a parameter to specify if the
wakeup state should be reset after reading the variable.

Add print to log the wakeup packet for glink interrupts. Some channels
such as IPCRTR will already reset the wakeup info state and print their
own messages. This print is meant to be a default print for all other
channels.

Change-Id: Iff7ff4e08d595c63f1c6924b77436b8edf261485
Signed-off-by: Chris Lew <quic_clew@quicinc.com>
2022-08-10 01:43:53 -07:00
Deepak Kumar Singh
f6cbe27c1f rpmsg: glink: Use IRQF_NO_SUSPEND and pm_system_wakeup() for glink irq
Glink irq should be wakeup capable, to achieve this irq is marked
with enable_irq_wake().

There are some use cases where glink communication is required in system
suspend path and glink interrupt handler needs to be run immediately.
But wakeup cpabale interrupts even if received during suspend will not
run immediately, this will be marked pending and run when system resumes
from suspend. In such scenario there can be a potential deadock in suspend
path due to any irq thread which is waiting for glink interrupt completion
while glink interrupt cannot be handled immediately.

One such use case is usb plugin interrupt received during suspend, which
calls regulator api to communicate with rpm over glink and waits for rpm
ack. RPM ack cannot be processed because glink interrupt received from rpm
goes in pending state. Suspend path is blocked because regulator irq thread
is still waiting.

So there is requirement to run glink interrupt handler in suspend path at
the same time making it wakeup capable. IRQ frameworks forbids usage of
both IRQF_NO_SUSPEND and enable_irq_wake() together. This patch adds
IRQF_NO_SUSPEND and pm_system_wakeup() for glink irq to implement this
requirement.

Change-Id: I1da199c9e10c640bb84d00e569c4fafc5c104d24
Signed-off-by: Deepak Kumar Singh <deesin@codeaurora.org>
2022-08-10 01:43:52 -07:00
Jay Jayanna
a34dacf4c7 rpmsg: glink: Modify fifo reset order
Glink pipe indices are reset by apps in the remoteproc
subdev stop path. There is a chance that the remote that
is being shutdown is in the middle of reading from the
pipe. This causes the remote that is shutting down
gracefully to crash as index 0 is invalid.

Remove the fifo reset from the remoteproc subdev stop
path. Register a function pointer with remoteproc for the
subdev to be called during prepare stage of ssr. Split
the glink probe to have pipes initialization, rx thread
creation and setting up glink structures happen in prepare
stage and version negotiation and char device creation in
prepare stage.

Given that the pipes get re-initialized during prepare
stage, the fifo indices will be intact until after the
remote has been shutdown completely and reset before the
remote is up again.

Spliting glink probe to prepare (in BEFORE_POWERUP) and
start (in AFTER_POWERUP) stage in spss results in glink
link up callback arriving earlier on spss when one of the
destination services is not yet created. This results in
spss not finishing the boot flow after ssr.

Adding glink fifo reset to be called as part of BEFORE_SHUTDOWN
if the underlying driver has callbacks setup for it as is the
case in spss rpmsg driver.

Change-Id: I74cae7ce49cb212af9e7ec2391956339c3427aec
Signed-off-by: Jay Jayanna <jayanna@codeaurora.org>
2022-08-10 01:43:52 -07:00
Deepak Kumar Singh
466924d268 rpmsg: glink: reset read/write index after ssr
While system is going down fifo index are not reset which can
cause remote subsystem to read stale index.

Now resetting the index while system is going down.

CRs-Fixed: 2543040
Change-Id: Icb4010c120f4735da206a44a4eb1bcf06ae0a1b7
Signed-off-by: Deepak Kumar Singh <deesin@codeaurora.org>
2022-08-10 01:43:51 -07:00
Chris Lew
a2420135bd rpmsg: glink: Add pipe reset functionality
Some remote procs do not initialize the pipe when they are started
and assume the data in the pipe descriptors is valid. Add an optional
handler to clear the pipe descriptors and call this during removal
of the glink device to ensure a clean restart of glink.

Change-Id: I62871cc5d6fd052e234843645299fdc87a71185f
Signed-off-by: Chris Lew <clew@codeaurora.org>
2022-08-10 01:43:50 -07:00
Chris Lew
1b8b9571dd rpmsg: glink: Add early reset notifier
Currently when a remote subsystem goes down, remove_subdev will be
called from rproc for removing that subsystem from the list, but
this could be too late. Register for early SSR notifications for
getting notified about before shutdown, so that the glink_send calls
to the dead processor will not get blocked.

Change-Id: Ief7f90caf69f2855272579bc63140837e0efc447
Signed-off-by: Chris Lew <quic_clew@quicinc.com>
2022-08-10 01:43:50 -07:00
Deepak Kumar Singh
1332236bd1 rpmsg: glink: wait for intent request completion
Wait for actul intent allocation to complete before again requesting
for same intent. Currently on getting intent request ack glink looks
for allocated intent and if it is not found it again requests.

In some cases remote host may delay allocation of intents but acknowledge
it immediately, in such cases glink will keep on requesting same intent
repeatedly. Now added code to wait for actual intent allocation to complete
and timeout if it is not allocated within 10 sec.

Change-Id: I346eb207422450cbeedc94e6451c6491bbf58bf0
Signed-off-by: Deepak Kumar Singh <deesin@codeaurora.org>
2022-08-10 01:43:49 -07:00
Chris Lew
ca10e48d38 rpmsg: glink: Add reset status
Add a status for remote processor reset. Change the intent completion
variable to a waitqueue to check both intent request completion and
processor reset status. This allows rpmsg to cancel threads that are
waiting to send to the remote procssor.

Change-Id: Ic43a8d836f347ab26daec7f906a9a1b0f585a549
Signed-off-by: Chris Lew <clew@codeaurora.org>
2022-08-10 01:43:48 -07:00
Deepak Kumar Singh
a35460ef6d rpmsg: glink: mark intent request complete before wake up
Channel release function is not making intent wait condition true
before calling wake_up, due to this thread waiting on intent is
stuck and does not wake up until timeout happens. By this time
channel context is freed and this casues finish wait to fail due
to access of wait queue in freed channel context.

Mark intent request complete before calling wake_up.

CRs-Fixed: 2914979
Change-Id: Ia4162c9e62f0f5a7bd04ca0e09c2cd58319ef341
Signed-off-by: Deepak Kumar Singh <deesin@codeaurora.org>
2022-08-10 01:43:47 -07:00
Deepak Kumar Singh
d1167202e6 rpmsg: glink: smem: validate index before fifo read write
We are not validating head and tail index of tx and rx fifo
before using to read or write fifo. This can result in out of
bound memory access if head and tail have incorrect values.

This patch adds check for validation of head and tail index.

CRs-Fixed: 2398099
Change-Id: Ia8725a731cc7a45f7e13b09e1e62842ff44d53f3
Signed-off-by: Deepak Kumar Singh <deesin@codeaurora.org>
2022-08-10 01:43:47 -07:00
Deepak Kumar Singh
db10576a4e rpmsg: glink: check channel state before serving intent
Receive callback can be registered even before rpmsg driver probe is
complete. Assuming callback register as channel ready and allowing
remote host to send data is incorrect. In such case for any rx packet
callback may return prematurely thereby dropping the rx packet.

Adding a flag to store channel state when it is ready. Check this flag
before allocating rx intent and allowing data communication to proceed.
It will ensure that client driver is able to receive data correctly,
without any rx packet getting dropped.

CRs-Fixed: 2747216
Change-Id: Ib153cfe5689f31d7417622bf6177e9535fda628a
Signed-off-by: Deepak Kumar Singh <deesin@codeaurora.org>
Signed-off-by: Sarannya S <sarannya@codeaurora.org>
2022-08-10 01:43:46 -07:00
Deepak Kumar Singh
0484a3f755 rpmsg: glink: do not serve intent request if no callback present
Sometime remote may try to send packet before receive callback is
assigned. Which can result in dropping of packets on apps.

Acknowledge intent request but queue the intent only when receive
callback assignment is complete.

Change-Id: Ie366c24e204db7f1609e2345ee3324cb00f56f3e
Signed-off-by: Deepak Kumar Singh <deesin@codeaurora.org>
Signed-off-by: Sarannya S <sarannya@codeaurora.org>
2022-08-10 01:43:45 -07:00
Arun Prakash
83a9210562 rpmsg: glink: Append glink irq name with remote edge name
Glink irq for all the remote edges are registered with same name
glink-native. It is difficult to distinguish each irq in logs.

Appending remote edge name to generic irq name.

Change-Id: I6ead87e0e4adae204535b599d07d9471387c861b
Signed-off-by: Deepak Kumar Singh <deesin@codeaurora.org>
Signed-off-by: Arun Prakash <app@codeaurora.org>
2022-08-10 01:43:45 -07:00
Konstantin Dorfman
0174e84b16 rpmsg: glink: fix destroy channel endpoint logic
When rpmsg client driver destroys last channel endpoint, remove rpmsg
device is triggered. In both cases (destroy endpoint and remove device)
a glink close command sent to the remote peer.

This change, when for removing rpmsg device endpoint already destroyed
will avoid sending second glink close command.

Change-Id: I0135e2626f4ede7a380308944f7c273d18e223bf
Signed-off-by: Konstantin Dorfman <kdorfman@codeaurora.org>
2022-08-10 01:43:44 -07:00
Chris Lew
4e40649bf5 rpmsg: glink: Fix print format
Use unsigned to print u32 cid in qcom_glink_handle_intent_req.

Change-Id: I314f4a298f9598b07e4a79aa6e13984edb3faacf
Signed-off-by: Chris Lew <quic_clew@quicinc.com>
2022-08-10 01:43:43 -07:00
Chris Lew
d154840818 rpmsg: glink: Deny intent request if reusable intent fits
In high traffic scenarios a remote may request extra intents to send
data faster. If the work thread that handles these intent requests is
starved of cpu time, then these requests can build up. Some remote
procs may not be able to handle this burst of built up intent requests.

In order to prevent intent build up, deny intent requests that can be
fulfilled by default intents that are reusable.

Change-Id: I0932b458eb5694bdd5f92f1b4dc19b578da1e4da
Signed-off-by: Chris Lew <clew@codeaurora.org>
2022-08-10 01:43:43 -07:00
Arun Kumar Neelakantam
74f8e34b7b rpmsg: glink: Fix use after free of channel refcount
Channel reference count is used after free in case of channel
is not fully opened due to errors and SSR happens.

Remove the channel ID from glink LCID list for last reference to
avoid re-using the stale pointer from LCID list.

Change-Id: Ibe2627444d42ef12860bdec36f147b01128cdf11
Signed-off-by: Arun Kumar Neelakantam <aneela@codeaurora.org>
2022-08-10 01:43:42 -07:00
Huang Yiwei
c8b26e5cc3 pinctrl: qcom: Propagate set of changes to pinctrl-msm
This is a propagated change from msm-5.15 commit
<1609011c5e34> ("Merge "msm: adsprpc: Prevent use after
free in fastrpc_invoke_send"") to pinctrl-msm.

Change-Id: If5425df87d74f1c0bcd21556a00517042b009075
Signed-off-by: Huang Yiwei <quic_hyiwei@quicinc.com>
2022-08-10 16:08:58 +08:00
Mayank Rana
2ebc3bd454 usb: repeater: Add USB repeater framework and QTI PMIC repeater driver
This snapshot change adds USB repeater framework and QTI PMIC repeater
driver based on msm-5.15 commit fe7c349e2299 ("Merge "va_minidump: Add
md_unregister support for clients"").

Change-Id: Ife7240927c434232d3332c5ff4a001d83a37e4b6
Signed-off-by: Mayank Rana <quic_mrana@quicinc.com>
2022-08-10 15:40:13 +08:00
Peter Zijlstra
d41dcee41c um: Add missing apply_returns()
Implement apply_returns() stub for UM, just like all the other patching
routines.

Change-Id: I8aaed955019480f0b5a7a7330a13c7200d48365c
Fixes: 15e67227c4 ("x86: Undo return-thunk damage")
Reported-by: Randy Dunlap <rdunlap@infradead.org)
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lore.kernel.org/r/Ys%2Ft45l%2FgarIrD0u@worktop.programming.kicks-ass.net
Git-Repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Git-Commit: 564d998106
Signed-off-by: Maria Yu <quic_aiquny@quicinc.com>
2022-08-10 15:38:07 +08:00
qctecmdr
e1293cbd23 Merge "android: abi_gki_aarch64_qcom: Add symbols for qcom-cpufreq-hw" 2022-08-04 16:04:34 -07:00
Mike Tipton
7bdcae89ab android: abi_gki_aarch64_qcom: Add symbols for qcom-cpufreq-hw
Add symbols required by the qcom-cpufreq-hw driver.

Change-Id: Ib61b7ffd65ef5372c91574181b55ef3460593729
Signed-off-by: Mike Tipton <quic_mdtipton@quicinc.com>
2022-08-04 12:03:19 -07:00
qctecmdr
d3dfac1068 Merge "arm64: defconfig: Enable IPCC driver for pineapple" 2022-08-03 18:45:13 -07:00
qctecmdr
52ddaaf81a Merge "rpmsg: glink: Try to send rx done in irq" 2022-08-03 16:00:29 -07:00
qctecmdr
25f6e27b02 Merge "coresight: add support to enable multiple coresight paths" 2022-08-02 23:04:25 -07:00
qctecmdr
de6f651f77 Merge "msm: geni: common: Add common driver for pineapple" 2022-08-02 23:04:21 -07:00
qctecmdr
7ac54099d9 Merge "soc: qcom: Add snapshot of EUD driver" 2022-08-02 23:04:19 -07:00
qctecmdr
638ce6edcc Merge "phy: qcom: Add UFS PHY driver snapshot for Kalama" 2022-08-02 21:17:12 -07:00
qctecmdr
bbae521c59 Merge "interconnect: qcom: Add interconnect snapshot for Kalama SoC" 2022-08-02 19:31:15 -07:00
qctecmdr
024bc9c25b Merge "drivers: clk: Add clock controller snapshot for Kalama SoC" 2022-08-02 19:31:13 -07:00