Commit Graph

1127939 Commits

Author SHA1 Message Date
qctecmdr
ceee550247 Merge "msm_perf: fix warnings to enable msm_perf" 2022-10-17 12:13:10 -07:00
qctecmdr
3b97072e7f Merge "msm_perf: Handle out of bounds case" 2022-10-17 12:13:10 -07:00
qctecmdr
5c644f9800 Merge "msm_perf: check cpu_possible to improve stability" 2022-10-17 12:13:09 -07:00
qctecmdr
218f50a039 Merge "msm_perf: Update freq vote from UINT_MAX to FREQ_QOS_MAX_DEFAULT_VALUE" 2022-10-17 12:13:08 -07:00
qctecmdr
d2e12f2491 Merge "drivers: soc: msm_performance: Use pmu_lib to read pmu counters" 2022-10-17 12:13:08 -07:00
qctecmdr
78d49317e4 Merge "Revert "soc: qcom: Add snapshot of IPCC driver"" 2022-10-17 12:13:07 -07:00
qctecmdr
b350347ff8 Merge "net: qrtr: Add forwarding support based on net id" 2022-10-17 12:13:07 -07:00
qctecmdr
6f60b0843d Merge "defconfig: pineapple_tuivm: Add container configs" 2022-10-17 12:13:06 -07:00
qctecmdr
fac94f07d4 Merge "bus: mhi: devices: Fix number of arguments in API mhi_prepare_for_tranfer" 2022-10-15 21:06:26 -07:00
qctecmdr
4cab18afee Merge "bus: mhi: host: Enable and update IPC logging usage" 2022-10-15 21:06:25 -07:00
qctecmdr
6e308e1672 Merge "clk: qcom: clk-alpha-pll: Fix pll enable outout" 2022-10-14 13:36:41 -07:00
qctecmdr
5f267fb6b6 Merge "defconfig: pineapple-gki: Enable QCOM_SPSS and dependency" 2022-10-14 13:36:41 -07:00
qctecmdr
b87cea8461 Merge "slimbus: stream: add support to control port disconnect" 2022-10-14 13:36:41 -07:00
qctecmdr
e7af56b81b Merge "coresight: etm4x: Fetch device name in sysfs from device tree" 2022-10-14 13:36:40 -07:00
qctecmdr
748a67a29b Merge "soc: qcom: qcom_stats: Add API to get ddr freq information" 2022-10-14 13:36:39 -07:00
qctecmdr
fbff32ecf4 Merge "drivers: qcom: Add sys_pm_vx driver snapshot" 2022-10-14 13:36:38 -07:00
qctecmdr
915d25aab7 Merge "coresight: add support for device names" 2022-10-14 13:36:37 -07:00
qctecmdr
0a12785bd7 Merge "mem-buf: Exit mem_buf_lend_internal if the mem-buf not probed" 2022-10-14 13:36:37 -07:00
qctecmdr
6e89d3034b Merge "swiotlb: fix data abort on pineapple tuivm and oemvm" 2022-10-14 04:55:21 -07:00
qctecmdr
509c8ede30 Merge "bus: mhi: host: Move MHI_MAX_MTU to external header file" 2022-10-14 04:55:21 -07:00
qctecmdr
8680c038ee Merge "net: qrtr: ns: Add pr_fmt to ns" 2022-10-14 04:55:20 -07:00
qctecmdr
a097b57e48 Merge "build.config: kalama: Change Boot header version to 4" 2022-10-14 04:55:18 -07:00
Chris Lew
188c64d260 net: qrtr: Add forwarding support based on net id
Add support for QRTR to forward messages between network clusters. The
network subnet id's are attached to the QRTR subnodes in the MHI and
RPMSG/GLINK nodes.

The current forwarding decisions are done based on the net ids and are
wrapped in a single function for easier maintenance of forwarding
decisions later on. The function will return true once it determines
a subnet has no connection to another subnet.

The NEW_SERVER, DEL_SERVER, and DEL_CLIENT control messages should be
forwarded while the DATA and RESUME_TX commands should be passed along
to their destination node.

The nameservice is expected to send NEW_SERVER commands for it's entire
database instead of just the local service database with these changes.
This is to make sure new nodes get service notifications that came
earlier and were meant to be forwarded to the new node.

