From: sashiko-bot@kernel.org
To: "Karl Mehltretter" <kmehltretter@gmail.com>
Cc: linux-kernel@vger.kernel.org, linux-rt-devel@lists.linux.dev
Subject: Re: [PATCH 2/2] serial: amba-pl011: keep console clock enabled for atomic writes
Date: Sun, 19 Jul 2026 06:52:14 +0000 [thread overview]
Message-ID: <20260719065214.A40521F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260719063502.18852-3-kmehltretter@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] The UART clock is kept unconditionally enabled during system suspend, potentially preventing deep system sleep.
--
--- Patch [2]: [PATCH 2/2] serial: amba-pl011: keep console clock enabled for atomic writes ---
commit d187007d951bc1373a13bbdbd4ba5d6db47490d1
Author: Karl Mehltretter <kmehltretter@gmail.com>
serial: amba-pl011: keep console clock enabled for atomic writes
This commit fixes a sleeping-in-atomic bug under PREEMPT_RT by keeping the
console clock enabled while the console is registered. It moves the clock
enable from the atomic write path to console setup and exit.
> diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c
> index 1aa43994a3cdc..4facd1b350d5d 100644
> --- a/drivers/tty/serial/amba-pl011.c
> +++ b/drivers/tty/serial/amba-pl011.c
> @@ -2523,7 +2523,11 @@ static int pl011_console_setup(struct console *co, char *options)
> /* Allow pins to be muxed in and configured */
> pinctrl_pm_select_default_state(uap->port.dev);
>
> - ret = clk_prepare(uap->clk);
> + /*
> + * Keep the clock enabled while registered because write_atomic() may
> + * run in NMI context and must not acquire the clock framework lock.
> + */
> + ret = clk_prepare_enable(uap->clk);
[Severity: High]
Will this keep the UART clock unconditionally enabled during system suspend?
Because the persistent clock reference is acquired here during console
registration and only dropped on console exit in pl011_console_exit(), the
reference remains active.
During system suspend, pl011_suspend() delegates to uart_suspend_port() but
fails to drop this console's persistent clock enable reference. This might
prevent the SoC from turning off the clock tree or parent PLLs, preventing
deep system sleep.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260719063502.18852-1-kmehltretter@gmail.com?part=2
next prev parent reply other threads:[~2026-07-19 6:52 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-19 6:35 [PATCH 0/2] serial: amba-pl011: fix console clock lifetime Karl Mehltretter
2026-07-19 6:35 ` [PATCH 1/2] serial: amba-pl011: unprepare console clock on unregister Karl Mehltretter
2026-07-19 7:04 ` sashiko-bot
2026-07-19 10:27 ` Karl Mehltretter
2026-07-19 6:35 ` [PATCH 2/2] serial: amba-pl011: keep console clock enabled for atomic writes Karl Mehltretter
2026-07-19 6:52 ` sashiko-bot [this message]
2026-07-20 8:01 ` Sebastian Andrzej Siewior
2026-07-20 8:13 ` John Ogness
2026-07-20 8:26 ` Sebastian Andrzej Siewior
2026-07-20 21:26 ` Karl Mehltretter
2026-07-20 11:45 ` Petr Mladek
2026-07-20 12:15 ` Sebastian Andrzej Siewior
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=20260719065214.A40521F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=kmehltretter@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-devel@lists.linux.dev \
--cc=sashiko-reviews@lists.linux.dev \
/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 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.