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

Author: Philippe Gerum <r...@xenomai.org>
Date:   Thu Dec 22 11:40:40 2011 +0100

arch/generic: use ipipe_prepare_panic() in case of emergency

---

 include/asm-generic/hal.h     |    6 ------
 include/asm-generic/system.h  |    2 +-
 kernel/cobalt/nucleus/debug.c |    4 ++--
 3 files changed, 3 insertions(+), 9 deletions(-)

diff --git a/include/asm-generic/hal.h b/include/asm-generic/hal.h
index 650e6ec..3fd69fb 100644
--- a/include/asm-generic/hal.h
+++ b/include/asm-generic/hal.h
@@ -80,12 +80,6 @@ enum rthal_ktimer_mode { /* <!> Must follow enum 
clock_event_mode */
 #define rthal_unmute_pic()             do { } while(0)
 #endif /* __IPIPE_FEATURE_PIC_MUTE */
 
-#define rthal_emergency_console()                              \
-       do {                                                    \
-               ipipe_stall_pipeline_from(ipipe_root_domain);   \
-               ipipe_set_printk_sync(ipipe_current_domain);    \
-       } while (0)
-
 static inline unsigned long rthal_get_timerfreq(void)
 {
        struct ipipe_sysinfo sysinfo;
diff --git a/include/asm-generic/system.h b/include/asm-generic/system.h
index c9ef307..52fe2d2 100644
--- a/include/asm-generic/system.h
+++ b/include/asm-generic/system.h
@@ -235,7 +235,7 @@ static inline unsigned long long xnarch_get_clock_freq(void)
 static inline void xnarch_begin_panic(void)
 {
        xnarch_trace_panic_freeze();
-       rthal_emergency_console();
+       ipipe_prepare_panic();
 }
 
 #define xnarch_halt()                                  \
diff --git a/kernel/cobalt/nucleus/debug.c b/kernel/cobalt/nucleus/debug.c
index 6e33115..64a10e9 100644
--- a/kernel/cobalt/nucleus/debug.c
+++ b/kernel/cobalt/nucleus/debug.c
@@ -548,7 +548,7 @@ void xnlock_dbg_spinning(struct xnlock *lock, int cpu,
                         const char *file, int line, const char *function)
 {
        if (--*spin_limit == 0) {
-               rthal_emergency_console();
+               ipipe_prepare_panic();
                printk(KERN_ERR "Xenomai: stuck on nucleus lock %p\n"
                                "         waiter = %s:%u (%s(), CPU #%d)\n"
                                "         owner  = %s:%u (%s(), CPU #%d)\n",
@@ -585,7 +585,7 @@ int xnlock_dbg_release(struct xnlock *lock)
        stats = &xnlock_stats[cpu];
 
        if (unlikely(atomic_read(&lock->owner) != cpu)) {
-               rthal_emergency_console();
+               ipipe_prepare_panic();
                printk(KERN_ERR "Xenomai: unlocking unlocked nucleus lock %p"
                                " on CPU #%d\n"
                                "         owner  = %s:%u (%s(), CPU #%d)\n",


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

Reply via email to