linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Tony Lindgren <tony@atomide.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jiri Slaby <jirislaby@kernel.org>,
	Peter Hurley <peter@hurleysoftware.com>,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	Andy Shevchenko <andriy.shevchenko@intel.com>,
	Dhruva Gole <d-gole@ti.com>, Johan Hovold <johan@kernel.org>,
	Vignesh Raghavendra <vigneshr@ti.com>,
	linux-omap@vger.kernel.org,
	linux-serial <linux-serial@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/4] serial: 8250: omap: Fix freeing of resources on failed register
Date: Mon, 8 May 2023 12:55:38 +0300 (EEST)	[thread overview]
Message-ID: <9ea78388-86f-736b-e46-b3bc6223ddbe@linux.intel.com> (raw)
In-Reply-To: <20230508082014.23083-2-tony@atomide.com>

[-- Attachment #1: Type: text/plain, Size: 1288 bytes --]

On Mon, 8 May 2023, Tony Lindgren wrote:

> If serial8250_register_8250_port() fails, the SoC can hang as the
> deferred PMQoS work will still run as is not flushed and removed.
> 
> Fixes: 61929cf0169d ("tty: serial: Add 8250-core based omap driver")
> Signed-off-by: Tony Lindgren <tony@atomide.com>
> ---
>  drivers/tty/serial/8250/8250_omap.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/tty/serial/8250/8250_omap.c b/drivers/tty/serial/8250/8250_omap.c
> --- a/drivers/tty/serial/8250/8250_omap.c
> +++ b/drivers/tty/serial/8250/8250_omap.c
> @@ -1532,7 +1532,9 @@ static int omap8250_probe(struct platform_device *pdev)
>  err:
>  	pm_runtime_dont_use_autosuspend(&pdev->dev);
>  	pm_runtime_put_sync(&pdev->dev);
> +	flush_work(&priv->qos_work);
>  	pm_runtime_disable(&pdev->dev);
> +	cpu_latency_qos_remove_request(&priv->pm_qos_request);
>  	return ret;

Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>

An unrelated comment to the patch itself, there seems to be somewhat 
handwavy and possibly wrong calculation for the pm qos latency. First of 
all, I think it would want something based on port->frame_time, and I'm 
far from convinced that 64 is right as it matches FIFO size which doesn't 
feel correct for a wakeup related time.

-- 
 i.

  reply	other threads:[~2023-05-08  9:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20230508082014.23083-1-tony@atomide.com>
2023-05-08  8:20 ` [PATCH 1/4] serial: 8250: omap: Fix freeing of resources on failed register Tony Lindgren
2023-05-08  9:55   ` Ilpo Järvinen [this message]
2023-05-08 11:08     ` Tony Lindgren
2023-05-08  8:20 ` [PATCH 2/4] serial: 8250: omap: Fix imprecise external abort for omap_8250_pm() Tony Lindgren
2023-05-08  8:20 ` [PATCH 3/4] serial: 8250: omap: Fix life cycle issues for interrupt handlers Tony Lindgren
2023-05-08  8:20 ` [PATCH 4/4] serial: 8250: omap: Shut down on remove for console uart Tony Lindgren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9ea78388-86f-736b-e46-b3bc6223ddbe@linux.intel.com \
    --to=ilpo.jarvinen@linux.intel.com \
    --cc=andriy.shevchenko@intel.com \
    --cc=bigeasy@linutronix.de \
    --cc=d-gole@ti.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jirislaby@kernel.org \
    --cc=johan@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=peter@hurleysoftware.com \
    --cc=tony@atomide.com \
    --cc=vigneshr@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).