]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Merge remote-tracking branch 'kgdb/kgdb-next'
authorStephen Rothwell <sfr@canb.auug.org.au>
Thu, 11 Oct 2012 00:24:26 +0000 (11:24 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 11 Oct 2012 00:24:26 +0000 (11:24 +1100)
arch/mips/kernel/kgdb.c
arch/x86/kernel/kgdb.c
drivers/tty/serial/kgdboc.c
include/linux/console.h

index f4546e97c60db111215495f924aa567595c39581..23817a6e32b606cde0a3a714c810db342b91fd0f 100644 (file)
@@ -283,6 +283,15 @@ static int kgdb_mips_notify(struct notifier_block *self, unsigned long cmd,
        struct pt_regs *regs = args->regs;
        int trap = (regs->cp0_cause & 0x7c) >> 2;
 
+#ifdef CONFIG_KPROBES
+       /*
+        * Return immediately if the kprobes fault notifier has set
+        * DIE_PAGE_FAULT.
+        */
+       if (cmd == DIE_PAGE_FAULT)
+               return NOTIFY_DONE;
+#endif /* CONFIG_KPROBES */
+
        /* Userspace events, ignore. */
        if (user_mode(regs))
                return NOTIFY_DONE;
index 3f61904365cff214d26efa4a378830559e39a7f9..836f8322960e4b78c3263c3a18ed70cb67b589a7 100644 (file)
@@ -746,7 +746,9 @@ void kgdb_arch_set_pc(struct pt_regs *regs, unsigned long ip)
 int kgdb_arch_set_breakpoint(struct kgdb_bkpt *bpt)
 {
        int err;
+#ifdef CONFIG_DEBUG_RODATA
        char opc[BREAK_INSTR_SIZE];
+#endif /* CONFIG_DEBUG_RODATA */
 
        bpt->type = BP_BREAKPOINT;
        err = probe_kernel_read(bpt->saved_instr, (char *)bpt->bpt_addr,
index c0b334327d9313e71b099b2ff0667671be417c50..10020547c60b5735d4cbf667956c911aa06a1030 100644 (file)
@@ -97,7 +97,8 @@ static void kgdboc_restore_input(void)
 
 static int kgdboc_register_kbd(char **cptr)
 {
-       if (strncmp(*cptr, "kbd", 3) == 0) {
+       if (strncmp(*cptr, "kbd", 3) == 0 ||
+               strncmp(*cptr, "kdb", 3) == 0) {
                if (kdb_poll_idx < KDB_POLL_FUNC_MAX) {
                        kdb_poll_funcs[kdb_poll_idx] = kdb_get_kbd_char;
                        kdb_poll_idx++;
index 7201ce4280caceb594e4cd11cf6ca4e7a072efee..dedb082fe50fde9e62190569b0c362238a46f1b0 100644 (file)
@@ -83,8 +83,14 @@ void give_up_console(const struct consw *sw);
 int con_debug_enter(struct vc_data *vc);
 int con_debug_leave(void);
 #else
-#define con_debug_enter(vc) (0)
-#define con_debug_leave() (0)
+static inline int con_debug_enter(struct vc_data *vc)
+{
+       return 0;
+}
+static inline int con_debug_leave(void)
+{
+       return 0;
+}
 #endif
 
 /* scroll */