Date: Tue, 8 Sep 2020 22:59:43 +0000 (UTC) From: Brandon Bergren <bdragon@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r365481 - in head/sys/powerpc: aim powerpc Message-ID: <202009082259.088MxhIw046311@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bdragon Date: Tue Sep 8 22:59:43 2020 New Revision: 365481 URL: https://svnweb.freebsd.org/changeset/base/365481 Log: [PowerPC64] Hide dssall instruction from llvm assembler When doing a build for a modern CPUTYPE, llvm will throw errors if obsolete instructions are used, even if they will never run due to runtime checks. Hiding the dssall instruction from the assembler fixes kernel build when overriding CPUTYPE, without having any effect on the generated binary. This has been in my local tree for over a year and is well tested across a variety of machines. Sponsored by: Tag1 Consulting, Inc. Modified: head/sys/powerpc/aim/aim_machdep.c head/sys/powerpc/powerpc/cpu.c Modified: head/sys/powerpc/aim/aim_machdep.c ============================================================================== --- head/sys/powerpc/aim/aim_machdep.c Tue Sep 8 22:50:24 2020 (r365480) +++ head/sys/powerpc/aim/aim_machdep.c Tue Sep 8 22:59:43 2020 (r365481) @@ -629,7 +629,8 @@ flush_disable_caches(void) mtspr(SPR_MSSCR0, msscr0); powerpc_sync(); isync(); - __asm__ __volatile__("dssall; sync"); + /* 7e00066c: dssall */ + __asm__ __volatile__(".long 0x7e00066c; sync"); powerpc_sync(); isync(); __asm__ __volatile__("dcbf 0,%0" :: "r"(0)); Modified: head/sys/powerpc/powerpc/cpu.c ============================================================================== --- head/sys/powerpc/powerpc/cpu.c Tue Sep 8 22:50:24 2020 (r365480) +++ head/sys/powerpc/powerpc/cpu.c Tue Sep 8 22:59:43 2020 (r365481) @@ -753,8 +753,9 @@ cpu_idle_60x(sbintime_t sbt) case MPC7450: case MPC7455: case MPC7457: + /* 0x7e00066c: dssall */ __asm __volatile("\ - dssall; sync; mtmsr %0; isync" + .long 0x7e00066c; sync; mtmsr %0; isync" :: "r"(msr | PSL_POW)); break; default:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202009082259.088MxhIw046311>