From: Fushuai Wang <fushuai.wang@linux.dev>
To: andy.shevchenko@gmail.com
Cc: fushuai.wang@linux.dev, gregkh@linuxfoundation.org,
ilpo.jarvinen@linux.intel.com, jirislaby@kernel.org,
kees@kernel.org, linux-kernel@vger.kernel.org,
linux-serial@vger.kernel.org, osama.abdelkader@gmail.com,
wangfushuai@baidu.com
Subject: Re: [PATCH] serial: 8250: Clear CON_PRINTBUFFER on port re-registration
Date: Thu, 16 Apr 2026 18:02:54 +0800 [thread overview]
Message-ID: <20260416100254.30581-1-fushuai.wang@linux.dev> (raw)
In-Reply-To: <CAHp75Vfrw6jLWOm6gC3gjMnUrvyd5nxvS16sJj5TP_JxaDSDNQ@mail.gmail.com>
>>
>> From: Fushuai Wang <wangfushuai@baidu.com>
>>
>> When two PnP devices map to the same physical port, the serial8250 driver
>> removes and re-registers the console structure for the same port.
>
> Is it a real device out of there? Can you share what that is?
Yes, it's a real device.
In my Intel(R) Xeon(R) 6971P-C machine, the boot log shows:
[ 17.242984] 00:04: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A
[ 17.251352] printk: console [ttyS0] disabled
[ 17.257934] serial 00:04: Runtime PM usage count underflow!
[ 17.258360] 00:05: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A
[ 17.258516] printk: console [ttyS0] enabled
[ 29.643013] serial8250: ttyS1 at I/O 0x2f8 (irq = 3, base_baud = 115200) is a 16550A
The issue occurs when BIOS "Serial Device" option is set to BMC:
Setup Question = Serial Device
Help String = Sets the Serial Device used to output bios serial log
Token = 9003 // Do NOT change this line
Offset = 2F8
Width = 01
BIOS Default =[01]BMC
Options = *[01]BMC // Move "*" to desired Option
[02]S3M
So 00:05 may be the BMC serial port device. From ACPI paths:
/sys/bus/pnp/devices/00:04/firmware_node/path: \_SB_.LPC0.UAR1
/sys/bus/pnp/devices/00:05/firmware_node/path: \_SB_.UAR1
>> During re-registration, the console structure still has CON_PRINTBUFFER set
>> from the initial registration, which causes console_init_seq() to set
>> console->seq to syslog_seq. This results in re-printing the entire
>> system log buffer, which may lead to RCU stall on slow serial consoles.
>>
>> Clear CON_PRINTBUFFER when re-registering a port to prevent duplicate
>> log printing.
>
>Seems like the Fixes tag is missing.
Yes, I will add Fixes tag lately.
--
Regards,
WANG
next prev parent reply other threads:[~2026-04-16 10:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-16 9:29 [PATCH] serial: 8250: Clear CON_PRINTBUFFER on port re-registration Fushuai Wang
2026-04-16 9:40 ` Andy Shevchenko
2026-04-16 10:02 ` Fushuai Wang [this message]
2026-04-16 10:15 ` Andy Shevchenko
2026-04-16 11:32 ` Fushuai Wang
2026-04-16 18:30 ` Andy Shevchenko
2026-04-17 4:00 ` Fushuai Wang
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=20260416100254.30581-1-fushuai.wang@linux.dev \
--to=fushuai.wang@linux.dev \
--cc=andy.shevchenko@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=jirislaby@kernel.org \
--cc=kees@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=osama.abdelkader@gmail.com \
--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