mptable: fix i386 build failure
Reported by: emaste X-MFC-with: r322347
This commit is contained in:
parent
9404dae2a1
commit
3f0a9fe06c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=322372
@ -325,12 +325,17 @@ static void
|
||||
madt_parse_cpu(unsigned int apic_id, unsigned int flags)
|
||||
{
|
||||
|
||||
if (!(flags & ACPI_MADT_ENABLED) || mp_ncpus == MAXCPU ||
|
||||
if (!(flags & ACPI_MADT_ENABLED) ||
|
||||
#ifdef SMP
|
||||
mp_ncpus == MAXCPU ||
|
||||
#endif
|
||||
apic_id > MAX_APIC_ID)
|
||||
return;
|
||||
|
||||
#ifdef SMP
|
||||
mp_ncpus++;
|
||||
mp_maxid = mp_ncpus - 1;
|
||||
#endif
|
||||
max_apic_id = max(apic_id, max_apic_id);
|
||||
}
|
||||
|
||||
|
@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/limits.h>
|
||||
#include <sys/malloc.h>
|
||||
#include <sys/smp.h>
|
||||
#ifdef NEW_PCIB
|
||||
#include <sys/rman.h>
|
||||
#endif
|
||||
@ -330,8 +331,10 @@ mptable_probe_cpus(void)
|
||||
|
||||
/* Is this a pre-defined config? */
|
||||
if (mpfps->config_type != 0) {
|
||||
#ifdef SMP
|
||||
mp_ncpus = 2;
|
||||
mp_maxid = 1;
|
||||
#endif
|
||||
max_apic_id = 1;
|
||||
} else {
|
||||
mptable_walk_table(mptable_probe_cpus_handler, &cpu_mask);
|
||||
@ -346,6 +349,7 @@ static int
|
||||
mptable_setup_local(void)
|
||||
{
|
||||
vm_paddr_t addr;
|
||||
u_int cpu_mask;
|
||||
|
||||
/* Is this a pre-defined config? */
|
||||
printf("MPTable: <");
|
||||
@ -478,8 +482,10 @@ mptable_probe_cpus_handler(u_char *entry, void *arg)
|
||||
proc = (proc_entry_ptr)entry;
|
||||
if (proc->cpu_flags & PROCENTRY_FLAG_EN &&
|
||||
proc->apic_id < MAX_LAPIC_ID && mp_ncpus < MAXCPU) {
|
||||
#ifdef SMP
|
||||
mp_ncpus++;
|
||||
mp_maxid = mp_ncpus - 1;
|
||||
#endif
|
||||
max_apic_id = max(max_apic_id, proc->apic_id);
|
||||
}
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user