Skip to content

Commit 0f26d0e

Browse files
committed
kdb: Remove unused KDB_FLAG_ONLY_DO_DUMP
This code cleanup was missed in the original kdb merge, and this code is simply not used at all. The code that was previously used to set the KDB_FLAG_ONLY_DO_DUMP was removed prior to the initial kdb merge. Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
1 parent 28a33cb commit 0f26d0e

2 files changed

Lines changed: 1 addition & 16 deletions

File tree

include/linux/kdb.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,6 @@ extern const char *kdb_diemsg;
7575
#define KDB_FLAG_CATASTROPHIC (1 << 1) /* A catastrophic event has occurred */
7676
#define KDB_FLAG_CMD_INTERRUPT (1 << 2) /* Previous command was interrupted */
7777
#define KDB_FLAG_NOIPI (1 << 3) /* Do not send IPIs */
78-
#define KDB_FLAG_ONLY_DO_DUMP (1 << 4) /* Only do a dump, used when
79-
* kdb is off */
8078
#define KDB_FLAG_NO_CONSOLE (1 << 5) /* No console is available,
8179
* kdb is disabled */
8280
#define KDB_FLAG_NO_VT_CONSOLE (1 << 6) /* No VT console is available, do

kernel/debug/kdb/kdb_main.c

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -139,11 +139,10 @@ static const int __nkdb_err = sizeof(kdbmsgs) / sizeof(kdbmsg_t);
139139
static char *__env[] = {
140140
#if defined(CONFIG_SMP)
141141
"PROMPT=[%d]kdb> ",
142-
"MOREPROMPT=[%d]more> ",
143142
#else
144143
"PROMPT=kdb> ",
145-
"MOREPROMPT=more> ",
146144
#endif
145+
"MOREPROMPT=more> ",
147146
"RADIX=16",
148147
"MDCOUNT=8", /* lines of md output */
149148
KDB_PLATFORM_ENV,
@@ -1236,18 +1235,6 @@ static int kdb_local(kdb_reason_t reason, int error, struct pt_regs *regs,
12361235
*cmdbuf = '\0';
12371236
*(cmd_hist[cmd_head]) = '\0';
12381237

1239-
if (KDB_FLAG(ONLY_DO_DUMP)) {
1240-
/* kdb is off but a catastrophic error requires a dump.
1241-
* Take the dump and reboot.
1242-
* Turn on logging so the kdb output appears in the log
1243-
* buffer in the dump.
1244-
*/
1245-
const char *setargs[] = { "set", "LOGGING", "1" };
1246-
kdb_set(2, setargs);
1247-
kdb_reboot(0, NULL);
1248-
/*NOTREACHED*/
1249-
}
1250-
12511238
do_full_getstr:
12521239
#if defined(CONFIG_SMP)
12531240
snprintf(kdb_prompt_str, CMD_BUFLEN, kdbgetenv("PROMPT"),

0 commit comments

Comments
 (0)