This is an automated email from the ASF dual-hosted git repository. GUIDINGLI pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 761e23db8610f95ae2b6edbab1f7975b9e9f70d0 Author: Bowen Wang <[email protected]> AuthorDate: Wed May 20 17:05:13 2026 +0800 drivers/rptun: log the reset wait and the trace dump, use _emerg() rptun_dev_reset() waits up to CONFIG_RPTUN_STATUS_TIMEOUT_MS for the peer to take a reset request without printing anything, so a slow or stuck peer left no trace in the log. Print the time left once a second, and name the core whose trace buffer is dumped. Print the rptun EMERG messages with _emerg() instead of syslog(LOG_EMERG, ...). Signed-off-by: Bowen Wang <[email protected]> --- drivers/rptun/rptun.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/drivers/rptun/rptun.c b/drivers/rptun/rptun.c index 889b1a9ab18..408581f56a2 100644 --- a/drivers/rptun/rptun.c +++ b/drivers/rptun/rptun.c @@ -1018,13 +1018,12 @@ static void rptun_check_peer_status(FAR struct rptun_priv_s *priv) */ priv->rproc.rsc_table = NULL; - syslog(LOG_EMERG, "Stop by remote core: %s\n", - RPTUN_GET_CPUNAME(priv->dev)); + _emerg("Stop by remote core: %s\n", RPTUN_GET_CPUNAME(priv->dev)); work_queue(HPWORK, &priv->work, rptun_stop_work, priv, 0); } else if(status != 0u) { - syslog(LOG_EMERG, "FATAL: Reset by remote core: %s reason: %u\n", + _emerg("FATAL: Reset by remote core: %s reason: %u\n", RPTUN_GET_CPUNAME(priv->dev), RPTUN_REASON_GET(status)); if (RPTUN_STATUS_CHECK(status, BOARDIOC_SOFTRESETCAUSE_POWEROFF)) { @@ -1318,10 +1317,10 @@ static int rptun_dev_reset(FAR struct rptun_priv_s *priv, unsigned long val) if (priv->dev->ops->reset) { - syslog(LOG_EMERG, "Rptun driver reset remote %s reason: %lu\n", + _emerg("Rptun driver reset remote %s reason: %lu\n", RPTUN_GET_CPUNAME(priv->dev), val); ret = priv->dev->ops->reset(priv->dev, val); - syslog(LOG_EMERG, "Rptun driver reset remote %s ret %d\n", + _emerg("Rptun driver reset remote %s ret %d\n", RPTUN_GET_CPUNAME(priv->dev), ret); } @@ -1350,6 +1349,12 @@ static int rptun_dev_reset(FAR struct rptun_priv_s *priv, unsigned long val) break; } + if (timeout % 1000 == 0) + { + _emerg("Waiting %s reset, timeout left %d ms\n", + RPTUN_GET_CPUNAME(priv->dev), timeout); + } + if (up_interrupt_context()) { up_udelay(1000); @@ -1369,6 +1374,7 @@ static void rptun_dev_dump(FAR struct rptun_priv_s *priv) { if (priv->trace_va != NULL) { + _emerg("Dump %s's trace\n", RPTUN_GET_CPUNAME(priv->dev)); syslog_rpmsg_dump(priv->trace_va); } }
