From: Fushuai Wang <fushuai.wang@linux.dev>
To: andy.shevchenko@gmail.com
Cc: alan@linux.intel.com, asrinivasan@oss.tenstorrent.com,
fushuai.wang@linux.dev, gregkh@linuxfoundation.org,
ilpo.jarvinen@linux.intel.com, jackzxcui1989@163.com,
jirislaby@kernel.org, kees@kernel.org,
linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org,
linux-serial@vger.kernel.org, osama.abdelkader@gmail.com,
sean@mess.org, wangfushuai@baidu.com
Subject: [PATCH v3] serial: 8250: Clear CON_PRINTBUFFER on port re-registration
Date: Tue, 21 Jul 2026 11:14:27 +0800 [thread overview]
Message-ID: <20260721031427.53396-1-fushuai.wang@linux.dev> (raw)
In-Reply-To: <CAHp75VcTs2Vro3vg8dqmYfRebk6bBfmJCZFBgD2KMHpTKY6jvQ@mail.gmail.com>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=y, Size: 2041 bytes --]
> > On Fri, May 22, 2026 at 06:10:42PM +0800, Fushuai Wang wrote:
>
> > Seems like this patch was added in next-20261717.
>
> 0717
>
> > I'm noticing that this patch is causing no serial output to be visible
> > on riscv boards till the uart device is registered. Normally while
> > booting, we expect for all the prints made before this to be
> > buffered and appear post serial device initialization.
> >
> > => booti 0x11000000 0x21000000:${initrd_size} 0x31000000
> > Moving Image from 0x11000000 to 0x200000, end=1ca6000
> > [ 161.301] ## Flattened Device Tree blob at 31000000
> > [ 161.302] Booting using the fdt blob at 0x31000000
> > [ 161.307] Loading Ramdisk to 7653e000, end 7dd81853 ... OK
> > [ 161.366] Loading Device Tree to 0000000076532000, end 000000007653d25d ... OK
> >
> > Starting kernel ...
> >
> > [ 0.235159] printk: legacy console [ttyS0] enabled
> > [ 0.238787] /soc/i2c@d401d800/pmic@41: Fixed dependency cycle(s) with /soc/i2c@d401d800/pmic@41/regulators/buck5
> >
> > Most devs who are debugging might be booting with the earlycon boot
> > parameter. If earlycon is present, serial output is present, but
> > with earlycon missing (which is what most distros use), I don't get
> > any serial output till this point.
>
> Perhaps it's inconvenient. Logically I support using earlycon (I have
> noticed a few times in the past double printing of the kernel buffer
> to the serial console). So I tend more towards that this patch
> actually gives a better experience. However, I haven't given any tag
> to it, nor do I object to any improvements or reverting to the old
> behaviour — your inconvenience will become mine :-)
>
> Just my 2c.
>
> --
> With Best Regards,
> Andy Shevchenko
Hi, Andy and Anirudh
Thanks for the report. I only tested this on x86 and don't have a
RISC-V environment.
I think this patch should be reverted in -next. Since I haven't done
this before, could you let me know the proper way to handle this?
I'll also explore a better approach later.
--
Regards,
Fushuai
prev parent reply other threads:[~2026-07-21 3:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-22 10:10 [PATCH v3] serial: 8250: Clear CON_PRINTBUFFER on port re-registration Fushuai Wang
2026-06-03 6:56 ` Fushuai Wang
2026-07-20 19:21 ` Anirudh Srinivasan
2026-07-20 20:22 ` Andy Shevchenko
2026-07-21 3:14 ` Fushuai Wang [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=20260721031427.53396-1-fushuai.wang@linux.dev \
--to=fushuai.wang@linux.dev \
--cc=alan@linux.intel.com \
--cc=andy.shevchenko@gmail.com \
--cc=asrinivasan@oss.tenstorrent.com \
--cc=gregkh@linuxfoundation.org \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=jackzxcui1989@163.com \
--cc=jirislaby@kernel.org \
--cc=kees@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux-serial@vger.kernel.org \
--cc=osama.abdelkader@gmail.com \
--cc=sean@mess.org \
--cc=wangfushuai@baidu.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