stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 5.10.y 1/1] mailbox: imx: fix suspend failue
@ 2024-04-12  5:21 Daisuke Mizobuchi
  2024-04-12  5:47 ` Dominique MARTINET
       [not found] ` <2024041520-wasp-suave-8d3e@gregkh>
  0 siblings, 2 replies; 5+ messages in thread
From: Daisuke Mizobuchi @ 2024-04-12  5:21 UTC (permalink / raw)
  To: stable

When an interrupt occurs, it always wakes up.

Suspend fails as follows:
 armadillo:~# echo mem > /sys/power/state
 [ 2614.602432] PM: suspend entry (deep)
 [ 2614.610640] Filesystems sync: 0.004 seconds
 [ 2614.618016] Freezing user space processes ... (elapsed 0.001 seconds) done.
 [ 2614.626555] OOM killer disabled.
 [ 2614.629792] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
 [ 2614.638456] printk: Suspending console(s) (use no_console_suspend to debug)
 [ 2614.649504] PM: Some devices failed to suspend, or early wake event detected
 [ 2614.730103] PM: resume devices took 0.080 seconds
 [ 2614.741924] OOM killer enabled.
 [ 2614.745073] Restarting tasks ... done.
 [ 2614.754532] PM: suspend exit
 ash: write error: Resource busy
 armadillo:~#

Upstream is correct, so it seems to be a mistake in cheery-pick.

Cc: <stable@vger.kernel.org>
Fixes: a16f5ae8ade1 ("mailbox: imx: fix wakeup failure from freeze mode")
Signed-off-by: Daisuke Mizobuchi <mizo@atmark-techno.com>
---
 drivers/mailbox/imx-mailbox.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/mailbox/imx-mailbox.c b/drivers/mailbox/imx-mailbox.c
index c5663398c6b7..28f5450e4130 100644
--- a/drivers/mailbox/imx-mailbox.c
+++ b/drivers/mailbox/imx-mailbox.c
@@ -331,8 +331,6 @@ static int imx_mu_startup(struct mbox_chan *chan)
 		break;
 	}
 
-	priv->suspend = true;
-
 	return 0;
 }
 
@@ -550,8 +548,6 @@ static int imx_mu_probe(struct platform_device *pdev)
 
 	clk_disable_unprepare(priv->clk);
 
-	priv->suspend = false;
-
 	return 0;
 
 disable_runtime_pm:
@@ -614,6 +610,8 @@ static int __maybe_unused imx_mu_suspend_noirq(struct device *dev)
 	if (!priv->clk)
 		priv->xcr = imx_mu_read(priv, priv->dcfg->xCR);
 
+	priv->suspend = true;
+
 	return 0;
 }
 
@@ -632,6 +630,8 @@ static int __maybe_unused imx_mu_resume_noirq(struct device *dev)
 	if (!imx_mu_read(priv, priv->dcfg->xCR) && !priv->clk)
 		imx_mu_write(priv, priv->xcr, priv->dcfg->xCR);
 
+	priv->suspend = false;
+
 	return 0;
 }
 
-- 
2.30.2


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

* Re: [PATCH 5.10.y 1/1] mailbox: imx: fix suspend failue
  2024-04-12  5:21 [PATCH 5.10.y 1/1] mailbox: imx: fix suspend failue Daisuke Mizobuchi
