[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.
This commit is contained in:
Brandon Bergren 2020-09-08 22:59:43 +00:00
parent d20ae9cca2
commit 95090cd024
2 changed files with 4 additions and 2 deletions

View File

@ -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));

View File

@ -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: