All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 1/2] powernv: Move IDLE_STATE_ENTER_SEQ macro to cpuidle.h
@ 2016-08-05 12:04 Mahesh J Salgaonkar
  2016-08-05 12:04 ` [PATCH v3 2/2] powernv: Fix MCE handler to avoid trashing CR0/CR1 registers Mahesh J Salgaonkar
  2016-08-09 11:26 ` [v3,1/2] powernv: Move IDLE_STATE_ENTER_SEQ macro to cpuidle.h Michael Ellerman
  0 siblings, 2 replies; 5+ messages in thread
From: Mahesh J Salgaonkar @ 2016-08-05 12:04 UTC (permalink / raw)
  To: linuxppc-dev, Benjamin Herrenschmidt, Paul Mackerras,
	Michael Ellerman
  Cc: Stewart Smith, 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>
---
Change in v3:
- Rebase to Linus' master.
---
 arch/powerpc/include/asm/cpuidle.h |   13 +++++++++++++
 arch/powerpc/kernel/idle_book3s.S  |   12 ------------
 2 files changed, 13 insertions(+), 12 deletions(-)

diff --git a/arch/powerpc/include/asm/cpuidle.h b/arch/powerpc/include/asm/cpuidle.h
index 3d7fc06..01b8a13 100644
--- a/arch/powerpc/include/asm/cpuidle.h
+++ b/arch/powerpc/include/asm/cpuidle.h
@@ -19,4 +19,17 @@ extern u64 pnv_first_deep_stop_state;
 
 #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_book3s.S b/arch/powerpc/kernel/idle_book3s.S
index 8a56a51..7a41f13 100644
--- a/arch/powerpc/kernel/idle_book3s.S
+++ b/arch/powerpc/kernel/idle_book3s.S
@@ -44,18 +44,6 @@
 				PSSCR_PSLL_MASK | PSSCR_TR_MASK | \
 				PSSCR_MTL_MASK
 
-/* 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] 5+ messages in thread

end of thread, other threads:[~2016-08-09 11:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-05 12:04 [PATCH v3 1/2] powernv: Move IDLE_STATE_ENTER_SEQ macro to cpuidle.h Mahesh J Salgaonkar
2016-08-05 12:04 ` [PATCH v3 2/2] powernv: Fix MCE handler to avoid trashing CR0/CR1 registers Mahesh J Salgaonkar
2016-08-05 22:39   ` Benjamin Herrenschmidt
2016-08-09 11:26   ` [v3, " Michael Ellerman
2016-08-09 11:26 ` [v3,1/2] powernv: Move IDLE_STATE_ENTER_SEQ macro to cpuidle.h Michael Ellerman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.