summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include
diff options
context:
space:
mode:
authorTimur Tabi <timur@freescale.com>2011-08-05 16:15:24 -0500
committerKumar Gala <galak@kernel.crashing.org>2011-09-29 19:01:05 -0500
commitfbb9ecf7493fbd6b8c8af7d52e90c915459f7040 (patch)
treeb19bce4d9c77be58fc1aba43bd73625222c99f8f /arch/powerpc/include
parent86df5142a14868ea0e24511f4293d43a611a2b39 (diff)
downloadtalos-obmc-uboot-fbb9ecf7493fbd6b8c8af7d52e90c915459f7040.tar.gz
talos-obmc-uboot-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 'arch/powerpc/include')
-rw-r--r--arch/powerpc/include/asm/processor.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/powerpc/include/asm/processor.h b/arch/powerpc/include/asm/processor.h
index 0c4cc2554b..50af6e7fc2 100644
--- a/arch/powerpc/include/asm/processor.h
+++ b/arch/powerpc/include/asm/processor.h
@@ -1176,13 +1176,17 @@ struct cpu_type {
char name[15];
u32 soc_ver;
u32 num_cores;
+ u32 mask; /* which cpu(s) actually exist */
};
struct cpu_type *identify_cpu(u32 ver);
#if defined(CONFIG_MPC85xx) || defined(CONFIG_MPC86xx)
#define CPU_TYPE_ENTRY(n, v, nc) \
- { .name = #n, .soc_ver = SVR_##v, .num_cores = (nc), }
+ { .name = #n, .soc_ver = SVR_##v, .num_cores = (nc), \
+ .mask = (1 << (nc)) - 1 }
+#define CPU_TYPE_ENTRY_MASK(n, v, nc, m) \
+ { .name = #n, .soc_ver = SVR_##v, .num_cores = (nc), .mask = (m) }
#else
#if defined(CONFIG_MPC83xx)
#define CPU_TYPE_ENTRY(x) {#x, SPR_##x}
OpenPOWER on IntegriCloud