Skip to contentSkip to conversation

powerpc/32s: Fix LLVM SMP build

PATCH Applied Nicholas Piggin 2 participants 2 messages Jun 6, 2023 – Jul 3, 2023 PowerPC

lore
Share & tools
lore

Nicholas Piggin

author reviewer
#0 lore raw

PATCH 1/1 powerpc/32s: Fix LLVM SMP build

LLVM assembler does not recognise 3-operand cmpi, use cmpwi.

---
 arch/powerpc/mm/book3s32/hash_low.S | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
arch/powerpc/mm/book3s32/hash_low.S +4 -4
index 6925ce998557..a5a21d444e72 100644
@@ -199,12 +199,12 @@ _GLOBAL(add_hash_page)
 	lis	r6, (mmu_hash_lock - PAGE_OFFSET)@ha
 	addi	r6, r6, (mmu_hash_lock - PAGE_OFFSET)@l
 10:	lwarx	r0,0,r6			/* take the mmu_hash_lock */
-	cmpi	0,r0,0
+	cmpwi	0,r0,0
 	bne-	11f
 	stwcx.	r8,0,r6
 	beq+	12f
 11:	lwz	r0,0(r6)
-	cmpi	0,r0,0
+	cmpwi	0,r0,0
 	beq	10b
 	b	11b
 12:	isync
@@ -512,12 +512,12 @@ _GLOBAL(flush_hash_pages)
 	lwz	r8, TASK_CPU(r8)
 	oris	r8,r8,9
 10:	lwarx	r0,0,r9
-	cmpi	0,r0,0
+	cmpwi	0,r0,0
 	bne-	11f
 	stwcx.	r8,0,r9
 	beq+	12f
 11:	lwz	r0,0(r9)
-	cmpi	0,r0,0
+	cmpwi	0,r0,0
 	beq	10b
 	b	11b
 12:	isync
Signature · 1 line
2.40.1