All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] remoteproc: ti_k3_common: remove remote processor mailbox ping
@ 2025-08-06 17:48 Hiago De Franco
  2025-08-06 18:04 ` Andrew Davis
  2025-08-20 19:56 ` Mathieu Poirier
  0 siblings, 2 replies; 3+ messages in thread
From: Hiago De Franco @ 2025-08-06 17:48 UTC (permalink / raw)
  To: Bjorn Andersson, Mathieu Poirier
  Cc: Andrew Davis, Beleswar Prasad Padhi, linux-remoteproc,
	linux-kernel, Hiago De Franco

From: Hiago De Franco <hiago.franco@toradex.com>

As of today, pinging the remote processor during k3_rproc_request_mbox()
does not have any functional effect. This behavior was originally based on
the OMAP remoteproc driver, where the idea was to send messages such as
suspend requests (among others) to the remote processor, but this was
never upstreamed.

Currently, the ping message has no effect in upstream usage and causes an
unread message to remain in the mailbox, which ultimately prevents the
system from entering suspend mode:

Freezing remaining freezable tasks completed (elapsed 0.001 seconds)
printk: Suspending console(s) (use no_console_suspend to debug)
omap-mailbox 29000000.mailbox: fifo 1 has unexpected unread messages
omap-mailbox 29000000.mailbox: PM: dpm_run_callback(): platform_pm_suspend returns -16
omap-mailbox 29000000.mailbox: PM: failed to suspend: error -16

The ping is only replied if the remote core firmware is capable of doing
it, otherwise the unread message stays into the mailbox.

Remove the ping and fix the suspend issue.

Suggested-by: Andrew Davis <afd@ti.com>
Signed-off-by: Hiago De Franco <hiago.franco@toradex.com>
---
Hi,

this is the result patch of the discussion from

https://lore.kernel.org/lkml/20250725150713.barg5lhqr4reoxv3@hiagonb/
---
 drivers/remoteproc/ti_k3_common.c | 15 ---------------
 1 file changed, 15 deletions(-)

diff --git a/drivers/remoteproc/ti_k3_common.c b/drivers/remoteproc/ti_k3_common.c
index d4f20900f33bdd92a59c62d0a7b166c4ad66ed16..8266e11914af87ac38977763099521dee4334348 100644
--- a/drivers/remoteproc/ti_k3_common.c
+++ b/drivers/remoteproc/ti_k3_common.c
@@ -160,7 +160,6 @@ int k3_rproc_request_mbox(struct rproc *rproc)
 	struct k3_rproc *kproc = rproc->priv;
 	struct mbox_client *client = &kproc->client;
 	struct device *dev = kproc->dev;
-	int ret;
 
 	client->dev = dev;
 	client->tx_done = NULL;
@@ -173,20 +172,6 @@ int k3_rproc_request_mbox(struct rproc *rproc)
 		return dev_err_probe(dev, PTR_ERR(kproc->mbox),
 				     "mbox_request_channel failed\n");
 
-	/*
-	 * Ping the remote processor, this is only for sanity-sake for now;
-	 * there is no functional effect whatsoever.
-	 *
-	 * Note that the reply will _not_ arrive immediately: this message
-	 * will wait in the mailbox fifo until the remote processor is booted.
-	 */
-	ret = mbox_send_message(kproc->mbox, (void *)RP_MBOX_ECHO_REQUEST);
-	if (ret < 0) {
-		dev_err(dev, "mbox_send_message failed (%pe)\n", ERR_PTR(ret));
-		mbox_free_channel(kproc->mbox);
-		return ret;
-	}
-
 	return 0;
 }
 EXPORT_SYMBOL_GPL(k3_rproc_request_mbox);

---
base-commit: 6bcdbd62bd56e6d7383f9e06d9d148935b3c9b73
change-id: 20250805-v1-fix-am62-hmp-suspend-aed6a8de0225

Best regards,
-- 
Hiago De Franco <hiago.franco@toradex.com>


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] remoteproc: ti_k3_common: remove remote processor mailbox ping
  2025-08-06 17:48 [PATCH] remoteproc: ti_k3_common: remove remote processor mailbox ping Hiago De Franco
@ 2025-08-06 18:04 ` Andrew Davis
  2025-08-20 19:56 ` Mathieu Poirier
  1 sibling, 0 replies; 3+ messages in thread
