Răsfoiți Sursa

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>
Jason Wessel 13 ani în urmă
părinte
comite
0f26d0e0a7
2 a modificat fișierele cu 1 adăugiri și 16 ștergeri
  1. 0 2
      include/linux/kdb.h
  2. 1 14
      kernel/debug/kdb/kdb_main.c

+ 0 - 2
include/linux/kdb.h

@@ -75,8 +75,6 @@ extern const char *kdb_diemsg;
 #define KDB_FLAG_CATASTROPHIC	(1 << 1) /* A catastrophic event has occurred */
 #define KDB_FLAG_CATASTROPHIC	(1 << 1) /* A catastrophic event has occurred */
 #define KDB_FLAG_CMD_INTERRUPT	(1 << 2) /* Previous command was interrupted */
 #define KDB_FLAG_CMD_INTERRUPT	(1 << 2) /* Previous command was interrupted */
 #define KDB_FLAG_NOIPI		(1 << 3) /* Do not send IPIs */
 #define KDB_FLAG_NOIPI		(1 << 3) /* Do not send IPIs */
-#define KDB_FLAG_ONLY_DO_DUMP	(1 << 4) /* Only do a dump, used when
-					  * kdb is off */
 #define KDB_FLAG_NO_CONSOLE	(1 << 5) /* No console is available,
 #define KDB_FLAG_NO_CONSOLE	(1 << 5) /* No console is available,
 					  * kdb is disabled */
 					  * kdb is disabled */
 #define KDB_FLAG_NO_VT_CONSOLE	(1 << 6) /* No VT console is available, do
 #define KDB_FLAG_NO_VT_CONSOLE	(1 << 6) /* No VT console is available, do

+ 1 - 14
kernel/debug/kdb/kdb_main.c

@@ -139,11 +139,10 @@ static const int __nkdb_err = sizeof(kdbmsgs) / sizeof(kdbmsg_t);
 static char *__env[] = {
 static char *__env[] = {
 #if defined(CONFIG_SMP)
 #if defined(CONFIG_SMP)
  "PROMPT=[%d]kdb> ",
  "PROMPT=[%d]kdb> ",
- "MOREPROMPT=[%d]more> ",
 #else
 #else
  "PROMPT=kdb> ",
  "PROMPT=kdb> ",
- "MOREPROMPT=more> ",
 #endif
 #endif
+ "MOREPROMPT=more> ",
  "RADIX=16",
  "RADIX=16",
  "MDCOUNT=8",			/* lines of md output */
  "MDCOUNT=8",			/* lines of md output */
  KDB_PLATFORM_ENV,
  KDB_PLATFORM_ENV,
@@ -1236,18 +1235,6 @@ static int kdb_local(kdb_reason_t reason, int error, struct pt_regs *regs,
 		*cmdbuf = '\0';
 		*cmdbuf = '\0';
 		*(cmd_hist[cmd_head]) = '\0';
 		*(cmd_hist[cmd_head]) = '\0';
 
 
-		if (KDB_FLAG(ONLY_DO_DUMP)) {
-			/* kdb is off but a catastrophic error requires a dump.
-			 * Take the dump and reboot.
-			 * Turn on logging so the kdb output appears in the log
-			 * buffer in the dump.
-			 */
-			const char *setargs[] = { "set", "LOGGING", "1" };
-			kdb_set(2, setargs);
-			kdb_reboot(0, NULL);
-			/*NOTREACHED*/
-		}
-
 do_full_getstr:
 do_full_getstr:
 #if defined(CONFIG_SMP)
 #if defined(CONFIG_SMP)
 		snprintf(kdb_prompt_str, CMD_BUFLEN, kdbgetenv("PROMPT"),
 		snprintf(kdb_prompt_str, CMD_BUFLEN, kdbgetenv("PROMPT"),