This change squashes the following commits from msm-4.14:
  commit e5f6a6769ceb ("net: qrtr: Add forwarding support based on net id")
  commit 4516ab18718d ("net: qrtr: avoid deadlock in case of recursive
                        lock for node list")
  commit dc2d47cd12d3 ("net: qrtr: Only update pkts with broadcast node
                        ID")
  commit 4277aebeff91 ("net: qrtr: Free skb if qrtr_node_lookup fails
                        during qrtr_fwd_pkt")

In addition fix minor format issues and update copyright.

Change-Id: Iaf01dd212b07dfbb13ec087ea0aae980cda7c2fd
Signed-off-by: Chris Lew <quic_clew@quicinc.com>
2022-10-13 15:05:29 -07:00
Kishore Sri venkata Ganesh Bolisetty
62a38c3321 msm_perf: fix warnings to enable msm_perf
Handle error checks in reading attributes.

Change-Id: I12b693e469b8a8de21a2bef36c92a012e5a2c034
Signed-off-by: Kishore Sri venkata Ganesh Bolisetty <quic_bsrivenk@quicinc.com>
2022-10-13 14:20:34 -07:00
Badri Sampath
d6a47b123a msm_perf: Handle out of bounds case
KASAN seems to be flagging that bool
would only be 1 byte while %du would
want to write 4 bytes leading to out
of bounds.

Change-Id: I0e43b1103b882bbd61b5a0bef231efcc3d7d1e1b
Signed-off-by: Badri Sampath <quic_badris@quicinc.com>
2022-10-13 14:20:19 -07:00
Gaurav Singh
19cb3f2ce4 msm_perf: check cpu_possible to improve stability
check cpu_possible to improve stability

Change-Id: I9ce3b5a5a6b1e846f44ffb9e255cc5b6b701b377
Signed-off-by: Gaurav Singh <quic_sgaurav@quicinc.com>
2022-10-13 14:19:36 -07:00
Varun Garg
4a2cd1d8e8 msm_perf: Update freq vote from UINT_MAX to FREQ_QOS_MAX_DEFAULT_VALUE
As QoS driver takes freq value in s32 format, updated the max
vote value to FREQ_QOS_MAX_DEFAULT_VALUE, instead of UINT_MAX.

Change-Id: I5152ac65a9513ce7cafe9f72bbffc499571a0768
Signed-off-by: Varun Garg <quic_gargv@quicinc.com>
2022-10-13 14:19:10 -07:00
Rishabh Bhatnagar
8c8deb070a drivers: soc: msm_performance: Use pmu_lib to read pmu counters
Go through pmu library to read/request perf counters for
msm_performance usecase.

Change-Id: Idfa83c6c7f18b8a85ff13992e3ff5cd65df50c10
Signed-off-by: Rishabh Bhatnagar <rishabhb@codeaurora.org>
2022-10-13 14:18:51 -07:00
Anvesh Salveru
ce345ff94d slimbus: stream: add support to control port disconnect
There is a requirement where slimbus slave don't expect ports
to be disconnected during stream unprepare for sample rates
other than 44.1/88.2k, which is causing mute issues.

Added new slim_stream_unprepare_disconnect_port API to support
disconnect port request from clients without freeing port memory
allocated during stream prepare.

Change-Id: Idb00a1fdf15d864cb6ee82f67c0db4777434b296
Signed-off-by: Anvesh Salveru <quic_asalveru@quicinc.com>
2022-10-12 20:47:39 -07:00
Huang Yiwei
d993f624e7 Revert "soc: qcom: Add snapshot of IPCC driver"
This reverts commit 5c4cca6534.
Since upstream IPCC driver is being used now, remove downstream
driver code.

Change-Id: Icb4bc6bb1bf5ce25b11f0e5b8d6d01d1d744e13d
Signed-off-by: Huang Yiwei <quic_hyiwei@quicinc.com>
2022-10-13 10:33:19 +08:00
Dennis Cagle
29fb6ea425 defconfig: pineapple_tuivm: Add container configs
Add configurations necessary for container framework

Change-Id: I5407bab5cf8e45bd6af8412576533b905a5f4b83
Signed-off-by: Dennis Cagle <quic_dcagle@quicinc.com>
2022-10-12 16:56:10 -07:00
Chris Goldsworthy
f484c0e648 mem-buf: Exit mem_buf_lend_internal if the mem-buf not probed
Exit with an error from mem_buf_lend_internal() if the driver hasn't
probed.

Change-Id: Ide42166c2f850197f989a228f9139d401411a914
Signed-off-by: Chris Goldsworthy <quic_cgoldswo@quicinc.com>
2022-10-11 20:31:32 -07:00
Chris Lew
453bbe3dbd rpmsg: glink: Add name functionality back
IPC logging and IRQ naming depend on the name variable in the glink
data structure. Add device tree name reading code that was removed
by upstream.

Change-Id: Id1c521d94b8a3c9557273d8f8b072e7e87a1b759
Signed-off-by: Chris Lew <quic_clew@quicinc.com>
2022-10-11 17:55:32 -07:00
Chris Lew
c742a81975 net: qrtr: Move tx_resume handling to work context
There will be non-atomic work associated with receiving the tx resume
packet from the remote. Move the handling to work function context in
preparation for the non-blocking socket blocking improvement.

In system heavy load cases the rx work queued in global worker queue is
getting delayed and causing clients request timeouts.

Create and use separate worker thread to process qrtr rx packets.

Change-Id: I2389bdcffba068258650bfbb579f8cb98a0ac928
Signed-off-by: Chris Lew <quic_clew@quicinc.com>
2022-10-11 13:41:27 -07:00
Chris Lew
ed4fba13e9 net: qrtr: Remove rcu logic for port lookup/remove
synchronize_rcu() is slow and can create delays on creating/removing
sockets.

Some clients have latency requirements for spinning off a
thread that creates a client and lookup sockets for some sessions. They
close the lookup socket during this sequence which causes delays. Each
call to synchronize_rcu takes 20-40 ms which is too long.

Remove the rcu logic and change qrtr_port_lock to a spinlock so it can
be used in qrtr_port_lookup which may be used in atomic context.

Change-Id: I3244e31d3ca0599df794d3936033735bcdd3e972
Signed-off-by: Jay Jayanna <jayanna@codeaurora.org>
Signed-off-by: Chris Lew <quic_clew@quicinc.com>
2022-10-11 13:41:26 -07:00
Chris Lew
904b1aa353 net: qrtr: Add permission rules for QTI targets
Give control port access to processes that have root user priveleges,
AID_VENDOR_QRTR user priveleges, or NET_ADMIN capabilities.

Remove the need for SYS_ADMIN priveleges because they will not be
granted on any QTI targets.

This change squashes the following commits from msm-4.14:
  commit 17da4da93c96 ("qrtr: Allow net bind service capabilities")
  commit 56faadfd27b4 ("qrtr: Fix NET_BIND_SERVICE logic")
  commit 82ea58d60c46 ("net: qrtr: Allow control port access to
                        AID_VENDOR_QRTR")
  commit 9db4f5803ce1 ("net: qrtr: Allow Root guid process to bind")

In addition fix minor format issues.

Change-Id: I1441cbf53eb62880333a1031334a5331c1f54a77
Signed-off-by: Chris Lew <quic_clew@quicinc.com>
2022-10-11 13:41:18 -07:00
Chris Lew
bf77ef2d63 net: qrtr: Return success if control port is not bound
If a port tries to send a message before the name service binds to the
control port, then that message should succeed. This will allow clients
to operate normally until the name service comes online and causes a
net reset to restart all the ports.

Change-Id: Ica0a5e45df0e51f282e5bf426d11ff8e41b339c4
Signed-off-by: Chris Lew <quic_clew@quicinc.com>
2022-10-11 13:32:07 -07:00
Chris Lew
3f161d1572 net: qrtr: mhi: synchronize qrtr and mhi preparation
A dl callback can be received anytime after mhi_prepare_for_transfer
has been called. There is a window where the callback may happen
before the probe initializes the qrtr_mhi_dev state. Move
mhi_prepare_for_transfer after the registering the endpoint.

Once moved, the reverse can happen where qrtr will try to send a packet
before the channels are prepared. Add a wait in the sending path to
ensure the channels are prepared before trying to do a ul transfer.

Change-Id: Ib5bf34ec8c1fa56a8ce29c89449d062de7133846
Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
Signed-off-by: Chris Lew <quic_clew@quicinc.com>
2022-10-11 13:15:10 -07:00
Chris Lew
405ddae2c7 net: qrtr: Add support to read qrtr packet size
Some transports need to know qrtr packet to read complete packet
from underlying transport.

Add API support to get the incoming packet size form qrtr header.

Change-Id: I4e4e4ab2e4c1fe0e1e1261af85a8b8618ce65bb3
Signed-off-by: Arun Kumar Neelakantam <aneela@codeaurora.org>
Signed-off-by: Chris Lew <quic_clew@quicinc.com>
2022-10-11 13:06:48 -07:00
Chris Lew
1dfa161834 net: qrtr: ns: Add ipc logging to ns
Log packets processed by ns using ipc logging framework.

Change-Id: I08e9b8551efb4a58cf899835cfac25c1952bd4b8
Signed-off-by: Jay Jayanna <jayanna@codeaurora.org>
Signed-off-by: Chris Lew <quic_clew@quicinc.com>
2022-10-11 13:03:42 -07:00
Chris Lew
718816b952 net: qrtr: ns: Change to ratelimited prints
Error prints for commands that are broadcasted may spam the kernel logs
if a client is misbehaving and stops reading from it's socket.

Change these prints to ratelimited in order to prevent performance
issues when a client socket is full.

Change-Id: I5aa5fa1f693f9865a3d28f28de38f870a42fbc8d
Signed-off-by: Chris Lew <quic_clew@quicinc.com>
2022-10-11 13:03:37 -07:00
Chris Lew
f540ee360d net: qrtr: ns: Add pr_fmt to ns
Add pr_fmt to the ns file for easier error log matching.

Change-Id: I711735ee60c1fd9fde25850b8e625bb44c04f4c4
Signed-off-by: Chris Lew <quic_clew@quicinc.com>
2022-10-11 13:03:32 -07:00
Chris Lew
d94badbdaa net: qrtr: ns: Ignore ENODEV failures in ns
Ignore the ENODEV failures returned by kernel_sendmsg(). These errors
mean either the local port has closed or the remote has gone down.
Neither of these scenarios are fatal and will eventually be handled
through packets that are later queued on the control port.

Also improve the logging messages to print the error code returned by
kernel_sendmsg().

Change-Id: Ibcebd1f44a3fbc87febaa84b11e05675663da5a0
Signed-off-by: Chris Lew <quic_clew@quicinc.com>
2022-10-11 13:03:27 -07:00
Chris Lew
16c6929261 net: qrtr: ns: Increase socket recvbuf
Increase the socket recvbuf for the ns so control packets are not
dropped in heavy traffic situations. This change will not
actually set the recvbuf to INT_MAX but to the system defined rmem_max
for sockets.

Change-Id: I860cc1052080cc6e683b44bef1dd9f8fc1899f31
Signed-off-by: Jay Jayanna <jayanna@codeaurora.org>
Signed-off-by: Chris Lew <quic_clew@quicinc.com>
2022-10-11 13:03:22 -07:00
Chris Lew
a729cfdb0b net: qrtr: ns: create kthread worker to process ns work
If worker is not processing packets on control port fast enough,
socket buffer may get full and result in drop of control packets.

Creating dedicated worker thread to process control packets.

CRs-Fixed: 2763561
Change-Id: I4585015cef2a507a9ba13014cd93f40e60f8a25a
Signed-off-by: Deepak Kumar Singh <deesin@codeaurora.org>
Signed-off-by: Chris Lew <quic_clew@quicinc.com>
2022-10-11 13:02:59 -07:00
Guru Das Srinagesh
456ebaf014 defconfig: pineapple-gki: Enable QCOM_SPSS and dependency
Enable QCOM_SPSS and its dependency, CONFIG_RPMSG_QCOM_SMD.

Change-Id: I4f1446d82a6cd1f7dd43c46519634d70390a4005
Signed-off-by: Guru Das Srinagesh <quic_gurus@quicinc.com>
2022-10-10 16:54:06 -07:00
Guru Das Srinagesh
fb861b58bd remoteproc: qcom_spss: Add support for pineapple SoC
Add compatible for pineapple SoC.

Change-Id: I3192184b87fc65af79896033e1ee6333fa8c8b81
Signed-off-by: Guru Das Srinagesh <quic_gurus@quicinc.com>
2022-10-10 16:54:05 -07:00
Guru Das Srinagesh
eff864428c remoteproc: Add snapshot of QCOM_SPSS driver
Add snapshot of the QCOM_SPSS driver from msm-5.15 commit 23fe038a2ea4
("Kconfig: Add support for kona chipset").

Change-Id: I7c419a62b14e21d45b3e8bcc2785570012a7c09a
Signed-off-by: Guru Das Srinagesh <quic_gurus@quicinc.com>
2022-10-10 16:54:03 -07:00
Vivek Aknurwar
0c91be080b clk: qcom: clk-alpha-pll: Fix pll enable outout
Fix pll enable output incase of when pll is not configured from boot.

Change-Id: I076ae750bad956c37d0a790b07fb9892f3149a0c
Signed-off-by: Vivek Aknurwar <quic_viveka@quicinc.com>
2022-10-10 15:18:38 -07:00
Gokul krishna Krishnakumar
8a22567035 build.config: pineapple: Add flag to enable init_boot build
By enabling this flag init_boot.img will be generated if
the header version is 4.

Change-Id: I8a01d10cee8142ef900376d7e3d29f1b49e80d00
Signed-off-by: Gokul krishna Krishnakumar <quic_gokukris@quicinc.com>
2022-10-10 09:59:16 -07:00