Module: xenomai-2.4
Branch: master
Commit: ddec4518eaf7b52a4d0ab815460cc507231b96b7
URL:    
http://git.xenomai.org/?p=xenomai-2.4.git;a=commit;h=ddec4518eaf7b52a4d0ab815460cc507231b96b7

Author: Philippe Gerum <r...@xenomai.org>
Date:   Tue Dec 22 11:35:00 2009 +0100

blackfin: fix NMI support code for 2.6.30 and above

---

 ksrc/arch/blackfin/Kconfig  |    1 +
 ksrc/arch/blackfin/hal.c    |    7 +++++++
 ksrc/arch/blackfin/nmi.c    |    1 -
 ksrc/arch/blackfin/switch.S |    2 ++
 4 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/ksrc/arch/blackfin/Kconfig b/ksrc/arch/blackfin/Kconfig
index a2208ef..c4ea5f8 100644
--- a/ksrc/arch/blackfin/Kconfig
+++ b/ksrc/arch/blackfin/Kconfig
@@ -13,6 +13,7 @@ menu "NMI watchdog"
 config XENO_HW_NMI_DEBUG_LATENCY
         bool "Enable NMI watchdog"
         default n
+       select DEBUG_ICACHE_CHECK
         help
         Enabling this option allows the NMI watchdog to be used in order
         to debug abnormal (timer) interrupt latencies.
diff --git a/ksrc/arch/blackfin/hal.c b/ksrc/arch/blackfin/hal.c
index 977987d..e010202 100644
--- a/ksrc/arch/blackfin/hal.c
+++ b/ksrc/arch/blackfin/hal.c
@@ -198,6 +198,10 @@ int rthal_timer_request(
 
        rthal_timer_set_oneshot(1);
 
+#ifdef CONFIG_XENO_HW_NMI_DEBUG_LATENCY
+       rthal_nmi_init(&rthal_latency_above_max);
+#endif /* CONFIG_XENO_HW_NMI_DEBUG_LATENCY */
+
 out:
        return tickval;
 }
@@ -209,6 +213,9 @@ void rthal_timer_release(int cpu)
        if (--cpu_timers_requested > 0)
                return;
 
+#ifdef CONFIG_XENO_HW_NMI_DEBUG_LATENCY
+       rthal_nmi_release();
+#endif /* CONFIG_XENO_HW_NMI_DEBUG_LATENCY */
        rthal_irq_release(RTHAL_TIMER_IRQ);
 
        if (rthal_ktimer_saved_mode == KTIMER_MODE_PERIODIC)
diff --git a/ksrc/arch/blackfin/nmi.c b/ksrc/arch/blackfin/nmi.c
index 6896ec0..be92611 100644
--- a/ksrc/arch/blackfin/nmi.c
+++ b/ksrc/arch/blackfin/nmi.c
@@ -29,7 +29,6 @@
 #include <linux/module.h>
 #include <asm/system.h>
 #include <asm/atomic.h>
-#include <asm/irqchip.h>
 #include <asm/io.h>
 #include <asm/uaccess.h>
 #include <asm/unistd.h>
diff --git a/ksrc/arch/blackfin/switch.S b/ksrc/arch/blackfin/switch.S
index 6696a2f..d523ab2 100644
--- a/ksrc/arch/blackfin/switch.S
+++ b/ksrc/arch/blackfin/switch.S
@@ -103,6 +103,8 @@ ENTRY(_rthal_defer_switch_p)
 
 #ifdef CONFIG_XENO_HW_NMI_DEBUG_LATENCY
 
+#include <asm/context.S>
+
 ENTRY(_rthal_nmi_handler)
        SAVE_ALL_SYS
        r0 = sp;


_______________________________________________
Xenomai-git mailing list
Xenomai-git@gna.org
https://mail.gna.org/listinfo/xenomai-git

Reply via email to