[Skiboot] [PATCH v3 15/29] direct-controls: change p8_sreset_all_others sequence

Nicholas Piggin npiggin at gmail.com
Wed Nov 29 16:36:53 AEDT 2017


Change the p8_sreset_all_others sequence from prenap all, sreset
all; to prenap, sreset all. This makes it more suitable to fit the
direct controls APIs, which does not expose "prenap".

Signed-off-by: Nicholas Piggin <npiggin at gmail.com>
---
 core/direct-controls.c | 15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)

diff --git a/core/direct-controls.c b/core/direct-controls.c
index 2f3c18def..658729fc4 100644
--- a/core/direct-controls.c
+++ b/core/direct-controls.c
@@ -251,20 +251,15 @@ static void p8_sreset_all_others(void)
 {
 	struct cpu_thread *cpu;
 
-	prlog(PR_DEBUG, "RESET: Pre-napping all threads but one...\n");
-
-	/* Put everybody in pre-nap except myself */
-	for_each_ungarded_cpu(cpu) {
-		if (cpu != this_cpu())
-			p8_set_direct_ctl(cpu, P8_DIRECT_CTL_PRENAP);
-	}
-
 	prlog(PR_DEBUG, "RESET: Resetting all threads but one...\n");
 
 	/* Reset everybody except my own core threads */
 	for_each_ungarded_cpu(cpu) {
-		if (cpu != this_cpu())
-			p8_set_direct_ctl(cpu, P8_DIRECT_CTL_SRESET);
+		if (cpu == this_cpu())
+			continue;
+
+		p8_set_direct_ctl(cpu, P8_DIRECT_CTL_PRENAP);
+		p8_set_direct_ctl(cpu, P8_DIRECT_CTL_SRESET);
 	}
 }
 
-- 
2.15.0



More information about the Skiboot mailing list