Author: jhibbits Date: Sun Apr 8 16:46:24 2018 New Revision: 332287 URL: https://svnweb.freebsd.org/changeset/base/332287
Log: powerpc64: Avoid calling isync twice Summary: It is not necessary to call isync() after calling mtmsr() function, mainly because the mtmsr() calls 'isync' internally to synchronize the machine state register. Other than that, isync() just calls the 'isync' instruction, thus, the 'isync' instruction is being called twice, and that seems to be unnecessary. This patch just remove the unecessary calls to isync() after mtmsr(). Submitted by: Breno Leitao Differential Revision: https://reviews.freebsd.org/D14583 Modified: head/sys/powerpc/powerpc/altivec.c head/sys/powerpc/powerpc/cpu.c head/sys/powerpc/powerpc/fpu.c Modified: head/sys/powerpc/powerpc/altivec.c ============================================================================== --- head/sys/powerpc/powerpc/altivec.c Sun Apr 8 16:43:56 2018 (r332286) +++ head/sys/powerpc/powerpc/altivec.c Sun Apr 8 16:46:24 2018 (r332287) @@ -58,7 +58,6 @@ save_vec_int(struct thread *td) */ msr = mfmsr(); mtmsr(msr | PSL_VEC); - isync(); /* * Save the vector registers and VSCR to the PCB @@ -120,7 +119,6 @@ enable_vec(struct thread *td) */ msr = mfmsr(); mtmsr(msr | PSL_VEC); - isync(); /* * Restore VSCR by first loading it into a vector and then into VSCR. Modified: head/sys/powerpc/powerpc/cpu.c ============================================================================== --- head/sys/powerpc/powerpc/cpu.c Sun Apr 8 16:43:56 2018 (r332286) +++ head/sys/powerpc/powerpc/cpu.c Sun Apr 8 16:46:24 2018 (r332287) @@ -710,7 +710,6 @@ cpu_idle_60x(sbintime_t sbt) default: powerpc_sync(); mtmsr(msr | PSL_POW); - isync(); break; } #endif @@ -739,7 +738,6 @@ cpu_idle_booke(sbintime_t sbt) default: powerpc_sync(); mtmsr(msr | PSL_WE); - isync(); break; } #endif Modified: head/sys/powerpc/powerpc/fpu.c ============================================================================== --- head/sys/powerpc/powerpc/fpu.c Sun Apr 8 16:43:56 2018 (r332286) +++ head/sys/powerpc/powerpc/fpu.c Sun Apr 8 16:46:24 2018 (r332287) @@ -87,7 +87,6 @@ enable_fpu(struct thread *td) mtmsr(msr | PSL_FP | PSL_VSX); else mtmsr(msr | PSL_FP); - isync(); /* * Load the floating point registers and FPSCR from the PCB. @@ -143,7 +142,6 @@ save_fpu(struct thread *td) mtmsr(msr | PSL_FP | PSL_VSX); else mtmsr(msr | PSL_FP); - isync(); /* * Save the floating-point registers and FPSCR to the PCB _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"