diff options
-rw-r--r-- | include/linux/kdb.h | 2 | ||||
-rw-r--r-- | kernel/debug/kdb/kdb_main.c | 15 |
2 files changed, 1 insertions, 16 deletions
diff --git a/include/linux/kdb.h b/include/linux/kdb.h index 064725854db8..42d9e863a313 100644 --- a/include/linux/kdb.h +++ b/include/linux/kdb.h | |||
@@ -75,8 +75,6 @@ extern const char *kdb_diemsg; | |||
75 | #define KDB_FLAG_CATASTROPHIC (1 << 1) /* A catastrophic event has occurred */ | 75 | #define KDB_FLAG_CATASTROPHIC (1 << 1) /* A catastrophic event has occurred */ |
76 | #define KDB_FLAG_CMD_INTERRUPT (1 << 2) /* Previous command was interrupted */ | 76 | #define KDB_FLAG_CMD_INTERRUPT (1 << 2) /* Previous command was interrupted */ |
77 | #define KDB_FLAG_NOIPI (1 << 3) /* Do not send IPIs */ | 77 | #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 */ | ||
80 | #define KDB_FLAG_NO_CONSOLE (1 << 5) /* No console is available, | 78 | #define KDB_FLAG_NO_CONSOLE (1 << 5) /* No console is available, |
81 | * kdb is disabled */ | 79 | * kdb is disabled */ |
82 | #define KDB_FLAG_NO_VT_CONSOLE (1 << 6) /* No VT console is available, do | 80 | #define KDB_FLAG_NO_VT_CONSOLE (1 << 6) /* No VT console is available, do |
diff --git a/kernel/debug/kdb/kdb_main.c b/kernel/debug/kdb/kdb_main.c index 1f91413edb87..31df1706b9a9 100644 --- a/kernel/debug/kdb/kdb_main.c +++ b/kernel/debug/kdb/kdb_main.c | |||
@@ -139,11 +139,10 @@ static const int __nkdb_err = sizeof(kdbmsgs) / sizeof(kdbmsg_t); | |||
139 | static char *__env[] = { | 139 | static char *__env[] = { |
140 | #if defined(CONFIG_SMP) | 140 | #if defined(CONFIG_SMP) |
141 | "PROMPT=[%d]kdb> ", | 141 | "PROMPT=[%d]kdb> ", |
142 | "MOREPROMPT=[%d]more> ", | ||
143 | #else | 142 | #else |
144 | "PROMPT=kdb> ", | 143 | "PROMPT=kdb> ", |
145 | "MOREPROMPT=more> ", | ||
146 | #endif | 144 | #endif |
145 | "MOREPROMPT=more> ", | ||
147 | "RADIX=16", | 146 | "RADIX=16", |
148 | "MDCOUNT=8", /* lines of md output */ | 147 | "MDCOUNT=8", /* lines of md output */ |
149 | KDB_PLATFORM_ENV, | 148 | KDB_PLATFORM_ENV, |
@@ -1236,18 +1235,6 @@ static int kdb_local(kdb_reason_t reason, int error, struct pt_regs *regs, | |||
1236 | *cmdbuf = '\0'; | 1235 | *cmdbuf = '\0'; |
1237 | *(cmd_hist[cmd_head]) = '\0'; | 1236 | *(cmd_hist[cmd_head]) = '\0'; |
1238 | 1237 | ||
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 | |||
1251 | do_full_getstr: | 1238 | do_full_getstr: |
1252 | #if defined(CONFIG_SMP) | 1239 | #if defined(CONFIG_SMP) |
1253 | snprintf(kdb_prompt_str, CMD_BUFLEN, kdbgetenv("PROMPT"), | 1240 | snprintf(kdb_prompt_str, CMD_BUFLEN, kdbgetenv("PROMPT"), |