Port-hppa archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Patch: hppa lazy FPU switching and QEMU bugs



On Mon, Aug 17, 2026 at 06:27:43PM +0100, Nick Hudson wrote:
> 
> It doesn't quite work - I saw an unexpected core dump and fp exception. Will investigate more later...

From a user process, or of the kernel itself?  I think I might see why,
if it was a _kernel_ core dump - try changing the probe like this:

        mfctl(CR_CCR, ccr);
        if (!(ccr & HPPA_FPUS)) {
            fpu_eager = 1;
            /* No trap, so no trap handler, so re-enable FPU ourselves. */
            mtctl(HPPA_FPUS, CR_CCR);
            aprint_normal("fpu: emulation trap failure; "
                "using eager switching\n");
        } else {
            /*
	     * This probe is the only thing that ever traps from lwp0,
	     * and we're not really set up for that to work right.
	     * Fortunately, we know what state we should put back.
             */
            curcpu()->ci_fpu_state = 0;
            mtctl(ccr_enable & (CCR_MASK ^ HPPA_FPUS), CR_CCR);
        }



Home | Main Index | Thread Index | Old Index