aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel/irq.c
diff options
context:
space:
mode:
authorJason Wessel <jason.wessel@windriver.com>2008-07-29 16:58:53 -0400
committerRalf Baechle <ralf@linux-mips.org>2008-07-30 16:54:42 -0400
commit8854700115ecf8aa6f087aa915b7b6cf18090d39 (patch)
tree3338d7aed80d715e0576783e0fecf30cc507a9a7 /arch/mips/kernel/irq.c
parent8d60a903d986ffa26c41f0092320a3b9da20bfaf (diff)
[MIPS] kgdb: add arch support for the kernel's kgdb core
The new kgdb architecture specific handler registers and unregisters dynamically for exceptions depending on when you configure a kgdb I/O driver. Aside from initializing the exceptions earlier in the boot process, kgdb should have no impact on a device when it is compiled in so long as an I/O module is not configured for use. There have been quite a number of contributors during the existence of this patch (see arch/mips/kernel/kgdb.c). Most recently Jason re-wrote the mips kgdb logic to use the die notification handlers. Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/kernel/irq.c')
-rw-r--r--arch/mips/kernel/irq.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/mips/kernel/irq.c b/arch/mips/kernel/irq.c
index 8acba0880d9f..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
31int kgdb_early_setup;
32#endif
33
29static unsigned long irq_map[NR_IRQS / BITS_PER_LONG]; 34static unsigned long irq_map[NR_IRQS / BITS_PER_LONG];
30 35
31int allocate_irqno(void) 36int allocate_irqno(void)
@@ -130,8 +135,18 @@ void __init init_IRQ(void)
130{ 135{
131 int i; 136 int i;
132 137
138#ifdef CONFIG_KGDB
139 if (kgdb_early_setup)
140 return;
141#endif
142
133 for (i = 0; i < NR_IRQS; i++) 143 for (i = 0; i < NR_IRQS; i++)
134 set_irq_noprobe(i); 144 set_irq_noprobe(i);
135 145
136 arch_init_irq(); 146 arch_init_irq();
147
148#ifdef CONFIG_KGDB
149 if (!kgdb_early_setup)
150 kgdb_early_setup = 1;
151#endif
137} 152}