Lines Matching defs:mpcb
127 struct machpcb *mpcb;
136 mpcb = (struct machpcb *)stk;
137 bzero(mpcb, sizeof (struct machpcb));
139 lwp->lwp_regs = (void *)&mpcb->mpcb_regs;
141 mpcb->mpcb_fpu = fp;
142 mpcb->mpcb_fpu->fpu_q = mpcb->mpcb_fpu_q;
143 mpcb->mpcb_thread = lwp->lwp_thread;
144 mpcb->mpcb_wbcnt = 0;
146 mpcb->mpcb_wstate = WSTATE_USER32;
147 mpcb->mpcb_wbuf = kmem_cache_alloc(wbuf32_cache, KM_SLEEP);
149 mpcb->mpcb_wstate = WSTATE_USER64;
150 mpcb->mpcb_wbuf = kmem_cache_alloc(wbuf64_cache, KM_SLEEP);
152 ASSERT(((uintptr_t)mpcb->mpcb_wbuf & 7) == 0);
153 mpcb->mpcb_wbuf_pa = va_to_pa(mpcb->mpcb_wbuf);
154 mpcb->mpcb_pa = va_to_pa(mpcb);
161 struct machpcb *mpcb = lwptompcb(lwp);
167 mpcb->mpcb_wbcnt = 0;
168 if (mpcb->mpcb_wstate == WSTATE_USER32)
169 kmem_cache_free(wbuf32_cache, mpcb->mpcb_wbuf);
171 kmem_cache_free(wbuf64_cache, mpcb->mpcb_wbuf);
172 mpcb->mpcb_wbuf = NULL;
173 mpcb->mpcb_wbuf_pa = -1;
184 struct machpcb *mpcb = lwptompcb(clwp);
190 t = mpcb->mpcb_thread;
195 fp = mpcb->mpcb_fpu;
196 wbuf = mpcb->mpcb_wbuf;
197 wstate = mpcb->mpcb_wstate;
203 mpcb->mpcb_thread = t;
204 mpcb->mpcb_fpu = fp;
205 fp->fpu_q = mpcb->mpcb_fpu_q;
213 if (mpcb->mpcb_wstate != wstate) {
225 mpcb->mpcb_pa = va_to_pa(mpcb);
226 mpcb->mpcb_wbuf = wbuf;
227 mpcb->mpcb_wbuf_pa = va_to_pa(wbuf);
229 ASSERT(mpcb->mpcb_wstate == wstate);
231 if (mpcb->mpcb_wbcnt != 0) {
232 bcopy(pmpcb->mpcb_wbuf, mpcb->mpcb_wbuf,
233 mpcb->mpcb_wbcnt * ((mpcb->mpcb_wstate == WSTATE_USER32) ?