From: Andrew Davis @ 2025-08-06 18:04 UTC (permalink / raw)
  To: Hiago De Franco, Bjorn Andersson, Mathieu Poirier
  Cc: Beleswar Prasad Padhi, linux-remoteproc, linux-kernel,
	Hiago De Franco

On 8/6/25 12:48 PM, Hiago De Franco wrote:
> From: Hiago De Franco <hiago.franco@toradex.com>
> 
> As of today, pinging the remote processor during k3_rproc_request_mbox()
> does not have any functional effect. This behavior was originally based on
> the OMAP remoteproc driver, where the idea was to send messages such as
> suspend requests (among others) to the remote processor, but this was
> never upstreamed.
> 
> Currently, the ping message has no effect in upstream usage and causes an
> unread message to remain in the mailbox, which ultimately prevents the
> system from entering suspend mode:
> 
> Freezing remaining freezable tasks completed (elapsed 0.001 seconds)
> printk: Suspending console(s) (use no_console_suspend to debug)
> omap-mailbox 29000000.mailbox: fifo 1 has unexpected unread messages
> omap-mailbox 29000000.mailbox: PM: dpm_run_callback(): platform_pm_suspend returns -16
> omap-mailbox 29000000.mailbox: PM: failed to suspend: error -16
> 
> The ping is only replied if the remote core firmware is capable of doing
> it, otherwise the unread message stays into the mailbox.
> 
> Remove the ping and fix the suspend issue.
> 
> Suggested-by: Andrew Davis <afd@ti.com>
> Signed-off-by: Hiago De Franco <hiago.franco@toradex.com>
> ---

Looks good to me,

Acked-by: Andrew Davis <afd@ti.com>

> Hi,
> 
> this is the result patch of the discussion from
> 
> https://lore.kernel.org/lkml/20250725150713.barg5lhqr4reoxv3@hiagonb/
> ---
>   drivers/remoteproc/ti_k3_common.c | 15 ---------------
>   1 file changed, 15 deletions(-)
> 
> diff --git a/drivers/remoteproc/ti_k3_common.c b/drivers/remoteproc/ti_k3_common.c
> index d4f20900f33bdd92a59c62d0a7b166c4ad66ed16..8266e11914af87ac38977763099521dee4334348 100644
> --- a/drivers/remoteproc/ti_k3_common.c
> +++ b/drivers/remoteproc/ti_k3_common.c
> @@ -160,7 +160,6 @@ int k3_rproc_request_mbox(struct rproc *rproc)
>   	struct k3_rproc *kproc = rproc->priv;
>   	struct mbox_client *client = &kproc->client;
>   	struct device *dev = kproc->dev;
> -	int ret;
>   
>   	client->dev = dev;
>   	client->tx_done = NULL;
> @@ -173,20 +172,6 @@ int k3_rproc_request_mbox(struct rproc *rproc)
>   		return dev_err_probe(dev, PTR_ERR(kproc->mbox),
>   				     "mbox_request_channel failed\n");
>   
> -	/*
> -	 * Ping the remote processor, this is only for sanity-sake for now;
> -	 * there is no functional effect whatsoever.
> -	 *
> -	 * Note that the reply will _not_ arrive immediately: this message
> -	 * will wait in the mailbox fifo until the remote processor is booted.
> -	 */
> -	ret = mbox_send_message(kproc->mbox, (void *)RP_MBOX_ECHO_REQUEST);
> -	if (ret < 0) {
> -		dev_err(dev, "mbox_send_message failed (%pe)\n", ERR_PTR(ret));
> -		mbox_free_channel(kproc->mbox);
> -		return ret;
> -	}
> -
>   	return 0;
>   }
>   EXPORT_SYMBOL_GPL(k3_rproc_request_mbox);
> 
> ---
> base-commit: 6bcdbd62bd56e6d7383f9e06d9d148935b3c9b73
> change-id: 20250805-v1-fix-am62-hmp-suspend-aed6a8de0225
> 
> Best regards,


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] remoteproc: ti_k3_common: remove remote processor mailbox ping
  2025-08-06 17:48 [PATCH] remoteproc: ti_k3_common: remove remote processor mailbox ping Hiago De Franco
  2025-08-06 18:04 ` Andrew Davis
@ 2025-08-20 19:56 ` Mathieu Poirier
  1 sibling, 0 replies; 3+ messages in thread
