patch-2.4.15 linux/arch/s390x/kernel/traps.c

Next file: linux/arch/s390x/kernel/wrapper32.S
Previous file: linux/arch/s390x/kernel/smp.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.14/linux/arch/s390x/kernel/traps.c linux/arch/s390x/kernel/traps.c
@@ -92,6 +92,13 @@
 static void inline do_trap(long interruption_code, int signr, char *str,
                            struct pt_regs *regs, siginfo_t *info)
 {
+	/*
+	 * We got all needed information from the lowcore and can
+	 * now safely switch on interrupts.
+	 */
+	if (regs->psw.mask & PSW_PROBLEM_STATE)
+		__sti();
+
         if (regs->psw.mask & PSW_PROBLEM_STATE) {
                 struct task_struct *tsk = current;
                 tsk->thread.trap_no = interruption_code;
@@ -161,6 +168,14 @@
 	int do_sig = 0;
 
 	location = (__u16 *)(regs->psw.addr-S390_lowcore.pgm_ilc);
+
+	/*
+	 * We got all needed information from the lowcore and can
+	 * now safely switch on interrupts.
+	 */
+	if (regs->psw.mask & PSW_PROBLEM_STATE)
+		__sti();
+
 	/* WARNING don't change this check back to */
 	/* int problem_state=(regs->psw.mask & PSW_PROBLEM_STATE); */
 	/* & then doing if(problem_state) an int is too small for this */
@@ -186,6 +201,14 @@
 	int do_sig = 0;
 
 	location = (__u16 *)(regs->psw.addr-S390_lowcore.pgm_ilc);
+
+	/*
+	 * We got all needed information from the lowcore and can
+	 * now safely switch on interrupts.
+	 */
+	if (regs->psw.mask & PSW_PROBLEM_STATE)
+		__sti();
+
 	__asm__ volatile ("stfpc %0\n\t" 
 			  : "=m" (current->thread.fp_regs.fpc));
 	/* Same code should work when we implement fpu emulation */

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)