changeset 135:8a9f090e4747

psw for disabled wait state in prog_int_handler is loaded from the stack
author Jonathan Pevarnek <pevarnj@gmail.com>
date Mon, 12 Sep 2011 11:13:40 -0400
parents 42ca337f6e4b
children efe361763f81
files arch/except.c arch/progint.h
diffstat 2 files changed, 7 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/arch/except.c	Mon Sep 12 10:29:08 2011 -0400
+++ b/arch/except.c	Mon Sep 12 11:13:40 2011 -0400
@@ -15,16 +15,16 @@
 }
 
 void prog_int_handler() {
-	Psw *psw = PROGINT_TMP;
-	__builtin_memset(psw, 0, sizeof(Psw)); //I am going to use the builtin ones
+	Psw psw;
+	__builtin_memset(&psw, 0, sizeof(Psw)); //I am going to use the builtin ones
 	                                       //for a bit longer while I think
-	psw->w = 1;
-	psw->ea = 1;
-	psw->ba = 1;
-	psw->ptr = 0xd1e;
+	psw.w = 1;
+	psw.ea = 1;
+	psw.ba = 1;
+	psw.ptr = 0xd1e;
 	asm volatile(
 		"lpswe %0\n"
 		: /* no output */
-		: "m" (*PROGINT_TMP)
+		: "m" (psw)
 	);
 }
--- a/arch/progint.h	Mon Sep 12 10:29:08 2011 -0400
+++ b/arch/progint.h	Mon Sep 12 11:13:40 2011 -0400
@@ -2,8 +2,6 @@
 #define __PROGINT_H
 
 #define PROGINT_REG_LOC 0x300
-#define PROGINT_TMP_LOC 0x300 + 16*sizeof(u64)
-#define PROGINT_TMP ((struct psw*) PROGINT_TMP_LOC)
 
 #define PROGINT_PSW_OLD 0x150
 #define PROGINT_PSW_NEW 0x1D0