[Skiboot] [PATCH 1/2] core: Fix iteration condition to skip garded cpu
Vaidyanathan Srinivasan
svaidy at linux.vnet.ibm.com
Thu Apr 19 01:36:45 AEST 2018
Fix the logic error in the loop that iterated incorrectly
over garded cpu.
Signed-off-by: Vaidyanathan Srinivasan <svaidy at linux.vnet.ibm.com>
---
core/cpu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/core/cpu.c b/core/cpu.c
index 6826fee0..369eb5b9 100644
--- a/core/cpu.c
+++ b/core/cpu.c
@@ -734,7 +734,7 @@ struct cpu_thread *next_ungarded_primary(struct cpu_thread *cpu)
{
do {
cpu = next_cpu(cpu);
- } while(cpu && cpu->state == cpu_state_unavailable && cpu->primary != cpu);
+ } while(cpu && (cpu->state == cpu_state_unavailable || cpu->primary != cpu));
return cpu;
}
--
2.14.3
More information about the Skiboot
mailing list