From nobody Fri Apr 3 18:43:35 2026 Received: from smtpbgjp3.qq.com (smtpbgjp3.qq.com [54.92.39.34]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CD95923C8AE for ; Tue, 24 Mar 2026 03:25:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=54.92.39.34 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774322726; cv=none; b=SpPZwPXb7g9Zi49j7DdoExfzCGN7WR5bRkNGo6rI923lN4jBKS0l+2j4KEwtjbSe5ANe0nrNo1Fq84S9rm+jGXSkSlhFKWNeQ1wB/4gxj6s/mm8FRWpv9F+k6QRzGiWMjaBB9B7rZOS2vvypLtnX/5DAK37Yu99sbYsHvYzR8nA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774322726; c=relaxed/simple; bh=63GWmNMdmEnmTyMw93y4ckpf2IHRyKjLtvfVq1H0u18=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=GC9acuQOSMIBRkporx3O9OmDZQQ81BQcnieIIyG925+uaFN0nAM89Y0XPQg9eXKNSW8DVIy0VIcsAXD6bsk67WF0QlufBEsFIPvEBUGRcYUxi97RjQRt3f2jT7MNyxMjQ2/dVYslkCxVoB/oREBUi4YCJrsJcLcTI2CgECQd7/Y= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=smail.nju.edu.cn; spf=pass smtp.mailfrom=smail.nju.edu.cn; dkim=pass (1024-bit key) header.d=smail.nju.edu.cn header.i=@smail.nju.edu.cn header.b=HB2ilpRq; arc=none smtp.client-ip=54.92.39.34 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=smail.nju.edu.cn Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=smail.nju.edu.cn Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=smail.nju.edu.cn header.i=@smail.nju.edu.cn header.b="HB2ilpRq" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smail.nju.edu.cn; s=iohv2404; t=1774322630; bh=Yg0FgAo69POPp+mIW7LLmaKXMGA4iz65QCZKFQL4Xzk=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=HB2ilpRqK/2PAeyWMxbnRWUxjlaZUsNWxATAU2SQqU5mmVZfuvTnVL+zJJNfrtyKN 1tn7PtmQuyBmnvPRySna1iV6V1EBSazqBMEA2Gxd4NqSwWFk0ehdvIZHNrFqS6MAuC mEsWhUdPAo8DYqOg8nuMQwR0NO+foknsghVyQ8XA= X-QQ-mid: zesmtpsz2t1774322628t78acf3b8 X-QQ-Originating-IP: TqqDOqTbBZfFCQxhZpdMNHbBGqNyMralQp8wknC66sY= Received: from localhost.localdomain ( [116.172.93.199]) by bizesmtp.qq.com (ESMTP) with id ; Tue, 24 Mar 2026 11:23:45 +0800 (CST) X-QQ-SSF: 0000000000000000000000000000000 X-QQ-GoodBg: 0 X-BIZMAIL-ID: 9647220688897456998 EX-QQ-RecipientCnt: 19 From: Kexin Sun To: jason.wessel@windriver.com, danielt@kernel.org Cc: daniel@riscstar.com, dianders@chromium.org, tglx@kernel.org, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com, seanjc@google.com, xin@zytor.com, linux-kernel@vger.kernel.org, kgdb-bugreport@lists.sourceforge.net, julia.lawall@inria.fr, xutong.ma@inria.fr, yunbolyu@smu.edu.sg, ratnadiraw@smu.edu.sg, Kexin Sun Subject: [PATCH v2] kgdb: update outdated references to kgdb_wait() Date: Tue, 24 Mar 2026 11:23:44 +0800 Message-Id: <20260324032344.4949-1-kexinsun@smail.nju.edu.cn> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-QQ-SENDSIZE: 520 Feedback-ID: zesmtpsz:smail.nju.edu.cn:qybglogicsvrgz:qybglogicsvrgz5b-0 X-QQ-XMAILINFO: NZMyfNCZ7Gpe8kdMjAhokSS2XiFSH2Wsn7KgEry7V9wqBfSKODjkk47u rv3+pJlQhGKZ72/Ef584FaCgBABYwfHnvzIK75Fo5iWN0QyI00vSGB7BQpLzd1ZF2x9ocW/ RddqPSU4MknYGp7CrIvlnMXgrupzLhI1iE6aSyubuPoLNPQcwLUu9lh+7rXQjcJPqnTVqHR ht13u+6UO/vP1Y8eJZBwBgj0yvqGOdiWiS7rKo3KZuHBnuVy3jEIqU1rH1Sf85XdOilBT7B WMyToJmBy50seKvyUOVnrBybVIygDkHc84VFSXqwaAZ5fQGPXAaIjvua3cnaGCM7QAb1lEK 68/J/qowNGQ9G+lxGWpqTbASzeNIjQUuE8bvusMppCFvwH4Y7vkDU7fsjoLvnD0a1rGuqWB ChCygT7knCxPn2J3liDc2QYkvreHWAxA2ibaSuG1loK50jceJ0jM5GH2EwXBEgkbJZBQroZ KgwyTvahw3fg4EEFrxLSP+gsMuOdK0QlXNvIdm/OU2DHZpQ6Oz+lDmM2H5V9HdMMp9KG4Az EJTPearNXHeyCmuz9Bi/QUHLODX27kl8UVawFf860eB1vELWkSQjUe1jzn9sE/sd4/Sih8q YjQORZiR20ezKVdFqRTIcWKeHIGrRfrbIY2YbpMjk3ri0guHyjNJqnieJYyNhODj4MpYuCE IfC6/+LoFNzl7NRANerzA11OqiodYap2GxDTl7u1uhPevo52Yf9KkRjqQIVCxvoglRmT/Mb I/dzwlrWbjGjftyydmU3DOkoIdUTSFp1GM5w99OfF+ScbETbkd/Gp72TCPjYDMsiWkLpKAQ WVSab2VCxWVqCUG0/8IC9loPHmsIo5cQRdtlo8awqD6tDsSss2/Z5RD5sb0/mA/sUw+yIey Hr8AhbzzZSDlOqo6tLQXZPSEvefjhlSGFY4Z5ovGp86IOLAJq+JJLj4nj31nIrj1thJD9VH HCG/r5B+PCkf37JqRSKWXuW8YglDsvajBKXWtqTLDQmrvyg1/GSlN0NLP+7TaP+C7PrAipy eLSYeNVB1hlZySV5p5maX7tqWhYRM= X-QQ-XMRINFO: MSVp+SPm3vtSI1QTLgDHQqIV1w2oNKDqfg== X-QQ-RECHKSPAM: 0 Content-Type: text/plain; charset="utf-8" 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 Assisted-by: unnamed:deepseek-v3.2 coccinelle Signed-off-by: Kexin Sun --- v2: - Use kgdb_handle_exception() instead of static kgdb_cpu_enter() for the two kdoc comments describing what other CPUs call (Daniel Thompson) - Use "the debug trap handler" for the debug_core.c inline comment - Add missing parentheses in gdbstub.c - Reflow both reflowed comment blocks arch/x86/kernel/kgdb.c | 9 +++++---- include/linux/kgdb.h | 7 ++++--- kernel/debug/debug_core.c | 2 +- kernel/debug/gdbstub.c | 2 +- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/arch/x86/kernel/kgdb.c b/arch/x86/kernel/kgdb.c index 8b1a9733d13e..96af1242454e 100644 --- a/arch/x86/kernel/kgdb.c +++ b/arch/x86/kernel/kgdb.c @@ -407,10 +407,11 @@ static void kgdb_disable_hw_debug(struct pt_regs *reg= s) * 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. */ diff --git a/include/linux/kgdb.h b/include/linux/kgdb.h index 22b3f3839f30..6c46591a2eac 100644 --- a/include/linux/kgdb.h +++ b/include/linux/kgdb.h @@ -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. */ diff --git a/kernel/debug/debug_core.c b/kernel/debug/debug_core.c index 0b9495187fba..b276504c1c6b 100644 --- a/kernel/debug/debug_core.c +++ b/kernel/debug/debug_core.c @@ -704,7 +704,7 @@ static int kgdb_cpu_enter(struct kgdb_state *ks, struct= pt_regs *regs, if (ks->send_ready) atomic_set(ks->send_ready, 1); =20 - /* 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 diff --git a/kernel/debug/gdbstub.c b/kernel/debug/gdbstub.c index f586afd76c80..e271a436d60e 100644 --- a/kernel/debug/gdbstub.c +++ b/kernel/debug/gdbstub.c @@ -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); --=20 2.25.1