diff options
author | marcel <marcel@FreeBSD.org> | 2002-05-12 05:54:21 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 2002-05-12 05:54:21 +0000 |
commit | 49d0eba5f2e4c8bc62afa196db9dc683dd92018e (patch) | |
tree | 60e30ee3008b26ae2fe106aea4d4197176e7a65c /sys/ia64/acpica | |
parent | e7bbea38d981582adb68f002d1abf784b0ea7047 (diff) | |
download | FreeBSD-src-49d0eba5f2e4c8bc62afa196db9dc683dd92018e.zip FreeBSD-src-49d0eba5f2e4c8bc62afa196db9dc683dd92018e.tar.gz |
o Rename ia64_count_aps to ia64_count_cpus and reimplement the
function to return the total number of CPUs and not the highest
CPU id.
o Define mp_maxid based on the minimum of the actual number of
CPUs in the system and MAXCPU.
o In cpu_mp_add, when the CPU id of the CPU we're trying to add
is larger than mp_maxid, don't add the CPU. Formerly this was
based on MAXCPU. Don't count CPUs when we add them. We already
know how many CPUs exist.
o Replace MAXCPU with mp_maxid when used in loops that iterate
over the id space. This avoids a couple of useless iterations.
o In cpu_mp_unleash, use the number of CPUs to determine if we
need to launch the CPUs.
o Remove mp_hardware as it's not used anymore.
o Move the IPI vector array from mp_machdep.c to sal.c. We use
the array as a centralized place to collect vector assignments.
Note that we still assign vectors to SMP specific IPIs in
non-SMP configurations. Rename the array from mp_ipi_vector to
ipi_vector.
o Add IPI_MCA_RENDEZ and IPI_MCA_CMCV. These are used by MCA.
Note that IPI_MCA_CMCV is not SMP specific.
o Initialize the ipi_vector array so that we place the IPIs in
sensible priority classes. The classes are relative to where
the AP wake-up vector is located to guarantee that it's the
highest priority (external) interrupt. Class assignment is
as follows:
class IPI notes
x AP wake-up (normally x=15)
x-1 MCA rendezvous
x-2 AST, Rendezvous, stop
x-3 CMCV, test
Diffstat (limited to 'sys/ia64/acpica')
-rw-r--r-- | sys/ia64/acpica/madt.c | 35 |
1 files changed, 22 insertions, 13 deletions
diff --git a/sys/ia64/acpica/madt.c b/sys/ia64/acpica/madt.c index 0734f3e..0ddd374 100644 --- a/sys/ia64/acpica/madt.c +++ b/sys/ia64/acpica/madt.c @@ -134,30 +134,39 @@ parse_platform_interrupt(PLATFORM_INTERRUPT_SOURCE *source) static int parse_madt(APIC_TABLE *madt, int countcpus) { - char *p, *end; - int maxid = 0; + char *end, *p; + int cpus; + + end = (char *)madt + madt->Header.Length; /* * MADT header is followed by a number of variable length * structures. */ - end = (char *) madt + madt->Header.Length; - for (p = (char *) (madt + 1); p < end; ) { - APIC_HEADER *head = (APIC_HEADER *) p; - if (countcpus) { + if (countcpus) { + cpus = 0; + + for (p = (char *)(madt + 1); p < end; ) { + APIC_HEADER *head = (APIC_HEADER *)p; + if (head->Type == APIC_LOCAL_SAPIC) { LOCAL_SAPIC *sapic = (LOCAL_SAPIC *) head; if (sapic->ProcessorEnabled) - if (sapic->ProcessorId > maxid) - maxid = sapic->ProcessorId; + cpus++; } p = p + head->Length; - continue; } + return (cpus); + } + + for (p = (char *)(madt + 1); p < end; ) { + APIC_HEADER *head = (APIC_HEADER *)p; + if (bootverbose) printf("\t"); + switch (head->Type) { case APIC_PROC: if (bootverbose) @@ -220,7 +229,7 @@ parse_madt(APIC_TABLE *madt, int countcpus) p = p + head->Length; } - return (maxid); + return (0); } static int @@ -262,11 +271,11 @@ ia64_probe_sapics(void) } /* - * Return the maximum cpuid used by any cpu in the system. This will - * return zero for systems with only one cpu. + * Count the number of local SAPIC entries in the APIC table. Every enabled + * entry corresponds to a processor. */ int -ia64_count_aps(void) +ia64_count_cpus(void) { return (parse_table(1)); } |