[PATCH 1/2] powerpc/64: drop redundant defination of spin_until_cond

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

STALE1938d LANDED

Landed in mainline as db8f7066dc49 on 2021-06-16.

4 messages, 3 authors, 2021-06-18 · open the first message on its own page

[PATCH 1/2] powerpc/64: drop redundant defination of spin_until_cond

From: Christophe Leroy <hidden>
Date: 2021-06-11 19:11:02

From: Sudeep Holla <redacted>

linux/processor.h has exactly same defination for spin_until_cond.
Drop the redundant defination in asm/processor.h

Cc: Nicholas Piggin <npiggin@gmail.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Sudeep Holla <redacted>
Signed-off-by: Christophe Leroy <redacted>
---
 That's just a rebase

 arch/powerpc/include/asm/processor.h | 11 -----------
 1 file changed, 11 deletions(-)
diff --git a/arch/powerpc/include/asm/processor.h b/arch/powerpc/include/asm/processor.h
index 7bf8a15af224..0819854eeab9 100644
--- a/arch/powerpc/include/asm/processor.h
+++ b/arch/powerpc/include/asm/processor.h
@@ -339,17 +339,6 @@ static inline unsigned long __pack_fe01(unsigned int fpmode)
 
 #define spin_end()	HMT_medium()
 
-#define spin_until_cond(cond)					\
-do {								\
-	if (unlikely(!(cond))) {				\
-		spin_begin();					\
-		do {						\
-			spin_cpu_relax();			\
-		} while (!(cond));				\
-		spin_end();					\
-	}							\
-} while (0)
-
 #endif
 
 /* Check that a certain kernel stack pointer is valid in task_struct p */
-- 
2.25.0

[PATCH 2/2] powerpc/watchdog: include linux/processor.h for spin_until_cond

From: Christophe Leroy <hidden>
Date: 2021-06-11 19:11:10

From: Sudeep Holla <redacted>

This implementation uses spin_until_cond in wd_smp_lock including
neither linux/processor.h nor asm/processor.h

This patch includes linux/processor.h here for spin_until_cond usage.

Cc: Nicholas Piggin <npiggin@gmail.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Sudeep Holla <redacted>
Signed-off-by: Christophe Leroy <redacted>
---
 arch/powerpc/kernel/watchdog.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/arch/powerpc/kernel/watchdog.c b/arch/powerpc/kernel/watchdog.c
index c9a8f4781a10..a165635fd214 100644
--- a/arch/powerpc/kernel/watchdog.c
+++ b/arch/powerpc/kernel/watchdog.c
@@ -24,6 +24,7 @@
 #include <linux/kdebug.h>
 #include <linux/sched/debug.h>
 #include <linux/delay.h>
+#include <linux/processor.h>
 #include <linux/smp.h>
 
 #include <asm/interrupt.h>
-- 
2.25.0

Re: [PATCH 1/2] powerpc/64: drop redundant defination of spin_until_cond

From: Sudeep Holla <hidden>
Date: 2021-06-11 19:54:47

On Fri, Jun 11, 2021 at 07:10:57PM +0000, Christophe Leroy wrote:
From: Sudeep Holla <redacted>

linux/processor.h has exactly same defination for spin_until_cond.
Drop the redundant defination in asm/processor.h
Wow you must be real good at ML archaeology, this must have been at-least
3+ years old. I found this when I wanted to you spin_until_cond. Thanks
anyways for digging the original patch, nobody would have remembered even
if you posted fresh 😉.

-- 
Regards,
Sudeep

Re: [PATCH 1/2] powerpc/64: drop redundant defination of spin_until_cond

From: Michael Ellerman <hidden>
Date: 2021-06-18 04:22:50

On Fri, 11 Jun 2021 19:10:57 +0000 (UTC), Christophe Leroy wrote:
linux/processor.h has exactly same defination for spin_until_cond.
Drop the redundant defination in asm/processor.h
Applied to powerpc/next.

[1/2] powerpc/64: drop redundant defination of spin_until_cond
      https://git.kernel.org/powerpc/c/db8f7066dc498acf9074ed3c11a7a24f318d8d4f
[2/2] powerpc/watchdog: include linux/processor.h for spin_until_cond
      https://git.kernel.org/powerpc/c/2400c13c437debc99d3399a7100d4e8c3fe20a08

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