mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-08 10:39:08 +00:00
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>
This commit is contained in:
parent
86df5142a1
commit
fbb9ecf749
8 changed files with 78 additions and 29 deletions
|
@ -485,7 +485,22 @@ void ddr_enable_ecc(unsigned int dram_size);
|
|||
#endif
|
||||
|
||||
/* $(CPU)/cpu.c */
|
||||
static inline int cpumask_next(int cpu, unsigned int mask)
|
||||
{
|
||||
for (cpu++; !((1 << cpu) & mask); cpu++)
|
||||
;
|
||||
|
||||
return cpu;
|
||||
}
|
||||
|
||||
#define for_each_cpu(iter, cpu, num_cpus, mask) \
|
||||
for (iter = 0, cpu = cpumask_next(-1, mask); \
|
||||
iter < num_cpus; \
|
||||
iter++, cpu = cpumask_next(cpu, mask)) \
|
||||
|
||||
int cpu_numcores (void);
|
||||
u32 cpu_mask (void);
|
||||
int is_core_valid (unsigned int);
|
||||
int probecpu (void);
|
||||
int checkcpu (void);
|
||||
int checkicache (void);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue