#include <asm/thread_info.h>
#endif
+#ifdef CONFIG_COLDFIRE
+#include <asm/coldfire.h>
+#endif
+
/*
* Stack layout in 'ret_from_exception':
*
* 2C(sp) - sr
* 2E(sp) - pc
* 32(sp) - format & vector
+ * 36(sp) - MMUSR (Coldfire only)
+ * 3A(sp) - MMUAR (Coldfire only)
*/
/*
* that the stack frame is NOT for syscall
*/
.macro save_all_int
+#ifdef CONFIG_COLDFIRE
+ movel MMUSR,%sp@-
+ movel MMUAR,%sp@-
+#endif
clrl %sp@- | stk_adj
pea -1:w | orig d0
movel %d0,%sp@- | d0
.endm
.macro save_all_sys
+#ifdef CONFIG_COLDFIRE
+ movel MMUSR,%sp@-
+ movel MMUAR,%sp@-
+#endif
clrl %sp@- | stk_adj
movel %d0,%sp@- | orig d0
movel %d0,%sp@- | d0
movel %sp@+,%d0
addql #4,%sp | orig d0
addl %sp@+,%sp | stk adj
+#ifdef CONFIG_COLDFIRE
+ addql #8,%sp | MMUAR & MMUSR
+#endif
rte
.endm