[Skiboot] [PATCH 18/34] slw: Move SPR setup calls away from assembly
Benjamin Herrenschmidt
benh at kernel.crashing.org
Sun Jul 24 09:27:12 AEST 2016
Move them to the C code so that rvwinkle_restore() is more generic
and suitable for use for nap mode wakeup as well
Signed-off-by: Benjamin Herrenschmidt <benh at kernel.crashing.org>
---
asm/head.S | 9 ---------
hw/slw.c | 4 ++++
2 files changed, 4 insertions(+), 9 deletions(-)
diff --git a/asm/head.S b/asm/head.S
index 45976a0..6f4b2b5 100644
--- a/asm/head.S
+++ b/asm/head.S
@@ -623,15 +623,6 @@ rvwinkle_restore:
/* Get PIR */
mfspr %r31,SPR_PIR
- /* Initialize per-core SPRs
- *
- * XXX We do it on each thread ... oh well, improve that later
- */
- bl init_shared_sprs
-
- /* Initialize thread SPRs */
- bl init_replicated_sprs
-
/* Get that CPU stack base and use it to restore r13 */
GET_STACK(%r1,%r31)
GET_CPU()
diff --git a/hw/slw.c b/hw/slw.c
index 9336679..aeb4ff1 100644
--- a/hw/slw.c
+++ b/hw/slw.c
@@ -87,6 +87,10 @@ static void slw_do_rvwinkle(void *data)
enter_pm_state(1);
+ /* Restore SPRs */
+ init_shared_sprs();
+ init_replicated_sprs();
+
/* Ok, it's ours again */
cpu->state = cpu_state_active;
--
2.7.4
More information about the Skiboot
mailing list