From: Linus Torvalds Date: Sat, 13 Oct 2012 02:16:58 +0000 (+0900) Subject: Merge tag 'for_linus-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/jwessel... X-Git-Tag: v3.7-rc1~18 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6c536a17fa049d0fb690c1a947b97dbfd304a916;p=platform%2Fkernel%2Flinux-stable.git Merge tag 'for_linus-3.7' of git://git./linux/kernel/git/jwessel/kgdb Pull KGDB/KDB fixes and cleanups from Jason Wessel: "Cleanups - Clean up compile warnings in kgdboc.c and x86/kernel/kgdb.c - Add module event hooks for simplified debugging with gdb Fixes - Fix kdb to stop paging with 'q' on bta and dmesg - Fix for data that scrolls off the vga console due to line wrapping when using the kdb pager New - The debug core registers for kernel module events which allows a kernel aware gdb to automatically load symbols and break on entry to a kernel module - Allow kgdboc=kdb to setup kdb on the vga console" * tag 'for_linus-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/jwessel/kgdb: tty/console: fix warnings in drivers/tty/serial/kgdboc.c kdb,vt_console: Fix missed data due to pager overruns kdb: Fix dmesg/bta scroll to quit with 'q' kgdboc: Accept either kbd or kdb to activate the vga + keyboard kdb shell kgdb,x86: fix warning about unused variable mips,kgdb: fix recursive page fault with CONFIG_KPROBES kgdb: Add module event hooks --- 6c536a17fa049d0fb690c1a947b97dbfd304a916 diff --cc kernel/debug/debug_core.c index 17e073c,8bfa373..9a61738 --- a/kernel/debug/debug_core.c +++ b/kernel/debug/debug_core.c @@@ -685,17 -681,29 +685,33 @@@ kgdb_handle_exception(int evector, int ks->linux_regs = regs; if (kgdb_reenter_check(ks)) - return 0; /* Ouch, double exception ! */ + goto out; /* Ouch, double exception ! */ if (kgdb_info[ks->cpu].enter_kgdb != 0) - return 0; + goto out; - return kgdb_cpu_enter(ks, regs, DCPU_WANT_MASTER); + ret = kgdb_cpu_enter(ks, regs, DCPU_WANT_MASTER); +out: + if (arch_kgdb_ops.enable_nmi) + arch_kgdb_ops.enable_nmi(1); + return ret; } + /* + * GDB places a breakpoint at this function to know dynamically + * loaded objects. It's not defined static so that only one instance with this + * name exists in the kernel. + */ + + static int module_event(struct notifier_block *self, unsigned long val, + void *data) + { + return 0; + } + + static struct notifier_block dbg_module_load_nb = { + .notifier_call = module_event, + }; + int kgdb_nmicallback(int cpu, void *regs) { #ifdef CONFIG_SMP