]> Git Repo - linux.git/commitdiff
Blackfin: export the last exception cause via debugfs
authorRobin Getz <[email protected]>
Wed, 3 Jun 2009 18:58:26 +0000 (18:58 +0000)
committerMike Frysinger <[email protected]>
Fri, 12 Jun 2009 10:15:28 +0000 (06:15 -0400)
We have some test code that runs in userspace that exercises the exception
handling of the Blackfin pretty thoroughly.  Part of the validation process
is checking the exact exception triggered, so export the last one seen to
userspace via debugfs when debugging is enabled for the test code to check.

Signed-off-by: Robin Getz <[email protected]>
Signed-off-by: Mike Frysinger <[email protected]>
arch/blackfin/kernel/traps.c

index 35f675f5ca16bfaeecb9f5f2c98b94316fb620d3..63ccb283acdcfa90cf658f81cb3cd57ddb9870ab 100644 (file)
        ({ if (0) printk(fmt, ##arg); 0; })
 #endif
 
+#if defined(CONFIG_DEBUG_MMRS) || defined(CONFIG_DEBUG_MMRS_MODULE)
+u32 last_seqstat;
+#ifdef CONFIG_DEBUG_MMRS_MODULE
+EXPORT_SYMBOL(last_seqstat);
+#endif
+#endif
+
 /* Initiate the event table handler */
 void __init trap_init(void)
 {
@@ -245,6 +252,9 @@ asmlinkage void trap_c(struct pt_regs *fp)
        unsigned long trapnr = fp->seqstat & SEQSTAT_EXCAUSE;
 
        trace_buffer_save(j);
+#if defined(CONFIG_DEBUG_MMRS) || defined(CONFIG_DEBUG_MMRS_MODULE)
+       last_seqstat = (u32)fp->seqstat;
+#endif
 
        /* Important - be very careful dereferncing pointers - will lead to
         * double faults if the stack has become corrupt
This page took 0.055935 seconds and 4 git commands to generate.