From: sashiko-bot@kernel.org
To: shatyuka@qq.com
Cc: linux-serial@vger.kernel.org
Subject: Re: [PATCH v3] tty: hvc: dcc: Detect JTAG connection only on CPU core 0
Date: Wed, 14 Oct 2026 14:49:49 +0000 [thread overview]
Message-ID: <sashiko-outbox-171445@kernel.org> (raw)
In-Reply-To: <tencent_77968AD30F111278CBAE934BCFD0AF00E807@qq.com>
> From: Jiannan Du <shatyuka@qq.com>
>
> On SMP, migration can occur inside hvc_dcc_check() during device_initcall,
> so the CPU writing the probe character and the CPU reading the TXfull
> status may not be the same, which can hang the system.
>
> Commit 4419da5d5d4b1788568b ("tty: hvc: dcc: Bind driver to CPU core0
> for reads and writes") cached the DCC availability detected on core 0
> during console_initcall. However, this is not sufficient: if core 0
> does not detect DCC as available and another CPU later calls
> hvc_dcc_check(), the check is not actually performed on core 0.
>
> Since JTAG is not expected to be plugged or unplugged during kernel
> boot, especially between console_initcall and device_initcall, checking
> DCC availability multiple times is unnecessary. Cache the return value
> from hvc_dcc_console_init and reuse it in hvc_dcc_init. This avoids
> complex SMP-related code and ensures the result is always from core 0.
>
> Signed-off-by: Jiannan Du <shatyuka@qq.com>
Sashiko has reviewed this patch and found no issues. It looks great!
--
Sashiko AI review · https://sashiko.dev/#/patchset/tencent_77968AD30F111278CBAE934BCFD0AF00E807@qq.com?part=1
prev parent reply other threads:[~2026-10-14 14:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-14 14:37 [PATCH v3] tty: hvc: dcc: Detect JTAG connection only on CPU core 0 shatyuka
2026-10-14 14:49 ` sashiko-bot [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=sashiko-outbox-171445@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=shatyuka@qq.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