From 52ea7bff5ddc3f534aef28b7a20b9b11bf9a4df0 Mon Sep 17 00:00:00 2001 From: Sergei Shtylyov Date: Mon, 1 Jun 2015 00:40:32 +0300 Subject: [PATCH] MIPS: Get rid of 'kgdb_early_setup' cruft. 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 Patchwork: https://patchwork.linux-mips.org/patch/10501/ Signed-off-by: Guenter Roeck Patchwork: https://patchwork.linux-mips.org/patch/10533/ Signed-off-by: Ralf Baechle --- arch/mips/include/asm/kgdb.h | 1 - arch/mips/kernel/irq.c | 14 -------------- arch/mips/kernel/kgdb.c | 4 ---- arch/mips/kernel/traps.c | 5 ----- 4 files changed, 24 deletions(-) diff --git a/arch/mips/include/asm/kgdb.h b/arch/mips/include/asm/kgdb.h index e6c0b0e..69dc0df 100644 --- a/arch/mips/include/asm/kgdb.h +++ b/arch/mips/include/asm/kgdb.h @@ -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); diff --git a/arch/mips/kernel/irq.c b/arch/mips/kernel/irq.c index 3c8a18a..c3d831a 100644 --- a/arch/mips/kernel/irq.c +++ b/arch/mips/kernel/irq.c @@ -25,10 +25,6 @@ #include #include -#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 diff --git a/arch/mips/kernel/kgdb.c b/arch/mips/kernel/kgdb.c index 7afcc2f..de63d36 100644 --- a/arch/mips/kernel/kgdb.c +++ b/arch/mips/kernel/kgdb.c @@ -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 = { diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c index 1d6dd12f..2a7b38e 100644 --- a/arch/mips/kernel/traps.c +++ b/arch/mips/kernel/traps.c @@ -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) -- 2.7.4