MIPS: Get rid of 'kgdb_early_setup' cruft.
authorSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Sun, 31 May 2015 21:40:32 +0000 (00:40 +0300)
committerRalf Baechle <ralf@linux-mips.org>
Sun, 21 Jun 2015 19:54:10 +0000 (21:54 +0200)
Commit 854700115ecf ([MIPS] kgdb: add arch support for the kernel's kgdb core)
added the 'kgdb_early_setup' flag to avoid  calling trap_init() and init_IRQ()
the second time, however the code that called these functions earlier,  from
kgdb_arch_init(), had been already removed by that  time,  so the flag never
served any useful purpose. Remove the related code along with ugly #ifdef'ery
at last.

[ralf@linux-mips.org: Folded in Guenter Roeck's fix.]

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Patchwork: https://patchwork.linux-mips.org/patch/10501/
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Patchwork: https://patchwork.linux-mips.org/patch/10533/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/include/asm/kgdb.h
arch/mips/kernel/irq.c
arch/mips/kernel/kgdb.c
arch/mips/kernel/traps.c

index e6c0b0e14ccb989a3f8e0e72a1060222e68941e7..69dc0df94a96580b1a12462d86bd5a0344d4fa90 100644 (file)
@@ -33,7 +33,6 @@
 #define CACHE_FLUSH_IS_SAFE    0
 
 extern void arch_kgdb_breakpoint(void);
-extern int kgdb_early_setup;
 extern void *saved_vectors[32];
 extern void handle_exception(struct pt_regs *regs);
 extern void breakinst(void);
index 3c8a18a00a65fee62e7cc11068d3866b18b04fd1..c3d831a8c479bea6504d7e6f1699d2ca53ac3f60 100644 (file)
 #include <linux/atomic.h>
 #include <asm/uaccess.h>
 
-#ifdef CONFIG_KGDB
-int kgdb_early_setup;
-#endif
-
 static DECLARE_BITMAP(irq_map, NR_IRQS);
 
 int allocate_irqno(void)
@@ -93,20 +89,10 @@ void __init init_IRQ(void)
 {
        int i;
 
-#ifdef CONFIG_KGDB
-       if (kgdb_early_setup)
-               return;
-#endif
-
        for (i = 0; i < NR_IRQS; i++)
                irq_set_noprobe(i);
 
        arch_init_irq();
-
-#ifdef CONFIG_KGDB
-       if (!kgdb_early_setup)
-               kgdb_early_setup = 1;
-#endif
 }
 
 #ifdef CONFIG_DEBUG_STACKOVERFLOW
index 7afcc2f22c0dbeb724090c6bccecc1bfff90c510..de63d36af895aaa3aa5e1c0469f9a70a00064bf0 100644 (file)
@@ -378,10 +378,6 @@ int kgdb_arch_handle_exception(int vector, int signo, int err_code,
 
 struct kgdb_arch arch_kgdb_ops;
 
-/*
- * We use kgdb_early_setup so that functions we need to call now don't
- * cause trouble when called again later.
- */
 int kgdb_arch_init(void)
 {
        union mips_instruction insn = {
index 1d6dd12fe940d095830f85c38de33789fd5de679..2a7b38ed23f06e817bba6187b8890b98489e168d 100644 (file)
@@ -2185,11 +2185,6 @@ void __init trap_init(void)
 
        check_wait();
 
-#if defined(CONFIG_KGDB)
-       if (kgdb_early_setup)
-               return; /* Already done */
-#endif
-
        if (cpu_has_veic || cpu_has_vint) {
                unsigned long size = 0x200 + VECTORSPACING*64;
                ebase = (unsigned long)