From 28ae06aad0bb8414e4e426c332795fffe6d2f0b6 Mon Sep 17 00:00:00 2001 From: Doug Rabson Date: Wed, 2 Dec 1998 10:24:56 +0000 Subject: [PATCH] Restore the user HAE all the time, not just when returning to usermode. This closes a very small window where the use HAE might not be restored at all. This only happens when switching to a process which has used the HAE. --- sys/alpha/alpha/swtch.s | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sys/alpha/alpha/swtch.s b/sys/alpha/alpha/swtch.s index 11493202e28..ab3f996d6f1 100644 --- a/sys/alpha/alpha/swtch.s +++ b/sys/alpha/alpha/swtch.s @@ -1,4 +1,4 @@ -/* $Id: swtch.s,v 1.5 1998/08/23 16:05:54 dfr Exp $ */ +/* $Id: swtch.s,v 1.6 1998/11/15 18:25:15 dfr Exp $ */ /* $NetBSD: locore.s,v 1.47 1998/03/22 07:26:32 thorpej Exp $ */ /* @@ -324,16 +324,18 @@ Lsetfpenable: cmovne t0, 1, a0 call_pal PAL_OSF1_wrfen +Lrestoreregs: /* set the hae register if this process has specified a value */ ldq t0, curproc + beq t0, Lnohae ldq t1, P_MD_FLAGS(t0) and t1, MDP_HAEUSED - beq t1, Lrestoreregs + beq t1, Lnohae ldq a0, P_MD_HAE(t0) ldq pv, chipset + CHIPSET_WRITE_HAE CALL((pv)) +Lnohae: -Lrestoreregs: /* restore the registers, and return */ bsr ra, exception_restore_regs /* jmp/CALL trashes pv/t12 */ ldq ra,(FRAME_RA*8)(sp)