[PATCH V1] rpmsg: glink: Make glink smem interrupt wakeup capable

2024-06-03 Thread Deepak Kumar Singh
as wakeup irq. Remove IRQF_NO_SUSPEND flag as it is no longer required. Signed-off-by: Deepak Kumar Singh --- drivers/rpmsg/qcom_glink_smem.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/rpmsg/qcom_glink_smem.c b/drivers/rpmsg/qcom_glink_smem.c index 7a982c60a8dd

Re: [RFC PATCH] rpmsg: glink: Add bounds check on tx path

2024-03-20 Thread Deepak Kumar Singh
On 1/29/2024 10:03 PM, Michal Koutný wrote: On Mon, Jan 29, 2024 at 04:18:36PM +0530, Deepak Kumar Singh wrote: There is already a patch posted for similar problem - https://lore.kernel.org/all/20231201110631.669085-1-quic_dee...@quicinc.com/ I was not aware, thanks for the pointer. Do

Re: [RFC PATCH] rpmsg: glink: Add bounds check on tx path

2024-01-29 Thread Deepak Kumar Singh
On 1/13/2024 5:55 AM, Michal Koutný wrote: Add bounds check on values read from shared memory in the tx path. In cases where the VM is misbehaving, the transport should exit and print a warning when bogus values may cause out of bounds to be read. Link:

[PATCH V1] rpmsg: glink: smem: validate index before fifo read write

