summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJiannan Du <shatyuka@qq.com>2026-10-14 22:37:23 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2026-10-14 17:40:30 +0200
commit1184f87e2790e8af9be3116f608d2e86b4792d7d (patch)
treeb5282cbabf6eb1696007314a9a4347a68ebf5a6f /include
parent9105207b0287b5024bd53041ab1f700e152289c6 (diff)
tty: hvc: dcc: Detect JTAG connection only on CPU core 0
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> Link: https://patch.msgid.link/tencent_77968AD30F111278CBAE934BCFD0AF00E807@qq.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions