summaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
authorAmitay Isaacs <amitay@ozlabs.org>2018-08-09 15:19:25 +1000
committerAlistair Popple <alistair@popple.id.au>2018-08-13 15:38:14 +1000
commit9647c622130cb22c89469442e76afbde7388edf3 (patch)
treedd3c13239c211d0accdea878c5fbc43363c24a31 /src/main.c
parent467bab53eab61517f95cf05ce0e44da0ce4c558a (diff)
downloadpdbg-9647c622130cb22c89469442e76afbde7388edf3.tar.gz
pdbg-9647c622130cb22c89469442e76afbde7388edf3.zip
main: Fix target selection of linux cpus
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> Reviewed-by: Alistair Popple <alistair@popple.id.au>
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c16
1 files 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;
}
OpenPOWER on IntegriCloud