diff options
author | Sonic Zhang <sonic.zhang@analog.com> | 2012-07-04 07:22:55 -0400 |
---|---|---|
committer | Bob Liu <lliubbo@gmail.com> | 2012-07-24 01:39:52 -0400 |
commit | 06051fdefddf25e0bbf983aac40680f835829db7 (patch) | |
tree | cf8de7f13c788b7651bc03c4ad07e3d7511ae2d1 /arch/blackfin/mach-common | |
parent | 2a26a2055259862e771cb922aee3d1196040c205 (diff) |
bf60x: Add double fault, hardware error and NMI SEC handler
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bob Liu <lliubbo@gmail.com>
Diffstat (limited to 'arch/blackfin/mach-common')
-rw-r--r-- | arch/blackfin/mach-common/ints-priority.c | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/arch/blackfin/mach-common/ints-priority.c b/arch/blackfin/mach-common/ints-priority.c index 5a109a184021..9660d5fdbed4 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 | ||
417 | void 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); |