1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * (C) Copyright 2000-2009
5 * Copyright 2019 Google LLC
11 #include <linux/types.h>
14 * Multicore arch functions
16 * These should be moved to use the CPU uclass.
18 int cpu_status(u32 nr);
19 int cpu_reset(u32 nr);
20 int cpu_disable(u32 nr);
21 int cpu_release(u32 nr, int argc, char * const argv[]);
23 static inline int cpumask_next(int cpu, unsigned int mask)
25 for (cpu++; !((1 << cpu) & mask); cpu++)
31 #define for_each_cpu(iter, cpu, num_cpus, mask) \
32 for (iter = 0, cpu = cpumask_next(-1, mask); \
34 iter++, cpu = cpumask_next(cpu, mask)) \
36 int cpu_numcores(void);
37 int cpu_num_dspcores(void);
39 u32 cpu_dsp_mask(void);
40 int is_core_valid(unsigned int core);
43 * checkcpu() - perform an early check of the CPU
45 * This is used on PowerPC, SH and X86 machines as a CPU init mechanism. It is
46 * called during the pre-relocation init sequence in board_init_f().
48 * @return 0 if oK, -ve on error