@ 2024-04-12  5:47 ` Dominique MARTINET
  2024-04-15 11:18   ` Greg Kroah-Hartman
       [not found] ` <2024041520-wasp-suave-8d3e@gregkh>
  1 sibling, 1 reply; 5+ messages in thread
From: Dominique MARTINET @ 2024-04-12  5:47 UTC (permalink / raw)
  To: Daisuke Mizobuchi
  Cc: stable, Greg Kroah-Hartman, Jacky Bai, Peng Fan, Robin Gong, Jassi Brar

Added in Cc everyone concerned by the patch as per the broken backport:
https://lore.kernel.org/stable/20220405070315.416940927@linuxfoundation.org/

Daisuke Mizobuchi wrote on Fri, Apr 12, 2024 at 02:21:33PM +0900:
>Subject: Re: [PATCH 5.10.y 1/1] mailbox: imx: fix suspend failue

failue -> failure

>
> When an interrupt occurs, it always wakes up.

(nitpick: this isn't really clear: "imx_mu_isr() always calls
pm_system_wakeup() even when it should not, making the system unable to
enter sleep" ?)

> Suspend fails as follows:
>  armadillo:~# echo mem > /sys/power/state
>  [ 2614.602432] PM: suspend entry (deep)
>  [ 2614.610640] Filesystems sync: 0.004 seconds
>  [ 2614.618016] Freezing user space processes ... (elapsed 0.001 seconds) done.
>  [ 2614.626555] OOM killer disabled.
>  [ 2614.629792] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
>  [ 2614.638456] printk: Suspending console(s) (use no_console_suspend to debug)
>  [ 2614.649504] PM: Some devices failed to suspend, or early wake event detected
>  [ 2614.730103] PM: resume devices took 0.080 seconds
>  [ 2614.741924] OOM killer enabled.
>  [ 2614.745073] Restarting tasks ... done.
>  [ 2614.754532] PM: suspend exit
>  ash: write error: Resource busy
>  armadillo:~#
> 
> Upstream is correct, so it seems to be a mistake in cheery-pick.

cheery-pick -> cherry-pick

(This is a trivial lookup away but might as well name upstream's commit
e.g. "Upstream commit 892cb524ae8a is correct, so this seems to be a
mistake during cherry-pick")

> Cc: <stable@vger.kernel.org>
> Fixes: a16f5ae8ade1 ("mailbox: imx: fix wakeup failure from freeze mode")
> Signed-off-by: Daisuke Mizobuchi <mizo@atmark-techno.com>

These typos aside I've confirmed the resulting code matches' upstream's:
Reviewed-by: Dominique Martinet <dominique.martinet@atmark-techno.com>

The backport in 5.15 also seems correct and does not need this, and
there does not seem to be any older backport either that need fixing, so
5.10 is the only branch that requires fixing.

Thanks!


I've left the diff below for new Ccs.

> ---
>  drivers/mailbox/imx-mailbox.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/mailbox/imx-mailbox.c b/drivers/mailbox/imx-mailbox.c
> index c5663398c6b7..28f5450e4130 100644
> --- a/drivers/mailbox/imx-mailbox.c
> +++ b/drivers/mailbox/imx-mailbox.c
> @@ -331,8 +331,6 @@ static int imx_mu_startup(struct mbox_chan *chan)
>  		break;
>  	}
>  
> -	priv->suspend = true;
> -
>  	return 0;
>  }
>  
> @@ -550,8 +548,6 @@ static int imx_mu_probe(struct platform_device *pdev)
>  
>  	clk_disable_unprepare(priv->clk);
>  
> -	priv->suspend = false;
> -
>  	return 0;
>  
>  disable_runtime_pm:
> @@ -614,6 +610,8 @@ static int __maybe_unused imx_mu_suspend_noirq(struct device *dev)
>  	if (!priv->clk)
>  		priv->xcr = imx_mu_read(priv, priv->dcfg->xCR);
>  
> +	priv->suspend = true;
> +
>  	return 0;
>  }
>  
> @@ -632,6 +630,8 @@ static int __maybe_unused imx_mu_resume_noirq(struct device *dev)
>  	if (!imx_mu_read(priv, priv->dcfg->xCR) && !priv->clk)
>  		imx_mu_write(priv, priv->xcr, priv->dcfg->xCR);
>  
> +	priv->suspend = false;
> +
>  	return 0;
>  }
>  
-- 
Dominique Martinet



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

* Re: [PATCH 5.10.y 1/1] mailbox: imx: fix suspend failue
  2024-04-12  5:47 ` Dominique MARTINET
@ 2024-04-15 11:18   ` Greg Kroah-Hartman
  0 siblings, 0 replies; 5+ messages in thread
From: Greg Kroah-Hartman @ 2024-04-15 11:18 UTC (permalink / raw)
  To: Dominique MARTINET
  Cc: Daisuke Mizobuchi, stable, Jacky Bai, Peng Fan, Robin Gong, Jassi Brar

On Fri, Apr 12, 2024 at 02:47:38PM +0900, Dominique MARTINET wrote:
> Added in Cc everyone concerned by the patch as per the broken backport:
> https://lore.kernel.org/stable/20220405070315.416940927@linuxfoundation.org/
> 
> Daisuke Mizobuchi wrote on Fri, Apr 12, 2024 at 02:21:33PM +0900:
> >Subject: Re: [PATCH 5.10.y 1/1] mailbox: imx: fix suspend failue
> 
> failue -> failure
> 
> >
> > When an interrupt occurs, it always wakes up.
> 
> (nitpick: this isn't really clear: "imx_mu_isr() always calls
> pm_system_wakeup() even when it should not, making the system unable to
> enter sleep" ?)
> 
> > Suspend fails as follows:
> >  armadillo:~# echo mem > /sys/power/state
> >  [ 2614.602432] PM: suspend entry (deep)
> >  [ 2614.610640] Filesystems sync: 0.004 seconds
> >  [ 2614.618016] Freezing user space processes ... (elapsed 0.001 seconds) done.
> >  [ 2614.626555] OOM killer disabled.
> >  [ 2614.629792] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
> >  [ 2614.638456] printk: Suspending console(s) (use no_console_suspend to debug)
> >  [ 2614.649504] PM: Some devices failed to suspend, or early wake event detected
> >  [ 2614.730103] PM: resume devices took 0.080 seconds
> >  [ 2614.741924] OOM killer enabled.
> >  [ 2614.745073] Restarting tasks ... done.
> >  [ 2614.754532] PM: suspend exit
> >  ash: write error: Resource busy
> >  armadillo:~#
> > 
> > Upstream is correct, so it seems to be a mistake in cheery-pick.
> 
> cheery-pick -> cherry-pick
> 
> (This is a trivial lookup away but might as well name upstream's commit
> e.g. "Upstream commit 892cb524ae8a is correct, so this seems to be a
> mistake during cherry-pick")
> 
> > Cc: <stable@vger.kernel.org>
> > Fixes: a16f5ae8ade1 ("mailbox: imx: fix wakeup failure from freeze mode")
> > Signed-off-by: Daisuke Mizobuchi <mizo@atmark-techno.com>
> 
> These typos aside I've confirmed the resulting code matches' upstream's:
> Reviewed-by: Dominique Martinet <dominique.martinet@atmark-techno.com>
> 
> The backport in 5.15 also seems correct and does not need this, and
> there does not seem to be any older backport either that need fixing, so
> 5.10 is the only branch that requires fixing.

Thanks for the review, now queued up.

greg k-h

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

* Re: Patch "mailbox: imx: fix suspend failue" has been added to the 5.10-stable tree
       [not found] ` <2024041520-wasp-suave-8d3e@gregkh>
