Commit graph

858,635 commits

Author SHA1 Message Date
qctecmdr
ffa1b3486d Merge "msm: gsi: gsi channel QoS register update" 2019-10-09 11:02:49 -07:00
qctecmdr
967986251f Merge "msm: ipa3: Fix to not remove endpoint delay if stop channel fails" 2019-10-09 10:17:35 -07:00
qctecmdr
b53f720c52 Merge "ion: msm: Correct OF node refcount handling in error paths" 2019-10-09 09:23:24 -07:00
qctecmdr
3f044b1ec2 Merge "ion: msm: enable debugfs for ion heaps" 2019-10-09 08:29:17 -07:00
qctecmdr
e8eaa8ee05 Merge "ion: msm: Assume devicetree support" 2019-10-09 06:41:46 -07:00
qctecmdr
6dad06ccde Merge "ion: msm: Upgrade the ION ABI version" 2019-10-09 06:03:01 -07:00
qctecmdr
6789de4ceb Merge "ion: msm: Fix several errors in the MSM ION kernel header" 2019-10-09 05:29:27 -07:00
Ashok Vuyyuru
a1575e6ec0 msm: ipa3: Fix to not remove endpoint delay if stop channel fails
Because of removing endpoint delay when the stop channel failed case
observing some junk packets received on a pipe. To avoid junk packets,
add change to avoid endpoint delay if stopping GSI channel fails.

Change-Id: I4d3d8d9a0de823229d780fe31c8d7f1162e20668
Signed-off-by: Ashok Vuyyuru <avuyyuru@codeaurora.org>
2019-10-09 00:15:18 -07:00
qctecmdr
053a2be904 Merge "pinctrl: Add api to enable/disable wakeup capability for a gpio" 2019-10-09 00:09:01 -07:00
qctecmdr
9963fe6c8a Merge "defconfig: lahaina-gki: enable refgen regulator driver" 2019-10-08 23:11:50 -07:00
qctecmdr
f755b6b67f Merge "net: qrtr: Change port allocation to use cyclic idr" 2019-10-08 22:32:56 -07:00
qctecmdr
81b7681939 Merge "arm64: defconfig: Enable gcc clock driver for Lahaina" 2019-10-08 21:40:36 -07:00
qctecmdr
0468e66895 Merge "net: qrtr: Change node mutex to a rw_semaphore" 2019-10-08 21:00:30 -07:00
qctecmdr
13db81d1b0 Merge "msm: gsi: gsi 2.9 upgrade" 2019-10-08 20:16:25 -07:00
qctecmdr
f611892041 Merge "of: Make of_get_ddrtype module friendly" 2019-10-08 19:24:26 -07:00
qctecmdr
2810686555 Merge "soc: qcom: Add a config flag to know the build variant" 2019-10-08 18:40:12 -07:00
Rishabh Bhatnagar
9c23c34725 pinctrl: Add api to enable/disable wakeup capability for a gpio
Add api to write to mpm wakeup registers to configure a gpio
as wakeup capable.

Change-Id: Ia11a22160394e76969200691cfaf8fb1505bf5c1
Signed-off-by: Rishabh Bhatnagar <rishabhb@codeaurora.org>
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
2019-10-08 14:28:03 -07:00
Jeevan Shriram
9c0e5c7054 drivers: pinctrl: Add support for read/write of QUP registers
Add support to read and write QUP mode registers in TLMM block.

Change-Id: I9878af50f6920c577fa74047e01e9b37c0542dd1
Signed-off-by: Rishabh Bhatnagar <rishabhb@codeaurora.org>
Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
[eberman@codeaurora.org: reintroduce msm_pinctrl_data]
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
2019-10-08 14:28:03 -07:00
Bojun Pan
bc912e31b9 msm: gsi: gsi channel QoS register update
GSI QoS register upgrade for GSI v2.9, introduce the
new field of db_in_bytes.

Change-Id: I1d0ff4381a6b6ac1f5119d0be2efea29a49a5dcc
Signed-off-by: Bojun Pan <bojunp@codeaurora.org>
2019-10-08 10:11:01 -07:00
Chris Lew
06809f9816 net: qrtr: Change port allocation to use cyclic idr
There is a race for clients that open sockets before the control port
is bound. If a client gets an idr that was allocated before the control
port is bound, there is a chance the previous address owner sent lookup
packets to the control port. The new address owner will get residual
responses to this the lookup packets.

Change the idr_alloc to idr_alloc_cyclic so new idr's are allocated
instead of trying to reuse the freed idrs.

