]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
kgdb: update outdated references to kgdb_wait()
authorKexin Sun <kexinsun@smail.nju.edu.cn>
Tue, 24 Mar 2026 03:23:44 +0000 (11:23 +0800)
committerDaniel Thompson <daniel@riscstar.com>
Tue, 21 Apr 2026 15:41:54 +0000 (16:41 +0100)
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>
arch/x86/kernel/kgdb.c
include/linux/kgdb.h
kernel/debug/debug_core.c
kernel/debug/gdbstub.c

index 8b1a9733d13e3f69a12a8cf4a9dcc2062cec3336..96af1242454e8ca2a007433ef75bbd2c1a42319c 100644 (file)
@@ -407,10 +407,11 @@ static void kgdb_disable_hw_debug(struct pt_regs *regs)
  *     kgdb_roundup_cpus - Get other CPUs into a holding pattern
  *
  *     On SMP systems, we need to get the attention of the other CPUs
- *     and get them be in a known state.  This should do what is needed
- *     to get the other CPUs to call kgdb_wait(). Note that on some arches,
- *     the NMI approach is not used for rounding up all the CPUs. For example,
- *     in case of MIPS, smp_call_function() is used to roundup CPUs.
+ *     and get them into a known state.  This should do what is needed
+ *     to get the other CPUs to call kgdb_handle_exception().  Note that
+ *     on some arches, the NMI approach is not used for rounding up all
+ *     the CPUs.  For example, in case of MIPS, smp_call_function() is
+ *     used to roundup CPUs.
  *
  *     On non-SMP systems, this is not called.
  */
index 22b3f3839f303f62785e7a6cd55419f1ac47fb83..6c46591a2eac0ae7dc52635a6bcab2042aa69530 100644 (file)
@@ -202,9 +202,10 @@ extern void kgdb_call_nmi_hook(void *ignored);
  *
  *     On SMP systems, we need to get the attention of the other CPUs
  *     and get them into a known state.  This should do what is needed
- *     to get the other CPUs to call kgdb_wait(). Note that on some arches,
- *     the NMI approach is not used for rounding up all the CPUs.  Normally
- *     those architectures can just not implement this and get the default.
+ *     to get the other CPUs to call kgdb_handle_exception().  Note that
+ *     on some arches, the NMI approach is not used for rounding up all
+ *     the CPUs.  Normally those architectures can just not implement
+ *     this and get the default.
  *
  *     On non-SMP systems, this is not called.
  */
index 0b9495187fba6f22c5b1626dad82c184aaecd235..b276504c1c6bd2952913377841f8e892b8611f2d 100644 (file)
@@ -704,7 +704,7 @@ return_normal:
        if (ks->send_ready)
                atomic_set(ks->send_ready, 1);
 
-       /* Signal the other CPUs to enter kgdb_wait() */
+       /* Signal the other CPUs to enter the debug trap handler */
        else if ((!kgdb_single_step) && kgdb_do_roundup)
                kgdb_roundup_cpus();
 #endif
index f586afd76c80d8cea44de063761091d43a835606..e271a436d60e46ed99e95badbdade4685d5b17c5 100644 (file)
@@ -517,7 +517,7 @@ static void gdb_get_regs_helper(struct kgdb_state *ks)
        /*
         * All threads that don't have debuggerinfo should be
         * in schedule() sleeping, since all other CPUs
-        * are in kgdb_wait, and thus have debuggerinfo.
+        * are in kgdb_cpu_enter(), and thus have debuggerinfo.
         */
        if (local_debuggerinfo) {
                pt_regs_to_gdb_regs(gdb_regs, local_debuggerinfo);