linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 1/3] powernv: Move IDLE_STATE_ENTER_SEQ macro to cpuidle.h
@ 2016-03-01  5:47 Mahesh J Salgaonkar
  2016-03-01  5:47 ` [PATCH v2 2/3] powernv: Rename pSeries to powenv from machine_check_pSeries_early Mahesh J Salgaonkar
  2016-03-01  5:49 ` [PATCH v2 3/3] powernv: Fix MCE handler to avoid trashing CR0/CR1 registers Mahesh J Salgaonkar
  0 siblings, 2 replies; 7+ messages in thread
From: Mahesh J Salgaonkar @ 2016-03-01  5:47 UTC (permalink / raw)
  To: linuxppc-dev, Benjamin Herrenschmidt, Paul Mackerras,
	Michael Ellerman
  Cc: Shreyas B. Prabhu, Vaidyanathan Srinivasan

From: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>

Move IDLE_STATE_ENTER_SEQ macro to cpuidle.h so that MCE handler changes
in subsequent patch can use it.

No functionality change.

Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
---
 arch/powerpc/include/asm/cpuidle.h |   14 ++++++++++++++
 arch/powerpc/kernel/idle_power7.S  |   12 ------------
 2 files changed, 14 insertions(+), 12 deletions(-)

diff --git a/arch/powerpc/include/asm/cpuidle.h b/arch/powerpc/include/asm/cpuidle.h
index d2f99ca..5894ad6 100644
--- a/arch/powerpc/include/asm/cpuidle.h
+++ b/arch/powerpc/include/asm/cpuidle.h
@@ -17,4 +17,18 @@ extern u32 pnv_fastsleep_workaround_at_exit[];
 
 #endif
 
+/* Idle state entry routines */
+#ifdef	CONFIG_PPC_P7_NAP
+#define	IDLE_STATE_ENTER_SEQ(IDLE_INST)				\
+	/* Magic NAP/SLEEP/WINKLE mode enter sequence */	\
+	std	r0,0(r1);					\
+	ptesync;						\
+	ld	r0,0(r1);					\
+1:	cmp	cr0,r0,r0;					\
+	bne	1b;						\
+	IDLE_INST;						\
+	b	.
+#endif /* CONFIG_PPC_P7_NAP */
+
+
 #endif
diff --git a/arch/powerpc/kernel/idle_power7.S b/arch/powerpc/kernel/idle_power7.S
index cedc4ef..cd43c90 100644
--- a/arch/powerpc/kernel/idle_power7.S
+++ b/arch/powerpc/kernel/idle_power7.S
@@ -37,18 +37,6 @@
 #define _WORT	GPR10
 #define _WORC	GPR11
 
-/* Idle state entry routines */
-
-#define	IDLE_STATE_ENTER_SEQ(IDLE_INST)				\
-	/* Magic NAP/SLEEP/WINKLE mode enter sequence */	\
-	std	r0,0(r1);					\
-	ptesync;						\
-	ld	r0,0(r1);					\
-1:	cmp	cr0,r0,r0;					\
-	bne	1b;						\
-	IDLE_INST;						\
-	b	.
-
 	.text
 
 /*

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

end of thread, other threads:[~2016-08-04  9:59 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-01  5:47 [PATCH v2 1/3] powernv: Move IDLE_STATE_ENTER_SEQ macro to cpuidle.h Mahesh J Salgaonkar
2016-03-01  5:47 ` [PATCH v2 2/3] powernv: Rename pSeries to powenv from machine_check_pSeries_early Mahesh J Salgaonkar
2016-05-10 21:48   ` [v2, " Michael Ellerman
2016-03-01  5:49 ` [PATCH v2 3/3] powernv: Fix MCE handler to avoid trashing CR0/CR1 registers Mahesh J Salgaonkar
2016-08-04  4:14   ` Stewart Smith
2016-08-04  8:57     ` Mahesh Jagannath Salgaonkar
2016-08-04  9:59       ` 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).