From: Mathieu Poirier @ 2025-08-20 19:56 UTC (permalink / raw)
  To: Hiago De Franco
  Cc: Bjorn Andersson, Andrew Davis, Beleswar Prasad Padhi,
	linux-remoteproc, linux-kernel, Hiago De Franco

On Wed, Aug 06, 2025 at 02:48:17PM -0300, Hiago De Franco wrote:
> From: Hiago De Franco <hiago.franco@toradex.com>
> 
> As of today, pinging the remote processor during k3_rproc_request_mbox()
> does not have any functional effect. This behavior was originally based on
> the OMAP remoteproc driver, where the idea was to send messages such as
> suspend requests (among others) to the remote processor, but this was
> never upstreamed.
> 
> Currently, the ping message has no effect in upstream usage and causes an
> unread message to remain in the mailbox, which ultimately prevents the
> system from entering suspend mode:
> 
> Freezing remaining freezable tasks completed (elapsed 0.001 seconds)
> printk: Suspending console(s) (use no_console_suspend to debug)
> omap-mailbox 29000000.mailbox: fifo 1 has unexpected unread messages
> omap-mailbox 29000000.mailbox: PM: dpm_run_callback(): platform_pm_suspend returns -16
> omap-mailbox 29000000.mailbox: PM: failed to suspend: error -16
> 
> The ping is only replied if the remote core firmware is capable of doing
> it, otherwise the unread message stays into the mailbox.
> 
> Remove the ping and fix the suspend issue.
> 
> Suggested-by: Andrew Davis <afd@ti.com>
> Signed-off-by: Hiago De Franco <hiago.franco@toradex.com>
> ---
> Hi,
> 
> this is the result patch of the discussion from
> 
> https://lore.kernel.org/lkml/20250725150713.barg5lhqr4reoxv3@hiagonb/
> ---
>  drivers/remoteproc/ti_k3_common.c | 15 ---------------
>  1 file changed, 15 deletions(-)
>

Applied - thanks,
Mathieu
 
> diff --git a/drivers/remoteproc/ti_k3_common.c b/drivers/remoteproc/ti_k3_common.c
> index d4f20900f33bdd92a59c62d0a7b166c4ad66ed16..8266e11914af87ac38977763099521dee4334348 100644
> --- a/drivers/remoteproc/ti_k3_common.c
> +++ b/drivers/remoteproc/ti_k3_common.c
> @@ -160,7 +160,6 @@ int k3_rproc_request_mbox(struct rproc *rproc)
>  	struct k3_rproc *kproc = rproc->priv;
>  	struct mbox_client *client = &kproc->client;
>  	struct device *dev = kproc->dev;
> -	int ret;
>  
>  	client->dev = dev;
>  	client->tx_done = NULL;
> @@ -173,20 +172,6 @@ int k3_rproc_request_mbox(struct rproc *rproc)
>  		return dev_err_probe(dev, PTR_ERR(kproc->mbox),
>  				     "mbox_request_channel failed\n");
>  
> -	/*
> -	 * Ping the remote processor, this is only for sanity-sake for now;
> -	 * there is no functional effect whatsoever.
> -	 *
> -	 * Note that the reply will _not_ arrive immediately: this message
> -	 * will wait in the mailbox fifo until the remote processor is booted.
> -	 */
> -	ret = mbox_send_message(kproc->mbox, (void *)RP_MBOX_ECHO_REQUEST);
> -	if (ret < 0) {
> -		dev_err(dev, "mbox_send_message failed (%pe)\n", ERR_PTR(ret));
> -		mbox_free_channel(kproc->mbox);
> -		return ret;
> -	}
> -
>  	return 0;
>  }
>  EXPORT_SYMBOL_GPL(k3_rproc_request_mbox);
> 
> ---
> base-commit: 6bcdbd62bd56e6d7383f9e06d9d148935b3c9b73
> change-id: 20250805-v1-fix-am62-hmp-suspend-aed6a8de0225
> 
> Best regards,
> -- 
> Hiago De Franco <hiago.franco@toradex.com>
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-08-20 19:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-06 17:48 [PATCH] remoteproc: ti_k3_common: remove remote processor mailbox ping Hiago De Franco
2025-08-06 18:04 ` Andrew Davis
2025-08-20 19:56 ` Mathieu Poirier

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.