[PATCH] powerpc/32s: Fix LLVM SMP build

Subsystems: linux for powerpc (32-bit and 64-bit), the rest

STALE1124d

2 messages, 2 authors, 2023-07-03 · open the first message on its own page

[PATCH] powerpc/32s: Fix LLVM SMP build

From: Nicholas Piggin <npiggin@gmail.com>
Date: 2023-06-06 13:19:27

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

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
---
 arch/powerpc/mm/book3s32/hash_low.S | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/powerpc/mm/book3s32/hash_low.S b/arch/powerpc/mm/book3s32/hash_low.S
index 6925ce998557..a5a21d444e72 100644
--- a/arch/powerpc/mm/book3s32/hash_low.S
+++ b/arch/powerpc/mm/book3s32/hash_low.S
@@ -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
-- 
2.40.1

Re: [PATCH] powerpc/32s: Fix LLVM SMP build

From: Michael Ellerman <hidden>
Date: 2023-07-03 05:54:02

On Tue, 06 Jun 2023 23:18:28 +1000, Nicholas Piggin wrote:
LLVM assembler does not recognise 3-operand cmpi, use cmpwi.
Applied to powerpc/next.

[1/1] powerpc/32s: Fix LLVM SMP build
      https://git.kernel.org/powerpc/c/31b4f69dbae810b13237a7e8c89a52a72fd492e2

cheers
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help