[Skiboot] [PATCH 14/18] direct-controls: change p8_sreset_all_others sequence

Nicholas Piggin npiggin at gmail.com
Sun Nov 19 20:15:04 AEDT 2017


Change the p8_sreset_all_others sequence from prenap all then sreset
all, to prenap,sreset all. This makes it more suitable to fit the
direct controls APIs, which do 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 79fa3b5a..046c5190 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