diff options
Diffstat (limited to 'arch/mips/kernel/irq.c')
-rw-r--r-- | arch/mips/kernel/irq.c | 30 |
1 files changed, 12 insertions, 18 deletions
diff --git a/arch/mips/kernel/irq.c b/arch/mips/kernel/irq.c index 6045b9a51a35..4b4007b3083a 100644 --- a/arch/mips/kernel/irq.c +++ b/arch/mips/kernel/irq.c | |||
@@ -21,11 +21,16 @@ | |||
21 | #include <linux/sched.h> | 21 | #include <linux/sched.h> |
22 | #include <linux/seq_file.h> | 22 | #include <linux/seq_file.h> |
23 | #include <linux/kallsyms.h> | 23 | #include <linux/kallsyms.h> |
24 | #include <linux/kgdb.h> | ||
24 | 25 | ||
25 | #include <asm/atomic.h> | 26 | #include <asm/atomic.h> |
26 | #include <asm/system.h> | 27 | #include <asm/system.h> |
27 | #include <asm/uaccess.h> | 28 | #include <asm/uaccess.h> |
28 | 29 | ||
30 | #ifdef CONFIG_KGDB | ||
31 | int kgdb_early_setup; | ||
32 | #endif | ||
33 | |||
29 | static unsigned long irq_map[NR_IRQS / BITS_PER_LONG]; | 34 | static unsigned long irq_map[NR_IRQS / BITS_PER_LONG]; |
30 | 35 | ||
31 | int allocate_irqno(void) | 36 | int allocate_irqno(void) |
@@ -126,33 +131,22 @@ asmlinkage void spurious_interrupt(void) | |||
126 | atomic_inc(&irq_err_count); | 131 | atomic_inc(&irq_err_count); |
127 | } | 132 | } |
128 | 133 | ||
129 | #ifdef CONFIG_KGDB | ||
130 | extern void breakpoint(void); | ||
131 | extern void set_debug_traps(void); | ||
132 | |||
133 | static int kgdb_flag = 1; | ||
134 | static int __init nokgdb(char *str) | ||
135 | { | ||
136 | kgdb_flag = 0; | ||
137 | return 1; | ||
138 | } | ||
139 | __setup("nokgdb", nokgdb); | ||
140 | #endif | ||
141 | |||
142 | void __init init_IRQ(void) | 134 | void __init init_IRQ(void) |
143 | { | 135 | { |
144 | int i; | 136 | int i; |
145 | 137 | ||
138 | #ifdef CONFIG_KGDB | ||
139 | if (kgdb_early_setup) | ||
140 | return; | ||
141 | #endif | ||
142 | |||
146 | for (i = 0; i < NR_IRQS; i++) | 143 | for (i = 0; i < NR_IRQS; i++) |
147 | set_irq_noprobe(i); | 144 | set_irq_noprobe(i); |
148 | 145 | ||
149 | arch_init_irq(); | 146 | arch_init_irq(); |
150 | 147 | ||
151 | #ifdef CONFIG_KGDB | 148 | #ifdef CONFIG_KGDB |
152 | if (kgdb_flag) { | 149 | if (!kgdb_early_setup) |
153 | printk("Wait for gdb client connection ...\n"); | 150 | kgdb_early_setup = 1; |
154 | set_debug_traps(); | ||
155 | breakpoint(); | ||
156 | } | ||
157 | #endif | 151 | #endif |
158 | } | 152 | } |