2023-12-01 Thread Deepak Kumar Singh
: 9607 [#1] PREEMPT SMP pc : __memcpy_fromio+0x34/0xb4 lr : glink_smem_rx_peak+0x68/0x94 __memcpy_fromio+0x34/0xb4 glink_smem_rx_peak+0x68/0x94 qcom_glink_native_intr+0x90/0x888 Signed-off-by: Deepak Kumar Singh --- drivers/rpmsg/qcom_glink_smem.c | 21 ++--- 1 file changed, 18

[PATCH V2 2/2] soc: qcom: aoss: Add debugfs entry

2021-04-08 Thread Deepak Kumar Singh
It can be useful to control the different power states of various parts of hardware for device testing. Add a debugfs node for qmp so messages can be sent to aoss for debugging and testing purposes. Signed-off-by: Chris Lew Signed-off-by: Deepak Kumar Singh --- drivers/soc/qcom/qcom_aoss.c

[PATCH V2 1/2] soc: qcom: aoss: Expose send for generic usecase

2021-04-08 Thread Deepak Kumar Singh
From: Deepak Kumar Singh Not all upcoming usecases will have an interface to allow the aoss driver to hook onto. Expose the send api and create a get function to enable drivers to send their own messages to aoss. Signed-off-by: Chris Lew Signed-off-by: Deepak Kumar Singh --- drivers/soc/qcom

[PATCH V2 0/2] soc: qcom: aoss: Expose send for generic usecase

2021-04-08 Thread Deepak Kumar Singh
Change from V1 Addressesed all review comments in previous set. Deepak Kumar Singh (2): soc: qcom: aoss: Expose send for generic usecase soc: qcom: aoss: Add debugfs entry drivers/soc/qcom/qcom_aoss.c | 91 +- include/linux/soc/qcom/qcom_aoss.h | 33

[PATCH V1 2/2] soc: qcom: aoss: Add debugfs entry

2021-04-02 Thread Deepak Kumar Singh
It can be useful to control the different power states of various parts of hardware for device testing. Add a debugfs node for qmp so messages can be sent to aoss for debugging and testing purposes. Signed-off-by: Chris Lew Signed-off-by: Deepak Kumar Singh --- drivers/soc/qcom/qcom_aoss.c

[PATCH V1 1/2] soc: qcom: aoss: Expose send for generic usecase

2021-04-02 Thread Deepak Kumar Singh
Not all upcoming usecases will have an interface to allow the aoss driver to hook onto. Expose the send api and create a get function to enable drivers to send their own messages to aoss. Signed-off-by: Chris Lew Signed-off-by: Deepak Kumar Singh --- drivers/soc/qcom/qcom_aoss.c | 36

[PATCH V1 0/2] soc: qcom: aoss: Expose send for generic usecase

2021-04-02 Thread Deepak Kumar Singh
[Change from V0] Update qmp_get to parse qmp handle with binding qcom,qmp Deepak Kumar Singh (2): soc: qcom: aoss: Expose send for generic usecase soc: qcom: aoss: Add debugfs entry drivers/soc/qcom/qcom_aoss.c | 77 +++- 1 file changed, 76 insertions

[PATCH V1 1/1] soc: qcom: smp2p: Add enable_irq_wake to SMP2P IRQ

2021-03-18 Thread Deepak Kumar Singh
SMP2P interrupts are expected to wake the processor from suspend. Use enable_irq_wake to mark it wakeup capable from suspend. Signed-off-by: Chris Lew Signed-off-by: Deepak Kumar Singh --- drivers/soc/qcom/smp2p.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/soc/qcom/smp2p.c b

Re: [PATCH V5 0/4] Signaling api support in glink/rpmsg clients

2020-09-02 Thread Deepak Kumar Singh
On 7/6/2020 11:34 PM, Mathieu Poirier wrote: Hi Deepak, On Fri, Jun 26, 2020 at 08:16:55PM +0530, Deepak Kumar Singh wrote: Change from version 5 [V5,4/4] rpmsg: char: Add signal callback and POLLPRI support Updated for sparse warning. Replaced POLLPRI => EPOLLPRI to fix warning. Cha

[PATCH V7 3/4] rpmsg: char: Add TIOCMGET/TIOCMSET ioctl support

2020-09-02 Thread Deepak Kumar Singh
From: Arun Kumar Neelakantam Add TICOMGET and TIOCMSET ioctl support for rpmsg char device nodes to get/set the low level transport signals. Signed-off-by: Deepak Kumar Singh Signed-off-by: Arun Kumar Neelakantam --- drivers/rpmsg/rpmsg_char.c | 54

[PATCH V7 1/4] rpmsg: core: Add signal API support

2020-09-02 Thread Deepak Kumar Singh
. Signed-off-by: Chris Lew Signed-off-by: Deepak Kumar Singh Signed-off-by: Arun Kumar Neelakantam --- drivers/rpmsg/rpmsg_core.c | 40 drivers/rpmsg/rpmsg_internal.h | 5 + include/linux/rpmsg.h | 27 +++ 3

[PATCH V7 4/4] rpmsg: char: Add signal callback and POLLPRI support

2020-09-02 Thread Deepak Kumar Singh
From: Arun Kumar Neelakantam Register a callback to get the signal notifications from rpmsg and send POLLPRI mask to indicate the signal change in POLL system call. Signed-off-by: Deepak Kumar Singh Signed-off-by: Arun Kumar Neelakantam --- drivers/rpmsg/rpmsg_char.c | 22

[PATCH V7 2/4] rpmsg: glink: Add support to handle signals command

2020-09-02 Thread Deepak Kumar Singh
Kumar Singh Signed-off-by: Arun Kumar Neelakantam --- drivers/rpmsg/qcom_glink_native.c | 125 ++ 1 file changed, 125 insertions(+) diff --git a/drivers/rpmsg/qcom_glink_native.c b/drivers/rpmsg/qcom_glink_native.c index f40312b..499381a 100644 --- a/drivers

[PATCH V7 0/4] Signaling api support in glink/rpmsg clients

2020-09-02 Thread Deepak Kumar Singh
tch V4,2/4 is intentional. Arun Kumar Neelakantam (3): rpmsg: glink: Add support to handle signals command rpmsg: char: Add TIOCMGET/TIOCMSET ioctl support rpmsg: char: Add signal callback and POLLPRI support Deepak Kumar Singh (1): rpmsg: core: Add signal API support drivers/rp

[PATCH V1 1/4] net: qrtr: Do not send packets before hello negotiation

2020-08-30 Thread Deepak Kumar Singh
From: Chris Lew 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

[PATCH V1 4/4] net: qrtr: Check function pointer before calling

2020-08-30 Thread Deepak Kumar Singh
From: Arun Kumar Neelakantam sk_error_report callback function called without validating cause the NULL pointer dereference. Validate function pointer before using for error report. --- net/qrtr/qrtr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/qrtr/qrtr.c

[PATCH V1 2/4] net: qrtr: Add socket mode optimization

2020-08-30 Thread Deepak Kumar Singh
From: Chris Lew 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

[PATCH V1 3/4] net: qrtr: Change port allocation to use cyclic idr

2020-08-30 Thread Deepak Kumar Singh
From: Chris Lew 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

[PATCH V1 0/4] General qrtr fixes

2020-08-30 Thread Deepak Kumar Singh
Arun Kumar Neelakantam (1): net: qrtr: Check function pointer before calling Chris Lew (3): net: qrtr: Do not send packets before hello negotiation net: qrtr: Add socket mode optimization net: qrtr: Change port allocation to use cyclic idr net/qrtr/qrtr.c | 93

[PATCH V1 2/6] rpmsg: glink: Deny intent request if reusable intent fits

2020-07-29 Thread Deepak Kumar Singh
. In order to prevent intent build up, deny intent requests that can be fulfilled by default intents that are reusable. Signed-off-by: Chris Lew Signed-off-by: Deepak Kumar Singh --- drivers/rpmsg/qcom_glink_native.c | 17 - 1 file changed, 16 insertions(+), 1 deletion(-) diff

[PATCH V1 4/6] rpmsg: glink: Remove the rpmsg dev in close_ack

2020-07-29 Thread Deepak Kumar Singh
From: Arun Kumar Neelakantam Un-register and register of rpmsg driver is sending invalid open_ack on closed channel. To avoid sending invalid open_ack case unregister the rpmsg device after receiving the local_close_ack from remote side. Signed-off-by: Deepak Kumar Singh signed-off-by: Arun

[PATCH V1 3/6] rpmsg: glink: Add TX_DATA_CONT command while sending

2020-07-29 Thread Deepak Kumar Singh
-off-by: Deepak Kumar Singh --- drivers/rpmsg/qcom_glink_native.c | 38 ++ 1 file changed, 34 insertions(+), 4 deletions(-) diff --git a/drivers/rpmsg/qcom_glink_native.c b/drivers/rpmsg/qcom_glink_native.c index df3c608..ac179b1 100644 --- a/drivers/rpmsg

[PATCH V1 6/6] rpmsg: glink: Send READ_NOTIFY command in FIFO full case

2020-07-29 Thread Deepak Kumar Singh
by sending IRQ. Signed-off-by: Deepak Kumar Singh Signed-off-by: Arun Kumar Neelakantam --- drivers/rpmsg/qcom_glink_native.c | 36 +++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/drivers/rpmsg/qcom_glink_native.c b/drivers/rpmsg

[PATCH V1 5/6] rpmsg: glink: Remove channel decouple from rpdev release

2020-07-29 Thread Deepak Kumar Singh
that should only happen from the close commands. Signed-off-by: Chris Lew Signed-off-by: Deepak Kumar Singh --- drivers/rpmsg/qcom_glink_native.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/rpmsg/qcom_glink_native.c b/drivers/rpmsg/qcom_glink_native.c index 031bc1d..efaf32d 100644

[PATCH V1 1/6] rpmsg: glink: fix destroy channel endpoint logic

2020-07-29 Thread Deepak Kumar Singh
sending second glink close command. Signed-off-by: Konstantin Dorfman Signed-off-by: Deepak Kumar Singh --- drivers/rpmsg/qcom_glink_native.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/rpmsg/qcom_glink_native.c b/drivers/rpmsg/qcom_glink_native.c index 1995f5b..2668c66

[PATCH V1 0/6] Glink native fixes upstreaming

2020-07-29 Thread Deepak Kumar Singh
Includes fixes for - Few race conditions while channel release and close Proper unregistration of rpmsg device to avoid use of stale device Send notify command to remote when glink fifo is full Handling packet size larger that 16K Arun Kumar Neelakantam (3): rpmsg: glink: Add TX_DATA_CONT

[PATCH V5 0/4] Signaling api support in glink/rpmsg clients

2020-06-26 Thread Deepak Kumar Singh
ion to and from native signal as done in patch V4,2/4 is intentional. Arun Kumar Neelakantam (3): rpmsg: glink: Add support to handle signals command rpmsg: char: Add TIOCMGET/TIOCMSET ioctl support rpmsg: char: Add signal callback and POLLPRI support Deepak Kumar Singh (1): rpmsg: core:

[PATCH V6 3/4] rpmsg: char: Add TIOCMGET/TIOCMSET ioctl support

2020-06-26 Thread Deepak Kumar Singh
From: Arun Kumar Neelakantam Add TICOMGET and TIOCMSET ioctl support for rpmsg char device nodes to get/set the low level transport signals. Signed-off-by: Deepak Kumar Singh Signed-off-by: Arun Kumar Neelakantam --- drivers/rpmsg/rpmsg_char.c | 54

[PATCH V6 4/4] rpmsg: char: Add signal callback and POLLPRI support

2020-06-26 Thread Deepak Kumar Singh
From: Arun Kumar Neelakantam Register a callback to get the signal notifications from rpmsg and send POLLPRI mask to indicate the signal change in POLL system call. Signed-off-by: Deepak Kumar Singh Signed-off-by: Arun Kumar Neelakantam --- drivers/rpmsg/rpmsg_char.c | 22

[PATCH V6 1/4] rpmsg: core: Add signal API support

2020-06-26 Thread Deepak Kumar Singh
. Signed-off-by: Chris Lew Signed-off-by: Deepak Kumar Singh Signed-off-by: Arun Kumar Neelakantam --- drivers/rpmsg/rpmsg_core.c | 40 drivers/rpmsg/rpmsg_internal.h | 5 + include/linux/rpmsg.h | 27 +++ 3

[PATCH V6 2/4] rpmsg: glink: Add support to handle signals command

2020-06-26 Thread Deepak Kumar Singh
Kumar Singh Signed-off-by: Arun Kumar Neelakantam --- drivers/rpmsg/qcom_glink_native.c | 125 ++ 1 file changed, 125 insertions(+) diff --git a/drivers/rpmsg/qcom_glink_native.c b/drivers/rpmsg/qcom_glink_native.c index 0e8a28c0..1bf3235 100644 --- a/drivers

[PATCH V5 2/4] rpmsg: glink: Add support to handle signals command

2020-06-24 Thread Deepak Kumar Singh
Kumar Singh Signed-off-by: Arun Kumar Neelakantam --- drivers/rpmsg/qcom_glink_native.c | 125 ++ 1 file changed, 125 insertions(+) diff --git a/drivers/rpmsg/qcom_glink_native.c b/drivers/rpmsg/qcom_glink_native.c index 0e8a28c0..1bf3235 100644 --- a/drivers

[PATCH V5 3/4] rpmsg: char: Add TIOCMGET/TIOCMSET ioctl support

2020-06-24 Thread Deepak Kumar Singh
From: Arun Kumar Neelakantam Add TICOMGET and TIOCMSET ioctl support for rpmsg char device nodes to get/set the low level transport signals. Signed-off-by: Deepak Kumar Singh Signed-off-by: Arun Kumar Neelakantam --- drivers/rpmsg/rpmsg_char.c | 54

[PATCH V5 4/4] rpmsg: char: Add signal callback and POLLPRI support

2020-06-24 Thread Deepak Kumar Singh
From: Arun Kumar Neelakantam Register a callback to get the signal notifications from rpmsg and send POLLPRI mask to indicate the signal change in POLL system call. Signed-off-by: Deepak Kumar Singh Signed-off-by: Arun Kumar Neelakantam --- drivers/rpmsg/rpmsg_char.c | 22

[PATCH V5 1/4] rpmsg: core: Add signal API support

2020-06-24 Thread Deepak Kumar Singh
. Signed-off-by: Chris Lew Signed-off-by: Deepak Kumar Singh Signed-off-by: Arun Kumar Neelakantam --- drivers/rpmsg/rpmsg_core.c | 40 drivers/rpmsg/rpmsg_internal.h | 5 + include/linux/rpmsg.h | 27 +++ 3

[PATCH V7 4/4] rpmsg: glink: Expose rpmsg name attr for glink

2020-06-24 Thread Deepak Kumar Singh
From: Chris Lew Expose the name field as an attr so clients listening to uevents for rpmsg can identify the edge the events correspond to. Signed-off-by: Chris Lew Signed-off-by: Deepak Kumar Singh Signed-off-by: Arun Kumar Neelakantam --- drivers/rpmsg/qcom_glink_native.c | 26

[PATCH V7 1/4] rpmsg: glink: Use complete_all for open states

2020-06-24 Thread Deepak Kumar Singh
From: Chris Lew The open_req and open_ack completion variables are the state variables to represet a remote channel as open. Use complete_all so there are no races with waiters and using completion_done. Signed-off-by: Chris Lew Signed-off-by: Deepak Kumar Singh Signed-off-by: Arun Kumar

[PATCH V7 3/4] rpmsg: glink: Add support for rpmsg glink chrdev

2020-06-24 Thread Deepak Kumar Singh
RPMSG provides a char device interface to userspace. Probe the rpmsg chrdev channel to enable the rpmsg_ctrl device creation on glink transports. Signed-off-by: Chris Lew Signed-off-by: Deepak Kumar Singh Signed-off-by: Arun Kumar Neelakantam --- drivers/rpmsg/qcom_glink_native.c | 38

[PATCH V7 2/4] rpmsg: Guard against null endpoint ops in destroy

2020-06-24 Thread Deepak Kumar Singh
Kumar Singh Signed-off-by: Arun Kumar Neelakantam --- drivers/rpmsg/rpmsg_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/rpmsg/rpmsg_core.c b/drivers/rpmsg/rpmsg_core.c index a6361ca..91de940 100644 --- a/drivers/rpmsg/rpmsg_core.c +++ b/drivers/rpmsg/rpmsg_core.c

[PATCH V1 2/2] soc: qcom: smem: map only partitions used by local HOST

2020-06-09 Thread Deepak Kumar Singh
SMEM driver is IO mapping complete region and CPU is doing a speculative read into a partition where local HOST does not have permission resulting in a NOC error. Map only those partitions which are accessibly to local HOST. Signed-off-by: Deepak Kumar Singh --- drivers/soc/qcom/smem.c | 226

[PATCH V1 1/2] soc: qcom: smem: validate fields of shared structures

2020-06-09 Thread Deepak Kumar Singh
Structures in shared memory that can be modified by remote processors may have untrusted values, they should be validated before use. Adding proper validation before using fields of shared structures. Signed-off-by: Deepak Kumar Singh --- drivers/soc/qcom/smem.c | 194