@ 2024-04-16  0:02   ` Dominique Martinet
  2024-04-18 10:01     ` Greg KH
  0 siblings, 1 reply; 5+ messages in thread
From: Dominique Martinet @ 2024-04-16  0:02 UTC (permalink / raw)
  To: gregkh; +Cc: mizo, stable, Peng Fan

Hi Greg,

gregkh@linuxfoundation.org wrote on Mon, Apr 15, 2024 at 01:18:20PM +0200:
>     mailbox: imx: fix suspend failue
> 
> to the 5.10-stable tree which can be found at:
>     http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
> 
> The filename of the patch is:
>      mailbox-imx-fix-suspend-failue.patch
> and it can be found in the queue-5.10 subdirectory.

This only fixes typos in the commit message, but Mizobuchi sent a v2 here:
https://lore.kernel.org/all/20240412055648.1807780-1-mizo@atmark-techno.com/T/#u

(unfortunately you weren't in cc of the patch mail either, sorry... He
can resend if that helps with the process)

Peng Fan also gave his reviewed-by in the v2 thread, it's always
appreciable to get an ack from someone closer to the authors.


Since the code itself is identical, I'll leave the decision to update or
not up to you; I just can't unsee the "failue" in the summary :)

Thanks!
-- 
Dominique



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

* Re: Patch "mailbox: imx: fix suspend failue" has been added to the 5.10-stable tree
  2024-04-16  0:02   ` Patch "mailbox: imx: fix suspend failue" has been added to the 5.10-stable tree Dominique Martinet
@ 2024-04-18 10:01     ` Greg KH
  0 siblings, 0 replies; 5+ messages in thread
From: Greg KH @ 2024-04-18 10:01 UTC (permalink / raw)
  To: Dominique Martinet; +Cc: mizo, stable, Peng Fan

On Tue, Apr 16, 2024 at 09:02:00AM +0900, Dominique Martinet wrote:
> Hi Greg,
> 
> gregkh@linuxfoundation.org wrote on Mon, Apr 15, 2024 at 01:18:20PM +0200:
> >     mailbox: imx: fix suspend failue
> > 
> > to the 5.10-stable tree which can be found at:
> >     http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
> > 
> > The filename of the patch is:
> >      mailbox-imx-fix-suspend-failue.patch
> > and it can be found in the queue-5.10 subdirectory.
> 
> This only fixes typos in the commit message, but Mizobuchi sent a v2 here:
> https://lore.kernel.org/all/20240412055648.1807780-1-mizo@atmark-techno.com/T/#u
> 
> (unfortunately you weren't in cc of the patch mail either, sorry... He
> can resend if that helps with the process)
> 
> Peng Fan also gave his reviewed-by in the v2 thread, it's always
> appreciable to get an ack from someone closer to the authors.
> 
> 
> Since the code itself is identical, I'll leave the decision to update or
> not up to you; I just can't unsee the "failue" in the summary :)

I've updated the text based on the v2 and added the reviewed-by as well,
thanks for pointing it out.

greg k-h

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

end of thread, other threads:[~2024-04-18 10:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-12  5:21 [PATCH 5.10.y 1/1] mailbox: imx: fix suspend failue Daisuke Mizobuchi
2024-04-12  5:47 ` Dominique MARTINET
2024-04-15 11:18   ` Greg Kroah-Hartman
     [not found] ` <2024041520-wasp-suave-8d3e@gregkh>
2024-04-16  0:02   ` Patch "mailbox: imx: fix suspend failue" has been added to the 5.10-stable tree Dominique Martinet
2024-04-18 10:01     ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).