summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJake Burkholder <jake@FreeBSD.org>2001-09-30 19:05:30 +0000
committerJake Burkholder <jake@FreeBSD.org>2001-09-30 19:05:30 +0000
commitc92d1bd2895adaa56005c2e378bea43a53d87ce9 (patch)
tree6edce9ea12dd4b275a34f2aa25f783e7a1edcf28
parent956856ae062153fc1e83b8c7a67fdbef0ead6ffa (diff)
Notes
-rw-r--r--sys/sparc64/sparc64/swtch.S9
-rw-r--r--sys/sparc64/sparc64/swtch.s9
2 files changed, 12 insertions, 6 deletions
diff --git a/sys/sparc64/sparc64/swtch.S b/sys/sparc64/sparc64/swtch.S
index a490811205e5..9cbcacc1207e 100644
--- a/sys/sparc64/sparc64/swtch.S
+++ b/sys/sparc64/sparc64/swtch.S
@@ -88,10 +88,12 @@ ENTRY(cpu_switch)
CATR(KTR_CT1, "cpu_switch: from=%p (%s) to=%p (%s)"
, %g1, %g2, %g3, 7, 8, 9)
stx %l0, [%g1 + KTR_PARM1]
- add %l0, P_COMM, %g2
+ ldx [%l0 + TD_PROC], %g2
+ add %g2, P_COMM, %g2
stx %g2, [%g1 + KTR_PARM2]
stx %o0, [%g1 + KTR_PARM3]
- add %o0, P_COMM, %g2
+ ldx [%o0 + TD_PROC], %g2
+ add %g2, P_COMM, %g2
stx %g2, [%g1 + KTR_PARM4]
9:
#endif
@@ -105,7 +107,7 @@ ENTRY(cpu_switch)
* If the process was using floating point, save its context.
*/
ldx [%l0 + TD_FRAME], %l1
- ldx [PCPU(CURPCB)], %l2
+ ldx [%l0 + TD_PCB], %l2
rd %y, %l3
stx %l3, [%l2 + PCB_Y]
rd %fprs, %l3
@@ -253,6 +255,7 @@ ENTRY(cpu_switch)
, %g1, %g2, %g3, 7, 8, 9)
ldx [PCPU(CURTHREAD)], %g2
stx %g2, [%g1 + KTR_PARM1]
+ ldx [%g2 + TD_PROC], %g2
add %g2, P_COMM, %g3
stx %g3, [%g1 + KTR_PARM2]
9:
diff --git a/sys/sparc64/sparc64/swtch.s b/sys/sparc64/sparc64/swtch.s
index a490811205e5..9cbcacc1207e 100644
--- a/sys/sparc64/sparc64/swtch.s
+++ b/sys/sparc64/sparc64/swtch.s
@@ -88,10 +88,12 @@ ENTRY(cpu_switch)
CATR(KTR_CT1, "cpu_switch: from=%p (%s) to=%p (%s)"
, %g1, %g2, %g3, 7, 8, 9)
stx %l0, [%g1 + KTR_PARM1]
- add %l0, P_COMM, %g2
+ ldx [%l0 + TD_PROC], %g2
+ add %g2, P_COMM, %g2
stx %g2, [%g1 + KTR_PARM2]
stx %o0, [%g1 + KTR_PARM3]
- add %o0, P_COMM, %g2
+ ldx [%o0 + TD_PROC], %g2
+ add %g2, P_COMM, %g2
stx %g2, [%g1 + KTR_PARM4]
9:
#endif
@@ -105,7 +107,7 @@ ENTRY(cpu_switch)
* If the process was using floating point, save its context.
*/
ldx [%l0 + TD_FRAME], %l1
- ldx [PCPU(CURPCB)], %l2
+ ldx [%l0 + TD_PCB], %l2
rd %y, %l3
stx %l3, [%l2 + PCB_Y]
rd %fprs, %l3
@@ -253,6 +255,7 @@ ENTRY(cpu_switch)
, %g1, %g2, %g3, 7, 8, 9)
ldx [PCPU(CURTHREAD)], %g2
stx %g2, [%g1 + KTR_PARM1]
+ ldx [%g2 + TD_PROC], %g2
add %g2, P_COMM, %g3
stx %g3, [%g1 + KTR_PARM2]
9: