diff --git a/sys/powerpc/powerpc/exec_machdep.c b/sys/powerpc/powerpc/exec_machdep.c --- a/sys/powerpc/powerpc/exec_machdep.c +++ b/sys/powerpc/powerpc/exec_machdep.c @@ -528,8 +528,8 @@ * Additionally, ensure VSX is disabled as well, as it is illegal * to leave it turned on when FP or VEC are off. */ - tf->srr1 &= ~(PSL_FP | PSL_VSX); - pcb->pcb_flags &= ~(PCB_FPU | PCB_VSX); + tf->srr1 &= ~(PSL_FP | PSL_VSX | PSL_VEC); + pcb->pcb_flags &= ~(PCB_FPU | PCB_VSX | PCB_VEC); if (mcp->mc_flags & _MC_FP_VALID) { /* enable_fpu() will happen lazily on a fault */ @@ -550,9 +550,6 @@ pcb->pcb_vec.vscr = mcp->mc_vscr; pcb->pcb_vec.vrsave = mcp->mc_vrsave; memcpy(pcb->pcb_vec.vr, mcp->mc_avec, sizeof(mcp->mc_avec)); - } else { - tf->srr1 &= ~PSL_VEC; - pcb->pcb_flags &= ~PCB_VEC; } return (0);