aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/blackfin/include/asm/traps.h2
-rw-r--r--arch/blackfin/mach-common/ints-priority.c34
2 files changed, 35 insertions, 1 deletions
diff --git a/arch/blackfin/include/asm/traps.h b/arch/blackfin/include/asm/traps.h
index 70c4e511cae..cec771b8100 100644
--- a/arch/blackfin/include/asm/traps.h
+++ b/arch/blackfin/include/asm/traps.h
@@ -125,5 +125,7 @@
125 level " for Supervisor use: Supervisor only registers, all MMRs, and Supervisor\n" \ 125 level " for Supervisor use: Supervisor only registers, all MMRs, and Supervisor\n" \
126 level " only instructions.\n" 126 level " only instructions.\n"
127 127
128extern void double_fault_c(struct pt_regs *fp);
129
128#endif /* __ASSEMBLY__ */ 130#endif /* __ASSEMBLY__ */
129#endif /* _BFIN_TRAPS_H */ 131#endif /* _BFIN_TRAPS_H */
diff --git a/arch/blackfin/mach-common/ints-priority.c b/arch/blackfin/mach-common/ints-priority.c
index 5a109a18402..9660d5fdbed 100644
--- a/arch/blackfin/mach-common/ints-priority.c
+++ b/arch/blackfin/mach-common/ints-priority.c
@@ -26,6 +26,7 @@
26#include <asm/gpio.h> 26#include <asm/gpio.h>
27#include <asm/irq_handler.h> 27#include <asm/irq_handler.h>
28#include <asm/dpmc.h> 28#include <asm/dpmc.h>
29#include <asm/traps.h>
29 30
30#ifndef SEC_GCTL 31#ifndef SEC_GCTL
31# define SIC_SYSIRQ(irq) (irq - (IRQ_CORETMR + 1)) 32# define SIC_SYSIRQ(irq) (irq - (IRQ_CORETMR + 1))
@@ -413,6 +414,34 @@ void handle_sec_fault(unsigned int irq, struct irq_desc *desc)
413 raw_spin_unlock(&desc->lock); 414 raw_spin_unlock(&desc->lock);
414} 415}
415 416
417void handle_core_fault(unsigned int irq, struct irq_desc *desc)
418{
419 struct pt_regs *fp = get_irq_regs();
420
421 raw_spin_lock(&desc->lock);
422
423 switch (irq) {
424 case IRQ_C0_DBL_FAULT:
425 double_fault_c(fp);
426 break;
427 case IRQ_C0_HW_ERR:
428 dump_bfin_process(fp);
429 dump_bfin_mem(fp);
430 show_regs(fp);
431 printk(KERN_NOTICE "Kernel Stack\n");
432 show_stack(current, NULL);
433 print_modules();
434 panic("Kernel core hardware error");
435 break;
436 case IRQ_C0_NMI_L1_PARITY_ERR:
437 panic("NMI %d occurs unexpectedly");
438 break;
439 default:
440 panic("Core 1 fault %d occurs unexpectedly");
441 }
442
443 raw_spin_unlock(&desc->lock);
444}
416#endif 445#endif
417 446
418#ifdef CONFIG_SMP 447#ifdef CONFIG_SMP
@@ -1522,9 +1551,12 @@ int __init init_arch_irq(void)
1522 } else if (irq < BFIN_IRQ(0)) { 1551 } else if (irq < BFIN_IRQ(0)) {
1523 irq_set_chip_and_handler(irq, &bfin_internal_irqchip, 1552 irq_set_chip_and_handler(irq, &bfin_internal_irqchip,
1524 handle_simple_irq); 1553 handle_simple_irq);
1525 } else if (irq < CORE_IRQS && irq != IRQ_CGU_EVT) { 1554 } else if (irq == IRQ_SEC_ERR) {
1526 irq_set_chip_and_handler(irq, &bfin_sec_irqchip, 1555 irq_set_chip_and_handler(irq, &bfin_sec_irqchip,
1527 handle_sec_fault); 1556 handle_sec_fault);
1557 } else if (irq < CORE_IRQS && irq >= IRQ_C0_DBL_FAULT) {
1558 irq_set_chip_and_handler(irq, &bfin_sec_irqchip,
1559 handle_core_fault);
1528 } else if (irq >= BFIN_IRQ(21) && irq <= BFIN_IRQ(26)) { 1560 } else if (irq >= BFIN_IRQ(21) && irq <= BFIN_IRQ(26)) {
1529 irq_set_chip(irq, &bfin_sec_irqchip); 1561 irq_set_chip(irq, &bfin_sec_irqchip);
1530 irq_set_chained_handler(irq, bfin_demux_gpio_irq); 1562 irq_set_chained_handler(irq, bfin_demux_gpio_irq);