diff mbox series

[3/5] main: Fix target selection of linux cpus

Message ID 20180809051927.243483-4-amitay@ozlabs.org
State Accepted
Headers show
Series Fix target selection (yet again) | expand

Checks

Context Check Description
snowpatch_ozlabs/apply_patch success master/apply_patch Successfully applied
snowpatch_ozlabs/build-multiarch success Test build-multiarch on branch master

Commit Message

Amitay Isaacs Aug. 9, 2018, 5:19 a.m. UTC
The selection should be applied to all the linux cpus in the list and
not just the first one.

Signed-off-by: Amitay Isaacs <amitay@ozlabs.org>
---
 src/main.c | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)
diff mbox series

Patch

diff --git a/src/main.c b/src/main.c
index cfb01a8..d7c8589 100644
--- a/src/main.c
+++ b/src/main.c
@@ -496,18 +496,16 @@  static bool parse_options(int argc, char *argv[])
 				pir = get_pir(i);
 				if (pir < 0)
 					return true;
-				break;
-			}
-		}
-		if (pir < 0)
-			return true;
 
-		pir_map(pir, &chip, &core, &thread);
+				pir_map(pir, &chip, &core, &thread);
 
-		threadsel[chip][core][thread] = 1;
-		chipsel[chip][core] = &threadsel[chip][core][thread];
-		processorsel[chip] = &chipsel[chip][core];
+				processorsel[chip] = &chipsel[chip][0];
+				chipsel[chip][core] = &threadsel[chip][core][0];
+				threadsel[chip][core][thread] = 1;
+			}
+		}
 	}
+
 	return true;
 }