Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: John Ogness <john.ogness@linutronix.de>
To: "Toshiyuki Sato (Fujitsu)" <fj6611ie@fujitsu.com>,
	'Karl Mehltretter' <kmehltretter@gmail.com>
Cc: Russell King <linux@armlinux.org.uk>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jiri Slaby <jirislaby@kernel.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"linux-serial@vger.kernel.org" <linux-serial@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-rt-devel@lists.linux.dev" <linux-rt-devel@lists.linux.dev>,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	Petr Mladek <pmladek@suse.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Clark Williams <clrkwllms@kernel.org>,
	"Toshiyuki Sato (Fujitsu)" <fj6611ie@fujitsu.com>
Subject: RE: [PATCH v2 2/2] serial: amba-pl011: keep console clock enabled for atomic writes
Date: Mon, 27 Jul 2026 14:05:50 +0206	[thread overview]
Message-ID: <87pl0863t5.fsf@jogness.linutronix.de> (raw)
In-Reply-To: <TYXPR01MB15199DA567AF4541DD79359FBD7CC2@TYXPR01MB15199.jpnprd01.prod.outlook.com>

Hi Toshiyuki,

On 2026-07-27, "Toshiyuki Sato (Fujitsu)" <fj6611ie@fujitsu.com> wrote:
> Regarding Petr's comment [1] as well, I'm concerned about the
> potential impact when the clk remains enabled during periods without
> console output.

Can you elaborate on your concerns? Do you actually need such low-power
_and_ kernel logging directly on serial?

> When creating nbcon patch, I saw a similar patch [2] from the past.
> Have you considered coordinating with the clk subsystem implementation
> for this?

AFAICT there was no real justification for enabling clocks per write
other than because we can. A lot has changed since 2013 and neither
spin_locks nor raw_spin_locks are appropriate because atomic printing
can occur in _any_ context (including NMI's).

If the amba-pl011 insists on enabling clocks per write, I would
recommend not implementing the write_atomic() callback. Since I assume a
significant amount of users _will_ want atomic printing support, perhaps
you can add a Kconfig to toggle building with clock-disabling and no
atomic, or clock-always-on and atomic.

Note that there is also CON_NBCON_ATOMIC_UNSAFE available, if the driver
wants to somehow blindly enable clocks on panic in order to unsafely
dump panic logs.

John Ogness

> [1] https://lore.kernel.org/all/al4KdsU9YLOmwDoV@pathway.suse.cz/
> [2] https://lore.kernel.org/all/1359475526-17523-1-git-send-email-walimisdev@gmail.com/


      reply	other threads:[~2026-07-27 12:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-24 21:33 [PATCH v2 0/2] serial: amba-pl011: fix console clock lifetime Karl Mehltretter
2026-07-24 21:33 ` [PATCH v2 1/2] serial: amba-pl011: unprepare console clock on unregister Karl Mehltretter
2026-07-24 21:33 ` [PATCH v2 2/2] serial: amba-pl011: keep console clock enabled for atomic writes Karl Mehltretter
2026-07-27  2:46   ` Toshiyuki Sato (Fujitsu)
2026-07-27 11:59     ` John Ogness [this message]

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=87pl0863t5.fsf@jogness.linutronix.de \
    --to=john.ogness@linutronix.de \
    --cc=bigeasy@linutronix.de \
    --cc=clrkwllms@kernel.org \
    --cc=fj6611ie@fujitsu.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jirislaby@kernel.org \
    --cc=kmehltretter@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rt-devel@lists.linux.dev \
    --cc=linux-serial@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=pmladek@suse.com \
    --cc=rostedt@goodmis.org \
    /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