summaryrefslogtreecommitdiff
path: root/usr/src/uts/i86pc/ml
diff options
context:
space:
mode:
authorsudheer <none@none>2007-06-20 03:26:40 -0700
committersudheer <none@none>2007-06-20 03:26:40 -0700
commit7712e92cf4ce9bcf161748b8648b7537d95ffb16 (patch)
tree693a36eaf4f168e1d227f90d06e259cd5071c049 /usr/src/uts/i86pc/ml
parent34b3058f17535674a5b5c68e924617f6076dd640 (diff)
downloadillumos-joyent-7712e92cf4ce9bcf161748b8648b7537d95ffb16.tar.gz
6493689 Jvm crash: curthread set by kernel incorrect
Diffstat (limited to 'usr/src/uts/i86pc/ml')
-rw-r--r--usr/src/uts/i86pc/ml/locore.s6
-rw-r--r--usr/src/uts/i86pc/ml/syscall_asm_amd64.s15
2 files changed, 10 insertions, 11 deletions
diff --git a/usr/src/uts/i86pc/ml/locore.s b/usr/src/uts/i86pc/ml/locore.s
index c3da3b99bc..3605e10fff 100644
--- a/usr/src/uts/i86pc/ml/locore.s
+++ b/usr/src/uts/i86pc/ml/locore.s
@@ -1554,11 +1554,11 @@ _lwp_rtt:
#if defined(DEBUG)
/*
* If we were to run lwp_savectx at this point -without-
- * RUPDATE_PENDING being set, we'd end up sampling the hardware
+ * pcb_rupdate being set to 1, we'd end up sampling the hardware
* state left by the previous running lwp, rather than setting
* the values requested by the lwp creator. Bad.
*/
- testl $RUPDATE_PENDING, PCB_FLAGS(%r14)
+ testb $0x1, PCB_RUPDATE(%r14)
jne 1f
leaq _no_pending_updates(%rip), %rdi
movl $__LINE__, %esi
@@ -1566,7 +1566,7 @@ _lwp_rtt:
xorl %eax, %eax
call panic
_no_pending_updates:
- .string "locore.s:%d lwp_rtt(lwp %p) but no RUPDATE_PENDING"
+ .string "locore.s:%d lwp_rtt(lwp %p) but pcb_rupdate != 1"
1:
#endif
diff --git a/usr/src/uts/i86pc/ml/syscall_asm_amd64.s b/usr/src/uts/i86pc/ml/syscall_asm_amd64.s
index 537aeda633..51a1d8cb54 100644
--- a/usr/src/uts/i86pc/ml/syscall_asm_amd64.s
+++ b/usr/src/uts/i86pc/ml/syscall_asm_amd64.s
@@ -174,8 +174,8 @@
/*
* Check to see if a simple (direct) return is possible i.e.
*
- * if ((t->t_post_sys_ast | syscalltrace |
- * (lwp->lwp_pcb.pcb_flags & RUPDATE_PENDING)) != 0)
+ * if (t->t_post_sys_ast | syscalltrace |
+ * lwp->lwp_pcb.pcb_rupdate == 1)
* do full version ;
*
* Preconditions:
@@ -187,8 +187,7 @@
*/
#define CHECK_POSTSYS_NE(t, ltmp, rtmp) \
movq T_LWP(t), ltmp; \
- movl PCB_FLAGS(ltmp), rtmp; \
- andl $RUPDATE_PENDING, rtmp; \
+ movzbl PCB_RUPDATE(ltmp), rtmp; \
ORL_SYSCALLTRACE(rtmp); \
orl T_POST_SYS_AST(t), rtmp; \
cmpl $0, rtmp
@@ -226,7 +225,7 @@
* Postconditions (if assertion is true):
* -none-
*
- * ASSERT((lwp->lwp_pcb.pcb_flags & RUPDATE_PENDING) == 0);
+ * ASSERT(lwp->lwp_pcb.pcb_rupdate == 0);
*
* If this is false, it meant that we returned to userland without
* updating the segment registers as we were supposed to.
@@ -234,7 +233,7 @@
* Note that we must ensure no interrupts or other traps intervene
* between entering privileged mode and performing the assertion,
* otherwise we may perform a context switch on the thread, which
- * will end up setting the RUPDATE_PENDING bit again.
+ * will end up setting pcb_rupdate to 1 again.
*/
#if defined(DEBUG)
@@ -247,7 +246,7 @@ __codesel_msg:
.string "syscall_asm_amd64.s:%d rp->r_cs [%ld] != %ld"
__no_rupdate_msg:
- .string "syscall_asm_amd64.s:%d lwp %p, pcb_flags & RUPDATE_PENDING != 0"
+ .string "syscall_asm_amd64.s:%d lwp %p, pcb_rupdate != 0"
#endif /* !__lint */
@@ -265,7 +264,7 @@ __no_rupdate_msg:
7:
#define ASSERT_NO_RUPDATE_PENDING(lwp) \
- testl $RUPDATE_PENDING, PCB_FLAGS(lwp); \
+ testb $0x1, PCB_RUPDATE(lwp); \
je 8f; \
movq lwp, %rdx; \
leaq __no_rupdate_msg(%rip), %rdi; \