Index: arch/sparc64/include/trap/exception.h
===================================================================
--- arch/sparc64/include/trap/exception.h	(revision 80bff3426b0c5ce4e21f4e7f42a392db6cfc0d9a)
+++ arch/sparc64/include/trap/exception.h	(revision 80bff3426b0c5ce4e21f4e7f42a392db6cfc0d9a)
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2005 Jakub Jermar
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef __sparc64_EXCEPTION_H__
+#define __sparc64_EXCEPTION_H__
+
+#define TT_INSTRUCTION_ACCESS_EXCEPTION		0x08
+#define TT_MEM_ADDRESS_NOT_ALIGNED		0x34
+
+#ifndef __ASM__
+extern void do_instruction_access_exc(void);
+extern void do_mem_address_not_aligned(void);
+#endif /* !__ASM__ */
+
+#endif
Index: arch/sparc64/include/trap/interrupt.h
===================================================================
--- arch/sparc64/include/trap/interrupt.h	(revision 7614565928991ee1b958841cfa45a268038da3f5)
+++ arch/sparc64/include/trap/interrupt.h	(revision 80bff3426b0c5ce4e21f4e7f42a392db6cfc0d9a)
@@ -31,6 +31,6 @@
  */
 
-#ifndef __sparc64_INTERRUPT_H__
-#define __sparc64_INTERRUPT_H__
+#ifndef __sparc64_TRAP_INTERRUPT_H__
+#define __sparc64_TRAP_INTERRUPT_H__
 
 #include <arch/trap/trap_table.h>
@@ -60,8 +60,8 @@
 #ifdef __ASM__
 .macro INTERRUPT_LEVEL_N_HANDLER n
-	save %sp, -STACK_WINDOW_SAVE_AREA_SIZE, %sp
+	save %sp, -PREEMPTIBLE_HANDLER_STACK_FRAME_SIZE, %sp
 	mov \n - 1, %o0
 	mov %fp, %o1
-	SAVING_HANDLER exc_dispatch
+	PREEMPTIBLE_HANDLER exc_dispatch
 .endm
 
Index: arch/sparc64/include/trap/trap_table.h
===================================================================
--- arch/sparc64/include/trap/trap_table.h	(revision 7614565928991ee1b958841cfa45a268038da3f5)
+++ arch/sparc64/include/trap/trap_table.h	(revision 80bff3426b0c5ce4e21f4e7f42a392db6cfc0d9a)
@@ -72,7 +72,18 @@
 .endm
 
-.macro SAVING_HANDLER f
+#define PREEMPTIBLE_HANDLER_STACK_FRAME_SIZE	(STACK_WINDOW_SAVE_AREA_SIZE+(4*8))
+#define SAVED_TSTATE	-(1*8)
+#define SAVED_TPC	-(2*8)
+#define SAVED_TNPC	-(3*8)
+#define SAVED_PSTATE	-(4*8)
+
+.macro PREEMPTIBLE_HANDLER f
 	set \f, %l0
-	b saving_handler
+	b preemptible_handler
+	nop
+.endm
+
+.macro SIMPLE_HANDLER f
+	call \f
 	nop
 .endm
