linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] powerpc/64: drop redundant defination of spin_until_cond
@ 2021-06-11 19:10 Christophe Leroy
  2021-06-11 19:10 ` [PATCH 2/2] powerpc/watchdog: include linux/processor.h for spin_until_cond Christophe Leroy
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Christophe Leroy @ 2021-06-11 19:10 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman
  Cc: linux-kernel, linuxppc-dev, Sudeep Holla

From: Sudeep Holla <sudeep.holla@arm.com>

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 <sudeep.holla@arm.com>
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
---
 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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] powerpc/watchdog: include linux/processor.h for spin_until_cond
  2021-06-11 19:10 [PATCH 1/2] powerpc/64: drop redundant defination of spin_until_cond Christophe Leroy
@ 2021-06-11 19:10 ` Christophe Leroy
  2021-06-11 19:54 ` [PATCH 1/2] powerpc/64: drop redundant defination of spin_until_cond Sudeep Holla
  2021-06-18  3:51 ` Michael Ellerman
  2 siblings, 0 replies; 4+ messages in thread
From: Christophe Leroy @ 2021-06-11 19:10 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman
  Cc: linux-kernel, linuxppc-dev, Sudeep Holla

From: Sudeep Holla <sudeep.holla@arm.com>

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 <sudeep.holla@arm.com>
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
---
 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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] powerpc/64: drop redundant defination of spin_until_cond
  2021-06-11 19:10 [PATCH 1/2] powerpc/64: drop redundant defination of spin_until_cond Christophe Leroy
  2021-06-11 19:10 ` [PATCH 2/2] powerpc/watchdog: include linux/processor.h for spin_until_cond Christophe Leroy
@ 2021-06-11 19:54 ` Sudeep Holla
  2021-06-18  3:51 ` Michael Ellerman
  2 siblings, 0 replies; 4+ messages in thread
From: Sudeep Holla @ 2021-06-11 19:54 UTC (permalink / raw)
  To: Christophe Leroy
  Cc: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
	linux-kernel, linuxppc-dev

On Fri, Jun 11, 2021 at 07:10:57PM +0000, Christophe Leroy wrote:
> From: Sudeep Holla <sudeep.holla@arm.com>
> 
> 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] powerpc/64: drop redundant defination of spin_until_cond
  2021-06-11 19:10 [PATCH 1/2] powerpc/64: drop redundant defination of spin_until_cond Christophe Leroy
  2021-06-11 19:10 ` [PATCH 2/2] powerpc/watchdog: include linux/processor.h for spin_until_cond Christophe Leroy
  2021-06-11 19:54 ` [PATCH 1/2] powerpc/64: drop redundant defination of spin_until_cond Sudeep Holla
@ 2021-06-18  3:51 ` Michael Ellerman
  2 siblings, 0 replies; 4+ messages in thread
From: Michael Ellerman @ 2021-06-18  3:51 UTC (permalink / raw)
  To: Paul Mackerras, Michael Ellerman, Benjamin Herrenschmidt,
	Christophe Leroy
  Cc: Sudeep Holla, linuxppc-dev, linux-kernel

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-06-18  4:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-11 19:10 [PATCH 1/2] powerpc/64: drop redundant defination of spin_until_cond Christophe Leroy
2021-06-11 19:10 ` [PATCH 2/2] powerpc/watchdog: include linux/processor.h for spin_until_cond Christophe Leroy
2021-06-11 19:54 ` [PATCH 1/2] powerpc/64: drop redundant defination of spin_until_cond Sudeep Holla
2021-06-18  3:51 ` Michael Ellerman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).