summaryrefslogtreecommitdiffstats
path: root/sys/ia64
diff options
context:
space:
mode:
authordfr <dfr@FreeBSD.org>2002-03-14 00:28:10 +0000
committerdfr <dfr@FreeBSD.org>2002-03-14 00:28:10 +0000
commita679e26ad56716183d77d87bfafdd06eb480e518 (patch)
treed9a89220832d48761dcec54f15531247218423ba /sys/ia64
parent9a5e1dcf2178008d16264c9b2bef6a202359e7e0 (diff)
downloadFreeBSD-src-a679e26ad56716183d77d87bfafdd06eb480e518.zip
FreeBSD-src-a679e26ad56716183d77d87bfafdd06eb480e518.tar.gz
Don't restore r13 when returning to kernel mode. We may have migrated to
a different cpu since the exception_save and r13 needs to point at the current cpu's pcpu structure.
Diffstat (limited to 'sys/ia64')
-rw-r--r--sys/ia64/ia64/exception.S5
-rw-r--r--sys/ia64/ia64/exception.s5
2 files changed, 8 insertions, 2 deletions
diff --git a/sys/ia64/ia64/exception.S b/sys/ia64/ia64/exception.S
index 25505dd..780dc3c 100644
--- a/sys/ia64/ia64/exception.S
+++ b/sys/ia64/ia64/exception.S
@@ -882,7 +882,10 @@ ENTRY(exception_restore, 0)
ld8.fill r15=[r1],-16 // r1=&tf_r[FRAME_R13]
ld8.fill r14=[r2],-16 // r2=&tf_r[FRAME_R12]
;;
- ld8.fill r13=[r1],-16 // r1=&tf_r[FRAME_R11]
+ // Don't restore r13 if returning to kernel
+ .pred.rel.mutex p1,p2
+(p2) ld8.fill r13=[r1],-16 // r1=&tf_r[FRAME_R11]
+(p1) add r1=-16,r1 // r1=&tf_r[FRAME_R11]
ld8.fill r12=[r2],-16 // r2=&tf_r[FRAME_R10]
;;
ld8.fill r11=[r1],-16 // r1=&tf_r[FRAME_R9]
diff --git a/sys/ia64/ia64/exception.s b/sys/ia64/ia64/exception.s
index 25505dd..780dc3c 100644
--- a/sys/ia64/ia64/exception.s
+++ b/sys/ia64/ia64/exception.s
@@ -882,7 +882,10 @@ ENTRY(exception_restore, 0)
ld8.fill r15=[r1],-16 // r1=&tf_r[FRAME_R13]
ld8.fill r14=[r2],-16 // r2=&tf_r[FRAME_R12]
;;
- ld8.fill r13=[r1],-16 // r1=&tf_r[FRAME_R11]
+ // Don't restore r13 if returning to kernel
+ .pred.rel.mutex p1,p2
+(p2) ld8.fill r13=[r1],-16 // r1=&tf_r[FRAME_R11]
+(p1) add r1=-16,r1 // r1=&tf_r[FRAME_R11]
ld8.fill r12=[r2],-16 // r2=&tf_r[FRAME_R10]
;;
ld8.fill r11=[r1],-16 // r1=&tf_r[FRAME_R9]
OpenPOWER on IntegriCloud