linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [RESEND][PATCH 1/2] powerpc/64: drop redundant defination of spin_until_cond
@ 2018-02-26 12:16 Sudeep Holla
  2018-02-26 12:16 ` [RESEND][PATCH 2/2] powerpc/watchdog: include linux/processor.h for spin_until_cond Sudeep Holla
  0 siblings, 1 reply; 2+ messages in thread
From: Sudeep Holla @ 2018-02-26 12:16 UTC (permalink / raw)
  To: linuxppc-dev, Michael Ellerman, Nicholas Piggin; +Cc: Sudeep Holla

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,
(Resending as I got some errors from the mail server today)

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] 2+ messages in thread

* [RESEND][PATCH 2/2] powerpc/watchdog: include linux/processor.h for spin_until_cond
  2018-02-26 12:16 [RESEND][PATCH 1/2] powerpc/64: drop redundant defination of spin_until_cond Sudeep Holla
@ 2018-02-26 12:16 ` Sudeep Holla
  0 siblings, 0 replies; 2+ messages in thread
From: Sudeep Holla @ 2018-02-26 12:16 UTC (permalink / raw)
  To: linuxppc-dev, Michael Ellerman, Nicholas Piggin; +Cc: Sudeep Holla

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>
---
 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 6256dc3b0087..f4359fde99f3 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/paca.h>
-- 
2.7.4

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

end of thread, other threads:[~2018-02-26 12:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-26 12:16 [RESEND][PATCH 1/2] powerpc/64: drop redundant defination of spin_until_cond Sudeep Holla
2018-02-26 12:16 ` [RESEND][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).