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

Amitay Isaacs amitay at ozlabs.org
Thu Aug 9 15:19:25 AEST 2018


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 at ozlabs.org>
---
 src/main.c | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

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;
 }
 
-- 
2.17.1



More information about the Pdbg mailing list