Date: Sun, 28 Mar 2021 00:25:15 GMT From: Justin Hibbits <jhibbits@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 6a762cfae145 - main - powerpc: Fix powerpcspe WRT FPSCR Message-ID: <202103280025.12S0PFBs093161@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by jhibbits: URL: https://cgit.FreeBSD.org/src/commit/?id=6a762cfae145625e491528531709145c76228870 commit 6a762cfae145625e491528531709145c76228870 Author: Justin Hibbits <jhibbits@FreeBSD.org> AuthorDate: 2021-03-28 00:24:59 +0000 Commit: Justin Hibbits <jhibbits@FreeBSD.org> 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(); } /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202103280025.12S0PFBs093161>