OSDN Git Service

powerpc/nohash: Fix build with llvm-as
authorMichael Ellerman <mpe@ellerman.id.au>
Thu, 16 Feb 2023 11:29:15 +0000 (22:29 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 16 Feb 2023 12:53:15 +0000 (23:53 +1100)
When using the LLVM integrated assembler (llvm-as), the book3e build
fails with:

  arch/powerpc/mm/nohash/tlb_low_64e.S:354:2: error: invalid instruction
   tlbilxva 0,%r15
   ^

tlbilxva is an extended mnemonic for tlbilx, but llvm-as also doesn't
support tlbilx, despite it being an e500mc instruction.

Fix it by using the existing PPC_TLBILX_VA macro. The resulting binary
is identical when building with binutils.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20230216112915.1681631-1-mpe@ellerman.id.au
arch/powerpc/mm/nohash/tlb_low_64e.S

index 76cf456..7e0b8fe 100644 (file)
@@ -351,7 +351,7 @@ END_FTR_SECTION_NESTED(CPU_FTR_EMB_HV,CPU_FTR_EMB_HV,532)
 
        mfspr   r15,SPRN_MAS2
        isync
-       tlbilxva 0,r15
+       PPC_TLBILX_VA(0,R15)
        isync
 
        mtspr   SPRN_MAS6,r10