Change-Id: Ie1bda7a818309503f80542e739bac646327296f7
Signed-off-by: Chris Lew <clew@codeaurora.org>
2019-10-07 16:50:11 -07:00
Chris Lew
5e6fd7cda2 net: qrtr: Change node mutex to a rw_semaphore
There is a chance for a remote processor to become unresponsive while
QRTR is trying to broadcast a control message. This results in the node
lock being held for an extended period of time and prevents node lookup
which is needed to send messages.

Change the mutex to a rw_semaphore to allow concurrency during node
lookups and broadcasts.

Change-Id: I2e3fdde22edaac64f164cf08900e9d09b16c380d
Signed-off-by: Chris Lew <clew@codeaurora.org>
2019-10-07 16:50:11 -07:00
Chris Lew
01b08fdd53 net: qrtr: Add socket mode optimization
A remote endpoint should not need to know when a client socket is freed
if the socket never established commnication with the endpoint. Add a
mode to keep track of which endpoints a socket communicates with.

There are three modes a socket can be in:
	INIT   - Socket has not sent anything or only local messages,
		 only send client close to local services.

	SINGLE - Socket has sent messages to a single ept, send event
		 to this single ept.

	MULTI  - Socket has sent messages to multiple epts, broadcast
		 release of this socket.

Server state changes should be broadcast throughout the system. Change
the ipc state of a port when it sends a NEW SERVER control packet. This
ensures the DEL CLIENT control packet is propagated correctly for
servers.

This change squashes the following commits from msm-4.14:
  commit 3373eb77cd6d ("net: qrtr: Add socket mode optimization")
  commit d984a2d6f150 ("net: qrtr: Make servers multi state ports")

In addition, fix minor format issues.

Change-Id: I416742cff598bf7aa9da2baa2e86a53b18367870
Signed-off-by: Chris Lew <clew@codeaurora.org>
2019-10-07 16:50:11 -07:00
Chris Lew
94869df328 net: qrtr: Do not send packets before hello negotiation
There is a race where broadcast packets can be sent to a node that has
not sent the hello message to the remote processor. This breaks the
protocol expectation. Add a status variable to track when the hello
packet has been sent.

An alternative solution attempted was to remove the nodes from the
broadcast list until the hello packet is sent. This is not a valid
solution because hello messages are broadcasted if the ns is restarted
or started late. There needs to be a status variable separate from the
broadcast list.

This change squashes the following commits from msm-4.14:
  commit abd3961d05be ("qrtr: Only broadcast to initialized nodes")
  commit 90cb0e473226 ("net: qrtr: Do not send packets before Hello
                        negotiation")
  commit 07abd1abe803 ("net: qrtr: Fix hello packet drop memory leak")

In addition, fix minor format issues.

Change-Id: I2a55e587f324e64e2bde4ea634de66008f190de1
Signed-off-by: Chris Lew <clew@codeaurora.org>
2019-10-07 16:49:48 -07:00
qctecmdr
c4787643fa Merge "net: qrtr: Align header and payload" 2019-10-07 15:20:46 -07:00
Isaac J. Manjarres
03bb3d6ddd ion: msm: Correct OF node refcount handling in error paths
The for_each_[available]_child_of_node iterators implicitly
increment the reference count on the current OF node at the
start of the iteration, and decrements it at the end of the
iteration.

However, if the control flow is such that the loop
can be broken out of prior to finishing an iteration, then
the reference count must be decremented in the subsequent
code path.

Thus, fix the error path in the MSM ION code to decrement the
reference on the current OF node when prematurely exiting
an of_node loop.

Change-Id: I5c2ec02a57eff416c04b1fe63c80d6e573a692d4
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
2019-10-07 15:13:39 -07:00
qctecmdr
7f16200f1c Merge "soc: qcom: qmi_interface: Protect sk_user_data with RCU" 2019-10-07 14:24:19 -07:00
qctecmdr
226b72604a Merge "pinctrl: qcom: Add EGPIO feature support to pinctrl driver" 2019-10-04 19:27:42 -07:00
Prasad Sodagudi
49d73826d0 pinctrl: qcom: Add EGPIO feature support to pinctrl driver
Island IO can be assigned to Apps TLMM dynamically
if that island is not using the pin for any connectivity.
Add support for enabling EGPIO feature if the pin can
support it. EGPIO_PRESENT bit shows if EGPIO feature
is present or not for particular pin. Once EGPIO_ENABLE
bit is set the pin is now controlled by Apps TLMM.
When pinctrl properties are getting initialized by device
driver framework, pin functions select would call to
msm_pinmux_set_mux function to select pin function and
enable EGPIO.

Change-Id: I64514904096286f2a5df351880cd56d753f0658f
Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
Signed-off-by: Rishabh Bhatnagar <rishabhb@codeaurora.org>
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
2019-10-04 15:55:36 -07:00
qctecmdr
7ca8fd6d83 Merge "defconfig: Add MSM Core Hang Detection as module" 2019-10-04 14:58:57 -07:00
Bojun Pan
e2df375d79 msm: ipa: update mem_part table for IPA SRAM
mem_partition table update for IPA SRAM.

Change-Id: I1cabeeca7eef8f82792d30f5a62c06bc3e08b049
Signed-off-by: Bojun Pan <bojunp@codeaurora.org>
2019-10-04 12:20:01 -07:00
Bojun Pan
54f5b081c1 msm: gsi: gsi 2.9 upgrade
Driver upgrade for GSI v2.9.

Change-Id: I5d148ead27499e6571196bc320c60da1e727163d
Signed-off-by: Bojun Pan <bojunp@codeaurora.org>
2019-10-04 12:19:55 -07:00
Bojun Pan
76a1edce0e msm: ipa: Configure IPA pipes and group resources for Lahaina IPA 4.9
Lahaina uses different pipe endpoint mappings and group resources.
This change captures these configurations.

Change-Id: Ib45848bb52d9a6680b38b4305cbab38c0b00e7d2
Acked-by: Priyadarshini Rajagopal <prajagop@qti.qualcomm.com>
Signed-off-by: Bojun Pan <bojunp@codeaurora.org>
2019-10-04 12:19:50 -07:00
Chris Lew
6edb7067ed net: qrtr: Align header and payload
Remote IPC Router drivers expect the received packet to be aligned.
This case is only exposed using the MHI transport because it does not
ensure the packet will be received as one chunk like RPMSG GLINK.

Change-Id: I0e5c27e3c5896e6721c8bbbfcda29551f0968626
Signed-off-by: Chris Lew <clew@codeaurora.org>
2019-10-04 11:27:35 -07:00
Bjorn Andersson
881e2c3278 net: qrtr: Remove receive worker
Rather than enqueuing messages and scheduling a worker to deliver them
to the individual sockets we can now, thanks to the previous work, move
this directly into the endpoint callback.

This saves us a context switch per incoming message and removes the
possibility of an opportunistic suspend to happen between the message is
coming from the endpoint until it ends up in the socket's receive
buffer.

Change-Id: I7177fa36f9d7cc7e5de5f24975f15284ef1fcc80
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Patch-mainline: linux-arm-kernel @ 07/05/19, 23:06
Signed-off-by: Chris Lew <clew@codeaurora.org>
2019-10-04 11:27:35 -07:00
Chris Lew
8695691608 soc: qcom: qmi_interface: Protect sk_user_data with RCU
sk_user_data can be protected with RCU instead of calling the callback
rwlock. RCU will ensure the pointer obtained in qmi_data_ready is
formed properly and cleanup can synchronize before continuing in handle
release.

Change-Id: I6a687bd7b311fe169a89cb959ae755730b81a9f1
Signed-off-by: Chris Lew <clew@codeaurora.org>
2019-10-04 11:27:27 -07:00
Prakruthi Deepak Heragu
7a418dae79 soc: qcom: Add a config flag to know the build variant
Add a Kconfig flag to differentiate between a GKI and an Non GKI build.
CONFIG_QGKI is enabled if the build is a Non GKI variant (QGKI or debug).
This flag doesn't differentiate between QGKI and debug variants.

Change-Id: I6b53b1e0e4c071fc7d9b365ff374ffe4e8b3e8ba
Signed-off-by: Prakruthi Deepak Heragu <pheragu@codeaurora.org>
2019-10-04 10:36:02 -07:00
qctecmdr
bbb789f449 Merge "irqchip: qcom-pdc: Add IPC logging support" 2019-10-04 10:35:50 -07:00
qctecmdr
d9f382896a Merge "serial: msm_geni_serial:Add snapshot of serial UART driver" 2019-10-04 00:05:49 -07:00
Sudarshan Rajagopalan
016daf243e ion: msm: enable debugfs for ion heaps
Add debugfs node for ion which prints out the debug_show
of all the heaps within ion.

Change-Id: I8499967c8f202b079b6ccbe1c31cb38ee6a51374
Signed-off-by: Sudarshan Rajagopalan <sudaraja@codeaurora.org>
[isaacm@codeaurora.org: Rework to move logic out of ION core]
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
2019-10-03 23:27:51 -07:00
Isaac J. Manjarres
583ca0fad1 ion: Allow the system heap to expose debug information
Allow the system heap to expose debug information about the pools
through debugfs.

Change-Id: Id11706648b32260f19dff8d3f5cced1733a05978
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
2019-10-03 23:27:51 -07:00
Liam Mark
2b78a1e427 ion: msm: Expose ION API to query buffer VM information
Allow ION clients to be able to determine the VM information associated
with an ION buffer, such as the VMIDs it is assigned to as well as the
VM permissions.

Change-Id: Id0be0b505bc84beff373e4e2ae16b71ec4f09d43
Signed-off-by: Liam Mark <lmark@codeaurora.org>
[isaacm@codeaurora.org: Relocate changes to new header locations]
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
2019-10-03 23:27:51 -07:00
Patrick Daly
1b851a568a ion: msm: Assume devicetree support
Remove support for passing parameters via platform_data now that
relevant targets use devicetree.

Change-Id: I2d8398163b5a4f358e257f416fd0e0c325664154
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
[isaacm@codeaurora.org: Relocated changes to correct file]
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
2019-10-03 23:27:50 -07:00
Isaac J. Manjarres
b34178e823 ion: msm: Correct msm_ion_parse_dt() error propagation
If a device cannot be created for a child node, or the ID cannot
be retrieved for a heap, then msm_ion_parse_dt() will return ret.
However, under these circumstances, ret has not been updated to
reflect these failures, and as such, msm_ion_probe will erroneously
continue as if the call to msm_ion_parse_dt() had been successful.
Thus, ensure that ret is set before following the error path in
msm_ion_parse_dt().

Change-Id: I241805e2c169fb15bda68c2a375def04790aa20e
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
2019-10-03 23:27:50 -07:00
Isaac J. Manjarres
daed90529d ion: msm: Upgrade the ION ABI version
Upgrade the ION ABI version from to 2 to 3 to help ION
clients decide what they need to do based on the target
version.

Change-Id: I3d37fb9abb237e432283eaa4e7ea52419c08a2df
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
2019-10-03 23:27:49 -07:00
Isaac J. Manjarres
c93bc92639 ion: msm: Rename msm_ion_of.[c/h] to msm_ion.[c/h]
Rename msm_ion_of.[c/h] to msm_ion.[c/h], as the OF portion is
a bit of a misnomer, considering that the file supports
more than just the OF parsing machinery.

Change-Id: I013cbdb78cb031ab7521f55873ed9fb031cbbed5
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
2019-10-03 23:25:19 -07:00
Isaac J. Manjarres
02c55808f3 ion: msm: Fix several errors in the MSM ION kernel header
ION clients that reside in the kernel may need information that is
present in the UAPI header, such as flags to specify memory
attributes, or IDs to allocate from different heaps, so include
the UAPI header in the kernel space header. Also, ensure that
drivers that use this header can still compile even when
CONFIG_ION_MSM_HEAPS is not set.

Change-Id: If030a58ce62b73b66b337b6dfc6a607bbc0ce193
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
2019-10-03 23:06:51 -07:00
qctecmdr
ca6ceb9883 Merge "irqchip: qcom-pdc: add irqchip set/get state calls" 2019-10-03 23:03:38 -07:00
Raghavendra Rao Ananta
414587c7f9 of: Make of_get_ddrtype module friendly
The APIs fdt_path_offset() and fdt_getprop_w() are not exported.
As a result, drivers that are compiled as modules cannot directly
use them. Hence, switch to of_find_node_by_path() and
of_property_read_u32() to achive the same functionality while also
being module friendly.

Change-Id: I90b299c60b60a006d0932442549c5d5a20cf2ea0
Signed-off-by: Raghavendra Rao Ananta <rananta@codeaurora.org>
2019-10-03 17:15:33 -07:00
Isaac J. Manjarres
8ba9def729 soc: qcom: secure_buffer: Fix secure buffer device initialization
Ensure that the secure buffer device is set only if dma_set_mask()
occurs successfully.

Change-Id: I9b84692b2860bafd8fe645b95e05d6436698d840
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
2019-10-03 14:53:01 -07:00
qctecmdr
23e1365ce8 Merge "iommu/arm-smmu: Fix context fault interrupt test" 2019-10-03 14:00:20 -07:00