MAXCPU
for (i = 0; i < MAXCPU; i++) {
(vm_offset_t)&__pcpu[0] + sizeof(__pcpu[0]) * MAXCPU, false);
SYSMAP(struct pcpu *, pcpu_pte, __pcpu, MAXCPU);
for (i = 1; i < MAXCPU; i++)
#define NPV_LIST_LOCKS MAXCPU
#if MAXCPU > 256
#ifndef MAXCPU
static struct asid asid[MAXCPU];
for (cpu = 0; cpu < MAXCPU; cpu++) {
int vmxon_enabled[MAXCPU];
long eptgen[MAXCPU]; /* cached pmap->pm_eptgen */
ASSYM(MAXCPU, MAXCPU);
for (i = 0; i < MAXCPU; i++) {
for (cpu = end; cpu < MAXCPU; cpu++)
#if MAXCPU > 8
#define GIC_MAXCPU MAXCPU
struct pcpu __pcpu[MAXCPU];
irqstack = pmap_preboot_get_vpages(IRQ_STACK_SIZE * MAXCPU);
abtstack = pmap_preboot_get_vpages(ABT_STACK_SIZE * MAXCPU);
undstack = pmap_preboot_get_vpages(UND_STACK_SIZE * MAXCPU );
void *dpcpu[MAXCPU - 1];
for (i = 0; i < MAXCPU; i++)
uint32_t ccnt_hi[MAXCPU];
#define MAX_RLEN MAXCPU
for (i = 0; i < MAXCPU; i++) {
for (i = 0; i < MAXCPU; i++) {
extern uint32_t ccnt_hi[MAXCPU];
#ifndef MAXCPU
for (i = 0; i < MAXCPU; i++)
acpi_pxm_init(MAXCPU, parange);
struct its_col *sc_its_cols[MAXCPU]; /* Per-CPU collections */
void *sc_pend_base[MAXCPU];
uint64_t __cpu_affinity[MAXCPU];
static void *bootstacks[MAXCPU];
static void *dpcpu[MAXCPU - 1];
if (cpu >= MAXCPU || cpuid_to_pcpu[cpu] == NULL ||
if ( cpu >= MAXCPU)
KASSERT(cpuid < MAXCPU, ("Too many CPUs"));
cores = MIN(cores, MAXCPU);
cores = MIN(cores, MAXCPU);
#ifndef MAXCPU
static char *stack[MAXCPU];
static vm_offset_t stack_hyp_va[MAXCPU];
static struct cam_doneq cam_doneqs[MAXCPU];
else if (cam_num_doneqs > MAXCPU)
cam_num_doneqs = MAXCPU;
cpu_core_t cpu_core[MAXCPU];
solaris_cpu_t solaris_cpu[MAXCPU];
for (i = 0; i < MAXCPU; i++) {
static int64_t tsc_skew[MAXCPU];
} dtrace_debug_data[MAXCPU];
static int64_t tsc_skew[MAXCPU];
static int64_t timebase_skew[MAXCPU];
KASSERT((cpuid >= -1 && cpuid <= MAXCPU), ("%s: invalid cpuid %d\n",
#define WORK_CPU_UNBOUND MAXCPU
lkpi_task_resrv = first_msi_irq + num_msi_irqs + MAXCPU;
int pcpu_slaves[MAXCPU];
for (i = 0; i < MAXCPU; i++) {
#define ACPI_MAX_TASKS MAX(32, MAXCPU * 4)
if (sc->sc_ncores > MAXCPU)
struct sysctl_oid *sc_sysctl_cpu[MAXCPU];
bool sc_regs_mapped[MAXCPU]; /* register mapping status */
t_Handle sc_bph[MAXCPU]; /* BMAN portal handles */
dpaa_portal_t sc_dp[MAXCPU];
bool sc_regs_mapped[MAXCPU];
t_Handle sc_qph[MAXCPU]; /* QMAN portal handles */
mp_ncpus = MIN(mp_ncpus, MAXCPU);
u_long chan_send_cnt[MAXCPU];
struct vmbus_channel *hs_sel_chan[MAXCPU];
struct vmbus_pcpu_data vmbus_pcpu[MAXCPU];
static u_char sc_kattrtab[MAXCPU];
static void *sc_kts[MAXCPU];
struct pcpu __pcpu[MAXCPU];
for (i = 0; i < MAXCPU; i++) {
#ifndef MAXCPU
static TAILQ_HEAD(pcie_cfg_list, pcie_cfg_elem) pcie_list[MAXCPU];
mtsh.mtsh_maxcpus = MAXCPU;
for (; i < MAXCPU; i++) {
struct trapframe pmc_tf[MAXCPU];
(uintptr_t)ident <= (uintptr_t)&pause_wchan[MAXCPU - 1])
static const char pause_wchan[MAXCPU];
static uint8_t nanowait[MAXCPU];
#define CPUBLOCK MAXCPU
static struct runq runq_pcpu[MAXCPU];
long runq_length[MAXCPU];
for (i = 0; i < MAXCPU; ++i)
#define TDQ_NAME_LEN (sizeof("sched lock ") + sizeof(__XSTRING(MAXCPU)))
#define TDQ_LOADNAME_LEN (sizeof("CPU ") + sizeof(__XSTRING(MAXCPU)) - 1 + sizeof(" load"))
#define A64_POOL_SIZE MAXCPU
static csan_cpu_t kcsan_cpus[MAXCPU];
struct taskqgroup_cpu tqg_queue[MAXCPU];
uintptr_t dpcpu_off[MAXCPU];
struct pcpu *cpuid_to_pcpu[MAXCPU];
KASSERT(cpuid >= 0 && cpuid < MAXCPU,
int mp_maxcpus = MAXCPU;
#define WITNESS_PENDLIST (512 + (MAXCPU * 4))
static uint16_t ktls_cpuid_lookup[MAXCPU];
int cpu[MAXCPU];
struct taskqueue *tq[MAXCPU];
snws_array = malloc(sizeof(*snws_array) * MAXCPU, M_TEMP,
KASSERT(counter <= MAXCPU,
snw_array = malloc(sizeof(*snw_array) * MAXCPU * NETISR_MAXPROT,
KASSERT(counter <= MAXCPU * NETISR_MAXPROT,
static u_int nws_array[MAXCPU];
uint32_t ncpus = mp_ncpus ? mp_ncpus : MAXCPU;
int cpu[MAXCPU];
KTEST_VERIFY(pace->rp_num_hptss <= MAXCPU); /* Reasonable upper bound */
KTEST_VERIFY(pace1->rp_num_hptss > 0 && pace1->rp_num_hptss <= MAXCPU);
KTEST_VERIFY(pace2->rp_num_hptss > 0 && pace2->rp_num_hptss <= MAXCPU);
#define PV_LOCK_COUNT MAXCPU
#define NPV_LIST_LOCKS MAXCPU
static volatile pmap_t tidbusy[MAXCPU][TID_MAX + 1];
for (i = 0; i < MAXCPU; i++) {
for (i = 0; i < MAXCPU; i++)
for (i = 0; i < MAXCPU; i++)
#ifndef MAXCPU
tlbtid_t pm_tid[MAXCPU];
static struct cpuref platform_cpuref[MAXCPU];
static struct cpuref tmp_cpuref[MAXCPU];
static u_long *decr_counts[MAXCPU];
struct pcpu __pcpu[MAXCPU] __aligned(PAGE_SIZE);
if (cpu.cr_cpuid >= MAXCPU) {
for (i = 0; i < MAXCPU; i++) {
static struct cpuref tmp_cpuref[MAXCPU];
static uint8_t splpar_vpa[MAXCPU][640] __aligned(128); /* XXX: dpcpu */
static struct cpuref platform_cpuref[MAXCPU];
struct resource *mem[MAXCPU];
static uint32_t cpu_xirr[MAXCPU];
#ifndef MAXCPU
unsigned int hart_indices[MAXCPU];
struct cpu_desc cpu_desc[MAXCPU];
struct pcpu __pcpu[MAXCPU];
static void *bootstacks[MAXCPU];
void *dpcpu[MAXCPU - 1];
KASSERT(id < MAXCPU, ("Too many CPUs"));
KASSERT(hart < MAXCPU, ("Too many harts."));
cores = MIN(cores, MAXCPU);
uint32_t __riscv_boot_ap[MAXCPU];
static uint32_t cpu_reg[MAXCPU][2];
struct plic_context contexts[MAXCPU];
#define NPV_LIST_LOCKS MAXCPU
uint32_t pending_ipis[MAXCPU];
#define CPU_SETSIZE MAXCPU
struct pmclog_buffer *po_curbuf[MAXCPU]; /* current log buffer */
extern struct trapframe pmc_tf[MAXCPU];
static struct thread *testthreads[MAXCPU];
static struct epoch_test_instance etilist[MAXCPU];
u_int ncpus = mp_ncpus ? mp_ncpus : MAXCPU;
u_int ncpus = mp_ncpus ? mp_ncpus : MAXCPU;
#define VM_RESERV_OBJ_LOCK_COUNT MAXCPU
mp_ncpus == MAXCPU ||
extern u_long *ipi_invltlb_counts[MAXCPU];
extern u_long *ipi_invlrng_counts[MAXCPU];
extern u_long *ipi_invlpg_counts[MAXCPU];
extern u_long *ipi_invlcache_counts[MAXCPU];
extern u_long *ipi_rendezvous_counts[MAXCPU];
if (cpu >= MAXCPU)
static u_long *ipi_preempt_counts[MAXCPU];
static u_long *ipi_ast_counts[MAXCPU];
u_long *ipi_invltlb_counts[MAXCPU];
u_long *ipi_invlrng_counts[MAXCPU];
u_long *ipi_invlpg_counts[MAXCPU];
u_long *ipi_invlcache_counts[MAXCPU];
u_long *ipi_rendezvous_counts[MAXCPU];
static u_long *ipi_hardclock_counts[MAXCPU];
for (i = 0; i < MAXCPU; i++) {
u_int xhits_gbl[MAXCPU];
u_int xhits_pg[MAXCPU];
u_int xhits_rng[MAXCPU];
KASSERT((u_int)cpu < MAXCPU && cpu_apic_ids[cpu] != -1,
int cpu_apic_ids[MAXCPU];
_Static_assert(MAXCPU <= MAX_APIC_ID,
if (mp_ncpus >= MAXCPU)
void *bootstacks[MAXCPU];
proc->apic_id < MAX_LAPIC_ID && mp_ncpus < MAXCPU) {