Module: xenomai-jki
Branch: for-upstream
Commit: 3788764b408e9a69187755bdf4908d3cad0bfe8f
URL:    
http://git.xenomai.org/?p=xenomai-jki.git;a=commit;h=3788764b408e9a69187755bdf4908d3cad0bfe8f

Author: Jan Kiszka <jan.kis...@siemens.com>
Date:   Tue Jun 28 18:12:51 2011 +0200

hal: Stall root domain in rthal_emergency_console

Calling printk with the root domain unstalled will make it reenable hard
IRQs on exit. That will sooner or later trigger I-pipe bug checks and
corrupt the panic dump. Avoid this by stalling the root domain when
entering emergency console mode. We are doomed anyway.

Signed-off-by: Jan Kiszka <jan.kis...@siemens.com>

---

 include/asm-generic/hal.h |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/include/asm-generic/hal.h b/include/asm-generic/hal.h
index 7b4b975..b76f19a 100644
--- a/include/asm-generic/hal.h
+++ b/include/asm-generic/hal.h
@@ -190,9 +190,14 @@ typedef spinlock_t rthal_spinlock_t;
 
 #define rthal_setsched_root(t,pol,prio)        
ipipe_setscheduler_root(t,pol,prio)
 #define rthal_reenter_root(t,pol,prio) ipipe_reenter_root(t,pol,prio)
-#define rthal_emergency_console()      
ipipe_set_printk_sync(ipipe_current_domain)
 #define rthal_read_tsc(v)              ipipe_read_tsc(v)
 
+#define rthal_emergency_console()                              \
+       do {                                                    \
+               ipipe_stall_pipeline_from(ipipe_root_domain);   \
+               ipipe_set_printk_sync(ipipe_current_domain);    \
+       } while (0)
+
 #ifdef __IPIPE_FEATURE_SYSINFO_V2
 
 static inline unsigned long rthal_get_cpufreq(void)


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

Reply via email to