Commit Graph

23 Commits

Author SHA1 Message Date
ligd 8a3683fb9f rptun: add ns_match callback to resolve rptun deadlock
thread A: accept -> net_lock -> socket_rpmsg_accept
          -> rpmsg_register_callabck -> rptun_lock
thread B: ns_bind -> rpmsg_socket_ns_bind -> get_tx_payload_buffer
          -> rptun_wait_tx -> usrsock_rpmsg_ept_cb -> usrsockdev_write
          -> net_lock -> deadlock

fix:
add ns_match callback

Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-07-27 20:36:51 +08:00
ligd a014a19f0e rptun_ping: add sleep param to rptun_ping
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-07-27 20:36:51 +08:00
ligd 86a496d6ff rptun: forward panic/reset to lowerhalf
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-03-30 10:00:07 +03:00
ligd 759898c090 rptun: add ping rpmsg support
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-03-30 10:00:07 +03:00
ligd f0ba2f0286 rptun: add rptun dump support
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-03-30 10:00:07 +03:00
ligd be49f6b87c rptun: add rpmsg_wait/post support for recursive dispatch
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-03-30 10:00:07 +03:00
ligd 3ab7ade4ba rptun: add rptun_reset support
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-03-30 10:00:07 +03:00
ligd 7aba7c3790 rptun: add rptun_force_panic support
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-03-30 10:00:07 +03:00
Xiang Xiao 187d9e58c9 Remove the unnecessary inclusion of assert.h and string.h from public header files
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-12-20 10:30:08 +01:00
ligd 5b369c5cec libs/lbc: remove CHAR_BIT = 16 support
For CEVA platform CHAR_BIT is 16, and will do lots of extra work
when use IPC.
We will not support this platform anymore, so remove all the b2c operations.

Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-12-13 11:08:28 -06:00
Xiang Xiao b3f9ffbe72 Replace all __attribute__((aligned(x)) with aligned_data(x)
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-07-29 21:55:21 -03:00
Jiuzhu Dong 9d264af4fc rptun: fix compile break when disable openamp
Change-Id: I63251524d94fae43bfb0a71c324d55bf91d363f8
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-07-14 23:36:14 -07:00
Xiang Xiao b5f429c88b Fix nxstyle warning
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-08-22 17:37:21 -06:00
Xiang Xiao ae356001cf Change all files come from Xiaomi/Pinecone to Apache License 2.0
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-08-22 17:37:21 -06:00
zhongan e0ad381abc drivers/rptun: add null-check for 'RPTUN_*' macro.
Change-Id: I203e90f03e66791afe4c65aef4367f5a626cb15b
Signed-off-by: zhongan <zhongan@xiaomi.com>
2020-08-11 15:58:27 +01:00
zhongan 2818b6b2c0 drivers/rptun: Add 'RPTUN_CONFIG' interface.
Change-Id: I1c6177ffe0c49c385f0d784b1ff0dbb69b6432f8
Signed-off-by: zhongan <zhongan@xiaomi.com>
2020-08-11 15:58:27 +01:00
zhongan 927cb00f5e fix nxstyle warning
Signed-off-by: zhongan <zhongan@xiaomi.com>
2020-04-26 19:53:43 -06:00
zhongan 546e35fc98 drivers/rptun: replace 'rxbuf_size' and 'txbuf_size' to 'buf_size' in struct 'rptun_rsc_s'.
Change-Id: I7c9da4bd985712a3fde4c56999901434740b33f7
Signed-off-by: zhongan <zhongan@xiaomi.com>
2020-04-26 19:53:43 -06:00
Xiang Xiao cde88cabcc Run codespell -w with the latest dictonary again
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-02-23 22:27:46 +01:00
Xiang Xiao bd4e8e19d3 Run codespell -w against all files
and fix the wrong correction
2020-02-22 14:45:07 -06:00
Xiang Xiao 68951e8d72 Remove exra whitespace from files (#189)
* Remove multiple newlines at the end of files
* Remove the whitespace from the end of lines
2020-01-31 09:24:49 -06:00
Alin Jerpelea 182c55635d include/nuttx/rptun/rptun.h: openamp/open_amp.h must not be included unless CONFIG_RPTUN (and heance CONFIG_OPENAMP) are selected. 2019-11-04 07:15:06 -06:00
Guiding Li 8b92305265 This commit brings in the drivers needed to support OpenAMP. These changes were ported from https://github.com/FishsemiCode/nuttx. The current state: Most drivers do now compile but are not yet verfied.
This port was effort of a number of people, I rather arbitrarily gave authorship to Guiding Li because he has the largest number of fundamental quashed commits from the Xiamoi repository.

Squashed commit of the following:

Author: Xiang Xiao <xiaoxiang@pinecone.net>
    include/nuttx/b2c.h and libx/libc/string:  Add non-standard string functions to deal with cases where there are more than 8-bits in a type char.

Author: Gregory Nutt <gnutt@nuttx.org>
    Fix several build issues/missing definitiona needed for OpenAMP build in drivers/.
    Add OpenAMP code has been reviewed and ran through tools/nxstyle (with all reports accounted for).

Author: Xiang Xiao <xiaoxiang@xiaomi.com>
    tools/:  Fix the minor issue in Makefile

Author: Gregory Nutt <gnutt@nuttx.org>
    drivers/rptun/rptun.c:  Review for coding standard.  Run against tools/nxstyle.
    tools/LibTargets.mk:  Fix some TABs that were turned into spaces by a copy-paste.
    fs/hostfs:  Add configure and build support for hostfs RPC.
    drivers/timer:  Add configure and build support for syslog RTC.
    drivers/syslog:  Add configure and build support for syslog RPC.
    drivers/serial:  Add configure and build support for serial RPC.
    Kconfig, tools/*.mk. openamp/:  Add basic OpenAMP build support.
    drivers/rptun:  Add configure and build support for OpenAMP tunnel drivers.
    drivers/net:  Update Make.defs and Kconfig for OpenSDA support.
    Remove drivers/clk/clk-rpmsg.c drivers/power/rpmsg_regulator.c.  These depend on upstreaming support for a new subsystem based on the clk/regulator is model from Linux.  Removed because we want to separate the activities.  We will just try to get the basic OpenAMP support in place for now.
    Remove drivers/misc/misc_rpmsg.c and include/nuttx/misc/misc_rpmsg.h.  These are specific to the Xiaomi application.

Author: zhuyanlin <zhuyanlin@pinecone.net>
    This commit brings in the OpenAMP OS driver/RPC components from https://github.com/FishsemiCode/nuttx.  Initial commit is source files only.  Additional changes to Kconfig and Make.defs files still needed.

Author: Jianli Dong <dongjianli@pinecone.net>
    This commit brings in the OpenAMP OS driver/RPC components from https://github.com/FishsemiCode/nuttx.  Initial commit is source files only.  Additional changes to Kconfig and Make.defs files still needed.

Author: Guiding Li <liguiding@pinecone.net>
    This commit brings in the OpenAMP OS driver/RPC components from https://github.com/FishsemiCode/nuttx.  Initial commit is source files only.  Additional changes to Kconfig and Make.defs files still needed.
2019-11-02 11:30:33 -06:00