summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjake <jake@FreeBSD.org>2001-09-30 19:05:30 +0000
committerjake <jake@FreeBSD.org>2001-09-30 19:05:30 +0000
commitfdfc3c2c601a5cc1ec96e1e25acd98b05649a171 (patch)
tree6edce9ea12dd4b275a34f2aa25f783e7a1edcf28
parentd495dd131c5ab99a651eb6acb3cc01ca6ae47874 (diff)
downloadFreeBSD-src-fdfc3c2c601a5cc1ec96e1e25acd98b05649a171.zip
FreeBSD-src-fdfc3c2c601a5cc1ec96e1e25acd98b05649a171.tar.gz
Fix some traces. td->p_comm doesn't exist.
-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 a490811..9cbcacc 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 a490811..9cbcacc 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:
OpenPOWER on IntegriCloud