diff options
author | Timur Tabi <timur@freescale.com> | 2011-08-05 16:15:24 -0500 |
---|---|---|
committer | Kumar Gala <galak@kernel.crashing.org> | 2011-09-29 19:01:05 -0500 |
commit | fbb9ecf7493fbd6b8c8af7d52e90c915459f7040 (patch) | |
tree | b19bce4d9c77be58fc1aba43bd73625222c99f8f /common | |
parent | 86df5142a14868ea0e24511f4293d43a611a2b39 (diff) | |
download | u-boot-fbb9ecf7493fbd6b8c8af7d52e90c915459f7040.tar.gz u-boot-fbb9ecf7493fbd6b8c8af7d52e90c915459f7040.tar.xz u-boot-fbb9ecf7493fbd6b8c8af7d52e90c915459f7040.zip |
powerpc/mp: add support for discontiguous cores
Some SOCs have discontiguously-numbered cores, and so we can't determine the
valid core numbers via the FRR register any more. We define
CPU_TYPE_ENTRY_MASK to specify a discontiguous core mask, and helper functions
to process the mask and enumerate over the set of valid cores.
Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'common')
-rw-r--r-- | common/cmd_mp.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/common/cmd_mp.c b/common/cmd_mp.c index f19bf41f8e..b115b59136 100644 --- a/common/cmd_mp.c +++ b/common/cmd_mp.c @@ -32,9 +32,8 @@ cpu_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) return cmd_usage(cmdtp); cpuid = simple_strtoul(argv[1], NULL, 10); - if (cpuid >= cpu_numcores()) { - printf ("Core num: %lu is out of range[0..%d]\n", - cpuid, cpu_numcores() - 1); + if (!is_core_valid(cpuid)) { + printf ("Core num: %lu is not valid\n", cpuid); return 1; } |