1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-29 16:44:03 +00:00

Bring over the code from sys/i386/i386/mp_machdep.c, r187880

to make XEN config compile again:
- Allocate apic vectors on a per-cpu basis.
This commit is contained in:
Bjoern A. Zeeb 2009-01-31 21:40:27 +00:00
parent d065e13dc2
commit e72f0a071c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=187966

View File

@ -137,6 +137,7 @@ struct cpu_info {
int cpu_disabled:1;
} static cpu_info[MAX_APIC_ID + 1];
int cpu_apic_ids[MAXCPU];
int apic_cpuids[MAX_APIC_ID + 1];
/* Holds pending bitmap based IPIs per CPU */
static volatile u_int cpu_ipi_pending[MAXCPU];
@ -284,6 +285,7 @@ cpu_mp_start(void)
KASSERT(boot_cpu_id == PCPU_GET(apic_id),
("BSP's APIC ID doesn't match boot_cpu_id"));
cpu_apic_ids[0] = boot_cpu_id;
apic_cpuids[boot_cpu_id] = 0;
assign_cpu_ids();
@ -707,6 +709,7 @@ assign_cpu_ids(void)
if (mp_ncpus < MAXCPU) {
cpu_apic_ids[mp_ncpus] = i;
apic_cpuids[i] = mp_ncpus;
mp_ncpus++;
} else
cpu_info[i].cpu_disabled = 1;