I'm using Syslink_2_10_05_26 with Angstrom Linux Kernel V3.0.28 and running on a Beagle-xM board. I get a stack dump if I run any of the samples after rebooting my board. I do not get this stack dump if I run any of the sample applications again. It seems this stack dump only occurs after a board reboot. If I do a Google search on this topic, there is an ongoing discussion about WDT3 conflicting between the DSP and ARM processor. I back ported the following patches from V3.3 kernel:


Author: Omar Ramirez Luna <omar.ramirez@ti.com>  2012-02-21 18:46:20
Committer: Greg Kroah-Hartman <gregkh@linuxfoundation.org>  2012-02-24 12:05:38
Parent: 81a149561ed56a23ee84a783da0aec53f1077b8d (staging: Fix typo in unioxx5.c)
Child:  08cd9ef4eca0b53cdae190b718e4945408c7d3b8 (staging: tidspbridge: detect wdt3 feature at runtime)
Branches: master, remotes/origin/master
Follows: v3.3-rc3
Precedes: v3.4-rc1

    staging: tidspbridge: always compile dsp wdt code
    
    In order to detect it at runtime, we need the code handling wdt
    clock available at runtime to decide whether to enable or disable
    based on the baseimage symbols. Default timeout has been set to 5
    seconds.
    
    Downside is that we will lose the option to set a custom timeout
    for overflow, but than can be added (if needed) as part of debugfs.
    
    Signed-off-by: Omar Ramirez <omar.ramirez@ti.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

--------------------- drivers/staging/tidspbridge/Kconfig ---------------------
index d660891..0dd479f 100644
@@ -52,22 +52,6 @@ config TIDSPBRIDGE_CACHE_LINE_CHECK
       This can lead to heap corruption. Say Y, to enforce the check for 128
       byte alignment, buffers failing this check will be rejected.
 
-config TIDSPBRIDGE_WDT3
-    bool "Enable watchdog timer"
-    depends on TIDSPBRIDGE
-    help
-      WTD3 is managed by DSP and once it is enabled, DSP side bridge is in
-      charge of refreshing the timer before overflow, if the DSP hangs MPU
-      will caught the interrupt and try to recover DSP.
-
-config TIDSPBRIDGE_WDT_TIMEOUT
-    int "Watchdog timer timeout (in secs)"
-    depends on TIDSPBRIDGE && TIDSPBRIDGE_WDT3
-    default 5
-    help
-       Watchdog timer timeout value, after that time if the watchdog timer
-       counter is not reset the wdt overflow interrupt will be triggered
-
 config TIDSPBRIDGE_NTFY_PWRERR
     bool "Notify power errors"
     depends on TIDSPBRIDGE

-------------------- drivers/staging/tidspbridge/core/wdt.c --------------------
index 2126f59..70055c8 100644
@@ -25,8 +25,6 @@
 #include <dspbridge/host_os.h>
 
 
-#ifdef CONFIG_TIDSPBRIDGE_WDT3
-
 #define OMAP34XX_WDT3_BASE         (L4_PER_34XX_BASE + 0x30000)
 
 static struct dsp_wdt_setting dsp_wdt;
@@ -84,7 +82,7 @@ int dsp_wdt_init(void)
 void dsp_wdt_sm_set(void *data)
 {
     dsp_wdt.sm_wdt = data;
-    dsp_wdt.sm_wdt->wdt_overflow = CONFIG_TIDSPBRIDGE_WDT_TIMEOUT;
+    dsp_wdt.sm_wdt->wdt_overflow = 5;    /* in seconds */
 }
 
 
@@ -128,23 +126,3 @@ void dsp_wdt_enable(bool enable)
         clk_disable(dsp_wdt.fclk);
     }
 }
-
-#else
-void dsp_wdt_enable(bool enable)
-{
-}
-
-void dsp_wdt_sm_set(void *data)
-{
-}
-
-int dsp_wdt_init(void)
-{
-    return 0;
-}
-
-void dsp_wdt_exit(void)
-{
-}
-#endif
-

----------- drivers/staging/tidspbridge/include/dspbridge/_chnl_sm.h -----------
index 6e7ab4f..cc95a18 100644
@@ -99,14 +99,10 @@ struct shm {
     struct opp_rqst_struct opp_request;
     /* load monitor information structure */
     struct load_mon_struct load_mon_info;
-#ifdef CONFIG_TIDSPBRIDGE_WDT3
     /* Flag for WDT enable/disable F/I clocks */
     u32 wdt_setclocks;
     u32 wdt_overflow;    /* WDT overflow time */
     char dummy[176];    /* padding to 256 byte boundary */
-#else
-    char dummy[184];    /* padding to 256 byte boundary */
-#endif
     u32 shm_dbg_var[64];    /* shared memory debug variables */
 };
 

Author: Omar Ramirez Luna <omar.ramirez@ti.com>  2012-02-21 18:46:21
Committer: Greg Kroah-Hartman <gregkh@linuxfoundation.org>  2012-02-24 12:05:38
Parent: 18db4fe09886691a781f3d1e4589ede0239d8ee2 (staging: tidspbridge: always compile dsp wdt code)
Child:  ac917a81117ce0286847666b55dd265f6cda8383 (staging:iio:core set the iio_dev.info pointer to null on unregister under lock.)
Branches: master, remotes/origin/master
Follows: v3.3-rc3
Precedes: v3.4-rc1

    staging: tidspbridge: detect wdt3 feature at runtime
    
    In order to detect WDT feature on the dsp code, we need to
    find the symbol used to enable it inside the baseimage.
    
    This should fix the warning comming from L3 driver:
    
        WARNING: at arch/arm/mach-omap2/omap_l3_smx.c:161 omap3_l3_app_irq...
        In-band Error seen by IVA_SS  at address 0
        ...
    
    That occurs because the dsp tries to access wdt3 registers when the clock
    for those registers is not enabled.
    
    Reported-by: Felipe Contreras <felipe.contreras@gmail.com>
    Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---------------- drivers/staging/tidspbridge/core/tiomap3430.c ----------------
index 670de0a..7862513 100644
@@ -383,6 +383,7 @@ static int bridge_brd_start(struct bridge_dev_context *dev_ctxt,
     u32 clk_cmd;
     struct io_mgr *hio_mgr;
     u32 ul_load_monitor_timer;
+    u32 wdt_en = 0;
     struct omap_dsp_platform_data *pdata =
         omap_dspbridge_dev->dev.platform_data;
 
@@ -594,9 +595,12 @@ static int bridge_brd_start(struct bridge_dev_context *dev_ctxt,
         if (!wait_for_start(dev_context, dw_sync_addr))
             status = -ETIMEDOUT;
 
-        /* Start wdt */
-        dsp_wdt_sm_set((void *)ul_shm_base);
-        dsp_wdt_enable(true);
+        dev_get_symbol(dev_context->dev_obj, "_WDT_enable", &wdt_en);
+        if (wdt_en) {
+            /* Start wdt */
+            dsp_wdt_sm_set((void *)ul_shm_base);
+            dsp_wdt_enable(true);
+        }
 
         status = dev_get_io_mgr(dev_context->dev_obj, &hio_mgr);
         if (hio_mgr) {


However, I still get the following stack dump:


root@beagleboard:~# modprobe syslink TRACE=1 TRACEFAILURE=1                                                                                  
[  531.568145] SysLink version : 2.10.05.26                                                                                                  
[  531.568145] SysLink module created on Date:Jun 12 2012 Time:20:40:51                                                                      
[  531.579284] Trace enabled                                                                                                                 
[  531.582092] Trace SetFailureReason enabled                                                                                                
qapp_debug.sh rd:/usr/share/ti/syslink-examples/OMAP3530/messageq# ./run_messageq                      e/ti/syslink-examples/OMAP3530/mesa
======== Running app using slaveloader ========
[  558.805023] omap-iommu omap-iommu.1: iva2: version 1.0messageq# cd /usr/share/                                                            
Attached to slave procId 0.                                                                                                                  
Mapping SV: 0x87d00000, SP: 0x87d00000, MP: 0x87d00000,                                                                                      
  size 0xfdb00, mask 0x5, cached 0                                                                                                           
ProcMgr_map succeeded                                                                                                                        
Mapping SV: 0x87dfdb00, SP: 0x87dfdb00, MP: 0x87dfdb00,                                                                                      
  size 0x2500, mask 0x5, cached 0                                                                                                            
ProcMgr_map succeeded                                                                                                                        
Mapping SV: 0x87e00000, SP: 0x87e00000, MP: 0x87e00000,                                                                                      
  size 0x100000, mask 0x5, cached 0                                                                                                          
ProcMgr_map succeeded                                                                                                                        
Mapping SV: 0x87f00000, SP: 0x87f00000, MP: 0x87f00000,                                                                                      
  size 0x100000, mask 0x5, cached 0                                                                                                          
ProcMgr_map succeeded                                                                                                                        
Mapped entries in ./omap3530_memmap.txt to slave procId 0.                                                                                   
Loading procId 0.                                                                                                                            
Loaded file ./messageq_omap3530_dsp.x64P on slave procId 0.                                                                                  
Started slave procId 0.                                                                                                                      
MessageQApp sample application                                                                                                               
Run for all supported proc IDs                                                                                                               
Entered MessageQ[  559.055908] ------------[ cut here ]------------                                                                          
[  559.061950] WARNING: at arch/arm/mach-omap2/omap_l3_smx.c:162 omap3_l3_app_irq+0x110/0x158()                                              
[  559.070983] In-band Error seen by IVA_SS  at address 0                                                                                    
[  559.076477] Modules linked in: syslink hid_multitouch rtc_twl twl4030_madc_hwmon twl4030_madc rfcomm hidp ipv6                            
[  559.087341] [<c0062c74>] (unwind_backtrace+0x0/0x128) from [<c055a834>] (dump_stack+0x20/0x24)                                            
[  559.096588] [<c055a834>] (dump_stack+0x20/0x24) from [<c00913bc>] (warn_slowpath_common+0x5c/0x74)                                        
[  559.106201] [<c00913bc>] (warn_slowpath_common+0x5c/0x74) from [<c0091490>] (warn_slowpath_fmt+0x40/0x48)                                 
[  559.116455] [<c0091490>] (warn_slowpath_fmt+0x40/0x48) from [<c0077fa4>] (omap3_l3_app_irq+0x110/0x158)                                   
[  559.126525] [<c0077fa4>] (omap3_l3_app_irq+0x110/0x158) from [<c00d2630>] (handle_irq_event_percpu+0x80/0x22c)                            
[  559.137207] [<c00d2630>] (handle_irq_event_percpu+0x80/0x22c) from [<c00d2814>] (handle_irq_event+0x38/0x48)                              
[  559.147735] [<c00d2814>] (handle_irq_event+0x38/0x48) from [<c00d476c>] (handle_level_irq+0xbc/0xcc)                                      
[  559.157501] [<c00d476c>] (handle_level_irq+0xbc/0xcc) from [<c00d1ff0>] (generic_handle_irq+0x40/0x54)                                    
[  559.167480] [<c00d1ff0>] (generic_handle_irq+0x40/0x54) from [<c00572e0>] (asm_do_IRQ+0x70/0x94)                                          
[  559.176910] [<c00572e0>] (asm_do_IRQ+0x70/0x94) from [<c005cfb4>] (__irq_svc+0x34/0x80)                                                   
[  559.185455] Exception stack(0xc2f89d48 to 0xc2f89d90)                                                                                     
[  559.190856] 9d40:                   00000101 00050000 bf16ff37 00000000 00000294 bf19d710                                                 
[  559.199615] 9d60: bf1cdf24 00000080 00000000 00000000 00000000 c2f89da4 c2f89da8 c2f89d94                                                 
[  559.208374] 9d80: bf101dd4 bf0fa038 20000013 ffffffff                                                                                     
[  559.214080] [<c005cfb4>] (__irq_svc+0x34/0x80) from [<bf0fa038>] (_GT_0trace+0x10/0x58 [syslink])                                         
[  559.223907] [<bf0fa038>] (_GT_0trace+0x10/0x58 [syslink]) from [<bf101dd4>] (MultiProc_self+0x30/0x64 [syslink])                          
[  559.235168] [<bf101dd4>] (MultiProc_self+0x30/0x64 [syslink]) from [<bf121328>] (Ipc_getSlaveAddr+0x60/0xa8 [syslink])                    
[  559.247009] [<bf121328>] (Ipc_getSlaveAddr+0x60/0xa8 [syslink]) from [<bf121668>] (Ipc_procSyncStart+0xac/0x200 [syslink])                
[  559.259216] [<bf121668>] (Ipc_procSyncStart+0xac/0x200 [syslink]) from [<bf121e1c>] (Ipc_attach+0x150/0x760 [syslink])                    
[  559.275909] [<bf121e1c>] (Ipc_attach+0x150/0x760 [syslink]) from [<bf0f1550>] (Platform_startCallback+0x4c/0x214 [syslink])               
[  559.293151] [<bf0f1550>] (Platform_startCallback+0x4c/0x214 [syslink]) from [<bf120f70>] (Ipc_control+0xa4/0x168 [syslink])               
[  559.310607] [<bf120f70>] (Ipc_control+0xa4/0x168 [syslink]) from [<bf15ac9c>] (IpcDrv_drvioctl+0x70/0x29c [syslink])                      
[  559.327331] [<bf15ac9c>] (IpcDrv_drvioctl+0x70/0x29c [syslink]) from [<c0143550>] (do_vfs_ioctl+0x4bc/0x530)                              
[  559.343139] [<c0143550>] (do_vfs_ioctl+0x4bc/0x530) from [<c014360c>] (sys_ioctl+0x48/0x6c)                                               
[  559.357482] [<c014360c>] (sys_ioctl+0x48/0x6c) from [<c005d400>] (ret_fast_syscall+0x0/0x30)                                              
[  559.371917] ---[ end trace f5b7e1dbb4513c07 ]---                                                                                          
App_startup                                                                                                                                  
After Ipc_loadcallback:                                                                                                                      
    status [0x0]                                                                                                                             
After Ipc_startcallback:                                                                                                                     
    status [0x97d2000]                                                                                                                       
Leaving MessageQApp_startup 97d2000                                                                                                          
Entered MessageQApp_execute                                                                                                                  
MessageQApp_threadHandler entered                                                                                                            
Registering heapId 0 with MessageQ for procId: 0                                                                                             
MessageQ_create name MSGQ_10  status [0x0] : procId [0]                                                                                      
Sending synchronizaion notification to ProcId: 0                                                                                             
Sent synchronizaion notification to ProcId: 0                                                                                                
MessageQ_open Status [0x0] : procId [0]                                                                                                      
MessageQApp_queueId  [0x0] : procId [0]                                                                                                      
Sending a message #100 to 0                                                                                                                  
Sending a message #200 to 0                                                                                                                  
Sending a message #300 to 0                                                                                                                  
Sending a message #400 to 0                                                                                                                  
Sending a message #500 to 0                                                                                                                  
Sending a message #600 to 0                                                                                                                  
Sending a message #700 to 0                                                                                                                  
Sending a message #800 to 0                                                                                                                  
Sending a message #900 to 0                                                                                                                  
Sending a message #1000 to 0                                                                                                                 
Leaving MessageQApp_threadHandler 0                                                                                                          
Leaving MessageQApp_execute                                                                                                                  
Entered MessageQApp_shutdown()                                                                                                               
After Ipc_stopCallback status: [0x97d2000]                                                                                                   
Leaving MessageQApp_shutdown() (0x97d2000)                                                                                                   
Stopped slave procId 0.                                                                                                                      
Unloaded slave procId 0.                                                                                                                     
Unmapping SV: 0x87d00000, SP: 0x87d00000, MP: 0x87d00000,                                                                                    
  size 0xfdb00, mask 0x5, cached 0                                                                                                           
Found MKV entry (0xc8500000)                                                                                                                 
ProcMgr_unmap succeeded                                                                                                                      
Unmapping SV: 0x87dfdb00, SP: 0x87dfdb00, MP: 0x87dfdb00,                                                                                    
  size 0x2500, mask 0x5, cached 0                                                                                                            
Found MKV entry (0xc8410b00)                                                                                                                 
ProcMgr_unmap succeeded                                                                                                                      
Unmapping SV: 0x87e00000, SP: 0x87e00000, MP: 0x87e00000,                                                                                    
  size 0x100000, mask 0x5, cached 0                                                                                                          
Found MKV entry (0xc8600000)                                                                                                                 
ProcMgr_unmap succeeded                                                                                                                      
Unmapping SV: 0x87f00000, SP: 0x87f00000, MP: 0x87f00000,                                                                                    
  size 0x100000, mask 0x5, cached 0                                                                                                          
Found MKV entry (0xc8800000)                                                                                                                 
ProcMgr_unmap succeeded                                                                                                                      
Mapped entries in ./omap3530_memmap.txt to slave procId 0.                                                                                   
Detached from slave procId 0.                                                                                                                
======== Running app using arguments ========                                                                                                
MessageQApp sample application                                                                                                               
Received ./omap3530_memmap.txt                                                                                                               
Entered MessageQApp_startup                                                                                                                  
Loading and starting procId [0] with [./messageq_omap3530_dsp.x64P]                                                                          
[  561.498443] omap-iommu omap-iommu.1: iva2: version 1.0                                                                                    
Attached to slave procId 0.                                                                                                                  
Mapping SV: 0x87d00000, SP: 0x87d00000, MP: 0x87d00000,                                                                                      
  size 0xfdb00, mask 0x5, cached 0                                                                                                           
ProcMgr_map succeeded                                                                                                                        
Mapping SV: 0x87dfdb00, SP: 0x87dfdb00, MP: 0x87dfdb00,                                                                                      
  size 0x2500, mask 0x5, cached 0                                                                                                            
ProcMgr_map succeeded                                                                                                                        
Mapping SV: 0x87e00000, SP: 0x87e00000, MP: 0x87e00000,                                                                                      
  size 0x100000, mask 0x5, cached 0                                                                                                          
ProcMgr_map succeeded                                                                                                                        
Mapping SV: 0x87f00000, SP: 0x87f00000, MP: 0x87f00000,                                                                                      
  size 0x100000, mask 0x5, cached 0                                                                                                          
ProcMgr_map succeeded                                                                                                                        
Mapped entries in ./omap3530_memmap.txt to slave procId 0.                                                                                   
Loading procId 0.                                                                                                                            
Loaded file ./messageq_omap3530_dsp.x64P on slave procId 0.                                                                                  
Started slave procId 0.                                                                                                                      
SlaveLoader_startup status [111693824]                                                                                                       
After Ipc_loadcallback:                                                                                                                      
    status [0x0]                                                                                                                             
After Ipc_startcallback:                                                                                                                     
    status [0x97d2000]                                                                                                                       
Leaving MessageQApp_startup 97d2000                                                                                                          
Entered MessageQApp_execute                                                                                                                  
MessageQApp_threadHandler entered                                                                                                            
Registering heapId 0 with MessageQ for procId: 0                                                                                             
MessageQ_create name MSGQ_10  status [0x0] : procId [0]                                                                                      
Sending synchronizaion notification to ProcId: 0                                                                                             
Sent synchronizaion notification to ProcId: 0                                                                                                
MessageQ_open Status [0x0] : procId [0]                                                                                                      
MessageQApp_queueId  [0x0] : procId [0]                                                                                                      
Sending a message #100 to 0                                                                                                                  
Sending a message #200 to 0                                                                                                                  
Sending a message #300 to 0                                                                                                                  
Sending a message #400 to 0                                                                                                                  
Sending a message #500 to 0                                                                                                                  
Sending a message #600 to 0                                                                                                                  
Sending a message #700 to 0                                                                                                                  
Sending a message #800 to 0                                                                                                                  
Sending a message #900 to 0                                                                                                                  
Sending a message #1000 to 0                                                                                                                 
Leaving MessageQApp_threadHandler 0                                                                                                          
Leaving MessageQApp_execute                                                                                                                  
Entered MessageQApp_shutdown()                                                                                                               
After Ipc_stopCallback status: [0x97d2000]                                                                                                   
Shutting down procId [0]                                                                                                                     
Stopped slave procId 0.                                                                                                                      
Unloaded slave procId 0.                                                                                                                     
Unmapping SV: 0x87d00000, SP: 0x87d00000, MP: 0x87d00000,                                                                                    
  size 0xfdb00, mask 0x5, cached 0                                                                                                           
Found MKV entry (0xc8a00000)                                                                                                                 
ProcMgr_unmap succeeded                                                                                                                      
Unmapping SV: 0x87dfdb00, SP: 0x87dfdb00, MP: 0x87dfdb00,                                                                                    
  size 0x2500, mask 0x5, cached 0                                                                                                            
Found MKV entry (0xc87dcb00)                                                                                                                 
ProcMgr_unmap succeeded                                                                                                                      
Unmapping SV: 0x87e00000, SP: 0x87e00000, MP: 0x87e00000,                                                                                    
  size 0x100000, mask 0x5, cached 0                                                                                                          
Found MKV entry (0xc8c00000)                                                                                                                 
ProcMgr_unmap succeeded                                                                                                                      
Unmapping SV: 0x87f00000, SP: 0x87f00000, MP: 0x87f00000,                                                                                    
  size 0x100000, mask 0x5, cached 0                                                                                                          
Found MKV entry (0xc8e00000)                                                                                                                 
ProcMgr_unmap succeeded                                                                                                                      
Mapped entries in ./omap3530_memmap.txt to slave procId 0.                                                                                   
Detached from slave procId 0.                                                                                                                
SlaveLoader_shutdown status [0]                                                                                                              
Leaving MessageQApp_shutdown() (0x0)