Commit d97e1dcd authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'for_linux-3.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jwessel/kgdb

Pull KGDB/KDB/usb-dbgp fixes and cleanups from Jason Wessel:
 "There are no new features, those will be delayed to the 3.7 window.
  There are only fixes/cleanup against the usual kernel churn and we are
  removing more lines than we add:

   - usb-dbgp - increase the controller wait time to come out of halt.
   - kdb - Remove unused KDB_FLAG_ONLY_DO_DUMP code and cpu in more prompt
   - debug core - pass NMI type on archs that provide NMI types"

* tag 'for_linux-3.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jwessel/kgdb:
  USB: echi-dbgp: increase the controller wait time to come out of halt.
  kernel/debug: Make use of KGDB_REASON_NMI
  kdb: Remove cpu from the more prompt
  kdb: Remove unused KDB_FLAG_ONLY_DO_DUMP
parents 587a9e1f f96a4216
...@@ -450,7 +450,7 @@ static int dbgp_ehci_startup(void) ...@@ -450,7 +450,7 @@ static int dbgp_ehci_startup(void)
writel(FLAG_CF, &ehci_regs->configured_flag); writel(FLAG_CF, &ehci_regs->configured_flag);
/* Wait until the controller is no longer halted */ /* Wait until the controller is no longer halted */
loop = 10; loop = 1000;
do { do {
status = readl(&ehci_regs->status); status = readl(&ehci_regs->status);
if (!(status & STS_HALT)) if (!(status & STS_HALT))
......
...@@ -75,8 +75,6 @@ extern const char *kdb_diemsg; ...@@ -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
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
#include <linux/kdb.h> #include <linux/kdb.h>
#include <linux/kdebug.h> #include <linux/kdebug.h>
#include <linux/export.h> #include <linux/export.h>
#include <linux/hardirq.h>
#include "kdb_private.h" #include "kdb_private.h"
#include "../debug_core.h" #include "../debug_core.h"
...@@ -52,6 +53,9 @@ int kdb_stub(struct kgdb_state *ks) ...@@ -52,6 +53,9 @@ int kdb_stub(struct kgdb_state *ks)
if (atomic_read(&kgdb_setting_breakpoint)) if (atomic_read(&kgdb_setting_breakpoint))
reason = KDB_REASON_KEYBOARD; reason = KDB_REASON_KEYBOARD;
if (in_nmi())
reason = KDB_REASON_NMI;
for (i = 0, bp = kdb_breakpoints; i < KDB_MAXBPT; i++, bp++) { for (i = 0, bp = kdb_breakpoints; i < KDB_MAXBPT; i++, bp++) {
if ((bp->bp_enabled) && (bp->bp_addr == addr)) { if ((bp->bp_enabled) && (bp->bp_addr == addr)) {
reason = KDB_REASON_BREAK; reason = KDB_REASON_BREAK;
......
...@@ -715,9 +715,6 @@ int vkdb_printf(const char *fmt, va_list ap) ...@@ -715,9 +715,6 @@ int vkdb_printf(const char *fmt, va_list ap)
/* check for having reached the LINES number of printed lines */ /* check for having reached the LINES number of printed lines */
if (kdb_nextline == linecount) { if (kdb_nextline == linecount) {
char buf1[16] = ""; char buf1[16] = "";
#if defined(CONFIG_SMP)
char buf2[32];
#endif
/* Watch out for recursion here. Any routine that calls /* Watch out for recursion here. Any routine that calls
* kdb_printf will come back through here. And kdb_read * kdb_printf will come back through here. And kdb_read
...@@ -732,14 +729,6 @@ int vkdb_printf(const char *fmt, va_list ap) ...@@ -732,14 +729,6 @@ int vkdb_printf(const char *fmt, va_list ap)
if (moreprompt == NULL) if (moreprompt == NULL)
moreprompt = "more> "; moreprompt = "more> ";
#if defined(CONFIG_SMP)
if (strchr(moreprompt, '%')) {
sprintf(buf2, moreprompt, get_cpu());
put_cpu();
moreprompt = buf2;
}
#endif
kdb_input_flush(); kdb_input_flush();
c = console_drivers; c = console_drivers;
......
...@@ -139,11 +139,10 @@ static const int __nkdb_err = sizeof(kdbmsgs) / sizeof(kdbmsg_t); ...@@ -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, ...@@ -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"),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment