summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorSergei Shtylyov <sergei.shtylyov@cogentembedded.com>2015-05-31 17:40:32 -0400
committerRalf Baechle <ralf@linux-mips.org>2015-06-21 15:54:10 -0400
commit52ea7bff5ddc3f534aef28b7a20b9b11bf9a4df0 (patch)
treeb550d9b422b1dfad5e9a1c6b72ee4490a1c29ef4 /arch
parenta5fcc6522fd43acba09aa9ffca09872aaf02cd5e (diff)
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 <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>
Diffstat (limited to 'arch')
-rw-r--r--arch/mips/include/asm/kgdb.h1
-rw-r--r--arch/mips/kernel/irq.c14
-rw-r--r--arch/mips/kernel/kgdb.c4
-rw-r--r--arch/mips/kernel/traps.c5
4 files changed, 0 insertions, 24 deletions
diff --git a/arch/mips/include/asm/kgdb.h b/arch/mips/include/asm/kgdb.h
index e6c0b0e14ccb..69dc0df94a96 100644
--- a/arch/mips/include/asm/kgdb.h
+++ b/arch/mips/include/asm/kgdb.h
@@ -33,7 +33,6 @@
33#define CACHE_FLUSH_IS_SAFE 0 33#define CACHE_FLUSH_IS_SAFE 0
34 34
35extern void arch_kgdb_breakpoint(void); 35extern void arch_kgdb_breakpoint(void);
36extern int kgdb_early_setup;
37extern void *saved_vectors[32]; 36extern void *saved_vectors[32];
38extern void handle_exception(struct pt_regs *regs); 37extern void handle_exception(struct pt_regs *regs);
39extern void breakinst(void); 38extern void breakinst(void);
diff --git a/arch/mips/kernel/irq.c b/arch/mips/kernel/irq.c
index 3c8a18a00a65..c3d831a8c479 100644
--- a/arch/mips/kernel/irq.c
+++ b/arch/mips/kernel/irq.c
@@ -25,10 +25,6 @@
25#include <linux/atomic.h> 25#include <linux/atomic.h>
26#include <asm/uaccess.h> 26#include <asm/uaccess.h>
27 27
28#ifdef CONFIG_KGDB
29int kgdb_early_setup;
30#endif
31
32static DECLARE_BITMAP(irq_map, NR_IRQS); 28static DECLARE_BITMAP(irq_map, NR_IRQS);
33 29
34int allocate_irqno(void) 30int allocate_irqno(void)
@@ -93,20 +89,10 @@ void __init init_IRQ(void)
93{ 89{
94 int i; 90 int i;
95 91
96#ifdef CONFIG_KGDB
97 if (kgdb_early_setup)
98 return;
99#endif
100
101 for (i = 0; i < NR_IRQS; i++) 92 for (i = 0; i < NR_IRQS; i++)
102 irq_set_noprobe(i); 93 irq_set_noprobe(i);
103 94
104 arch_init_irq(); 95 arch_init_irq();
105
106#ifdef CONFIG_KGDB
107 if (!kgdb_early_setup)
108 kgdb_early_setup = 1;
109#endif
110} 96}
111 97
112#ifdef CONFIG_DEBUG_STACKOVERFLOW 98#ifdef CONFIG_DEBUG_STACKOVERFLOW
diff --git a/arch/mips/kernel/kgdb.c b/arch/mips/kernel/kgdb.c
index 7afcc2f22c0d..de63d36af895 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,
378 378
379struct kgdb_arch arch_kgdb_ops; 379struct kgdb_arch arch_kgdb_ops;
380 380
381/*
382 * We use kgdb_early_setup so that functions we need to call now don't
383 * cause trouble when called again later.
384 */
385int kgdb_arch_init(void) 381int kgdb_arch_init(void)
386{ 382{
387 union mips_instruction insn = { 383 union mips_instruction insn = {
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c
index 1d6dd12fe940..2a7b38ed23f0 100644
--- a/arch/mips/kernel/traps.c
+++ b/arch/mips/kernel/traps.c
@@ -2185,11 +2185,6 @@ void __init trap_init(void)
2185 2185
2186 check_wait(); 2186 check_wait();
2187 2187
2188#if defined(CONFIG_KGDB)
2189 if (kgdb_early_setup)
2190 return; /* Already done */
2191#endif
2192
2193 if (cpu_has_veic || cpu_has_vint) { 2188 if (cpu_has_veic || cpu_has_vint) {
2194 unsigned long size = 0x200 + VECTORSPACING*64; 2189 unsigned long size = 0x200 + VECTORSPACING*64;
2195 ebase = (unsigned long) 2190 ebase = (unsigned long)