The branch main has been updated by jhibbits: URL: https://cgit.FreeBSD.org/src/commit/?id=6a762cfae145625e491528531709145c76228870
commit 6a762cfae145625e491528531709145c76228870 Author: Justin Hibbits <[email protected]> AuthorDate: 2021-03-28 00:24:59 +0000 Commit: Justin Hibbits <[email protected]> CommitDate: 2021-03-28 00:24:59 +0000 powerpc: Fix powerpcspe WRT FPSCR Summary: Since powerpcspe doesn't have a traditional FPU, there's no FPSCR, and no FPRs. Attempting to use them triggers an illegal instruction trap. Fix this unconditional cleanup of FPSCR by conditionalizing it on the FPU being used in the outgoing thread. Reviewed By: bdragon Differential Revision: https://reviews.freebsd.org/D29452 --- sys/powerpc/powerpc/exec_machdep.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/powerpc/powerpc/exec_machdep.c b/sys/powerpc/powerpc/exec_machdep.c index 91cc9a98f7a7..97e4caba956a 100644 --- a/sys/powerpc/powerpc/exec_machdep.c +++ b/sys/powerpc/powerpc/exec_machdep.c @@ -566,7 +566,8 @@ cleanup_power_extras(struct thread *td) if (pcb_flags & PCB_CDSCR) mtspr(SPR_DSCRP, 0); - cleanup_fpscr(); + if (pcb_flags & PCB_FPU) + cleanup_fpscr(); } /* _______________________________________________ [email protected] mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "[email protected]"
