changeset 193:031ab7adbddb

sched: slim down struct regs The struct was being used for 2 unrelated cases: 1) saving CP task registers 2) saving guest registers The CP task only needs to save the GPRs and the PSW, while the guest's GPRs, ARs, FPRs, and FPCR need to be saved. Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
author Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
date Mon, 05 Jan 2009 19:39:42 -0500
parents d10d247ddaa8
children 0588d0340010
files include/sched.h
diffstat 1 files changed, 13 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/include/sched.h	Mon Jan 05 19:20:38 2009 -0500
+++ b/include/sched.h	Mon Jan 05 19:39:42 2009 -0500
@@ -45,11 +45,21 @@
 	u64 ptr;
 };
 
+/*
+ * saved registers for guests
+ *
+ * NOTE: some registers are saved in the SIE control block!
+ */
+struct guest_regs {
+	u64 gpr[16];
+	u32 ar[16];
+	/* FIXME: fpr[16] & fpcr */
+};
+
+/* saved registers for CP tasks */
 struct regs {
 	struct psw psw;
 	u64 gpr[16];
-	u32 ar[16];
-	/* FIXME: fpr[16] */
 };
 
 /*
@@ -68,7 +78,7 @@
 	/* the SIE control block is picky about alignment */
 	struct sie_cb sie_cb;
 
-	struct regs regs;
+	struct guest_regs regs;
 
 	struct address_space as;
 	enum guest_cpustate state;