Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

kgdb: update outdated references to kgdb_wait()

The function kgdb_wait() was folded into the static function
kgdb_cpu_enter() by commit 62fae312197a ("kgdb: eliminate
kgdb_wait(), all cpus enter the same way"). Update the four stale
references accordingly:

- include/linux/kgdb.h and arch/x86/kernel/kgdb.c: the
kgdb_roundup_cpus() kdoc describes what other CPUs are rounded up
to call. Because kgdb_cpu_enter() is static, the correct public
entry point is kgdb_handle_exception(); also fix a pre-existing
grammar error ("get them be" -> "get them into") and reflow the
text.

- kernel/debug/debug_core.c: replace with the generic description
"the debug trap handler", since the actual entry path is
architecture-specific.

- kernel/debug/gdbstub.c: kgdb_cpu_enter() is correct here (it
describes internal state, not a call target); add the missing
parentheses.

Suggested-by: Daniel Thompson <daniel@riscstar.com>
Assisted-by: unnamed:deepseek-v3.2 coccinelle
Signed-off-by: Kexin Sun <kexinsun@smail.nju.edu.cn>

authored by

Kexin Sun and committed by
Daniel Thompson
256e5254 028ef9c9

+11 -9
+5 -4
arch/x86/kernel/kgdb.c
··· 407 407 * kgdb_roundup_cpus - Get other CPUs into a holding pattern 408 408 * 409 409 * On SMP systems, we need to get the attention of the other CPUs 410 - * and get them be in a known state. This should do what is needed 411 - * to get the other CPUs to call kgdb_wait(). Note that on some arches, 412 - * the NMI approach is not used for rounding up all the CPUs. For example, 413 - * in case of MIPS, smp_call_function() is used to roundup CPUs. 410 + * and get them into a known state. This should do what is needed 411 + * to get the other CPUs to call kgdb_handle_exception(). Note that 412 + * on some arches, the NMI approach is not used for rounding up all 413 + * the CPUs. For example, in case of MIPS, smp_call_function() is 414 + * used to roundup CPUs. 414 415 * 415 416 * On non-SMP systems, this is not called. 416 417 */
+4 -3
include/linux/kgdb.h
··· 202 202 * 203 203 * On SMP systems, we need to get the attention of the other CPUs 204 204 * and get them into a known state. This should do what is needed 205 - * to get the other CPUs to call kgdb_wait(). Note that on some arches, 206 - * the NMI approach is not used for rounding up all the CPUs. Normally 207 - * those architectures can just not implement this and get the default. 205 + * to get the other CPUs to call kgdb_handle_exception(). Note that 206 + * on some arches, the NMI approach is not used for rounding up all 207 + * the CPUs. Normally those architectures can just not implement 208 + * this and get the default. 208 209 * 209 210 * On non-SMP systems, this is not called. 210 211 */
+1 -1
kernel/debug/debug_core.c
··· 704 704 if (ks->send_ready) 705 705 atomic_set(ks->send_ready, 1); 706 706 707 - /* Signal the other CPUs to enter kgdb_wait() */ 707 + /* Signal the other CPUs to enter the debug trap handler */ 708 708 else if ((!kgdb_single_step) && kgdb_do_roundup) 709 709 kgdb_roundup_cpus(); 710 710 #endif
+1 -1
kernel/debug/gdbstub.c
··· 517 517 /* 518 518 * All threads that don't have debuggerinfo should be 519 519 * in schedule() sleeping, since all other CPUs 520 - * are in kgdb_wait, and thus have debuggerinfo. 520 + * are in kgdb_cpu_enter(), and thus have debuggerinfo. 521 521 */ 522 522 if (local_debuggerinfo) { 523 523 pt_regs_to_gdb_regs(gdb_regs, local_debuggerinfo);