linuxppc-dev.lists.ozlabs.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; 5+ messages in thread
From: Christophe Leroy @ 2021-06-11 19:10 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman
  Cc: linuxppc-dev, linux-kernel, 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] 5+ messages in thread
* [RFC PATCH 1/2] powerpc/64: drop redundant defination of spin_until_cond
@ 2018-02-19 15:45 Sudeep Holla
  2018-02-19 15:45 ` [PATCH 2/2] powerpc/watchdog: include linux/processor.h for spin_until_cond Sudeep Holla
  0 siblings, 1 reply; 5+ messages in thread
From: Sudeep Holla @ 2018-02-19 15:45 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Sudeep Holla, Nicholas Piggin, Michael Ellerman

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>
---
 arch/powerpc/include/asm/processor.h | 11 -----------
 1 file changed, 11 deletions(-)

Hi,

When I was planning to use spin_until_cond, I came across the same defination
at 2 different headers, one of which includes the other and takes care of
enabling the defination in case of undefinded condition.

I found it redundant, but I may be wrong.

Regards,
Sudeep

diff --git a/arch/powerpc/include/asm/processor.h b/arch/powerpc/include/asm/processor.h
index 01299cdc9806..4816be3be02c 100644
--- a/arch/powerpc/include/asm/processor.h
+++ b/arch/powerpc/include/asm/processor.h
@@ -438,17 +438,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)
-
 #else
 #define cpu_relax()	barrier()
 #endif
--
2.7.4

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

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

Thread overview: 5+ 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
  -- strict thread matches above, loose matches on Subject: below --
2018-02-19 15:45 [RFC PATCH " Sudeep Holla
2018-02-19 15:45 ` [PATCH 2/2] powerpc/watchdog: include linux/processor.h for spin_until_cond Sudeep Holla

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).