x86_64 genapic mechanism should be aware of machines that use physical APIC
mode regardless of how many clusters/processors are detected.

ACPI 3.0 FADT makes this determination very simple by providing a feature
flag "force_apic_physical_destination_mode" to state whether the machine
unconditionally uses physical APIC mode.

Unisys' next generation x86_64 ES7000 will need to utilize this FADT
feature flag in order to boot the x86_64 kernel in the correct APIC mode. 
This patch has been tested on both x86_64 commodity and ES7000 boxes.

Signed-off-by: Jason Davis <jason.davis@unisys.com>
Acked-by: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
Jason Davis 2005-04-16 15:24:53 -07:00 коммит произвёл Linus Torvalds
Родитель 107ce721ab
Коммит 90660ec3c3
2 изменённых файлов: 20 добавлений и 0 удалений

Просмотреть файл

@ -608,6 +608,10 @@ static int __init acpi_parse_fadt(unsigned long phys, unsigned long size)
acpi_fadt.sci_int = fadt->sci_int; acpi_fadt.sci_int = fadt->sci_int;
#endif #endif
/* initialize rev and apic_phys_dest_mode for x86_64 genapic */
acpi_fadt.revision = fadt->revision;
acpi_fadt.force_apic_physical_destination_mode = fadt->force_apic_physical_destination_mode;
#ifdef CONFIG_X86_PM_TIMER #ifdef CONFIG_X86_PM_TIMER
/* detect the location of the ACPI PM Timer */ /* detect the location of the ACPI PM Timer */
if (fadt->revision >= FADT2_REVISION_ID) { if (fadt->revision >= FADT2_REVISION_ID) {

Просмотреть файл

@ -20,6 +20,10 @@
#include <asm/smp.h> #include <asm/smp.h>
#include <asm/ipi.h> #include <asm/ipi.h>
#if defined(CONFIG_ACPI_BUS)
#include <acpi/acpi_bus.h>
#endif
/* which logical CPU number maps to which CPU (physical APIC ID) */ /* which logical CPU number maps to which CPU (physical APIC ID) */
u8 x86_cpu_to_apicid[NR_CPUS] = { [0 ... NR_CPUS-1] = BAD_APICID }; u8 x86_cpu_to_apicid[NR_CPUS] = { [0 ... NR_CPUS-1] = BAD_APICID };
EXPORT_SYMBOL(x86_cpu_to_apicid); EXPORT_SYMBOL(x86_cpu_to_apicid);
@ -47,6 +51,18 @@ void __init clustered_apic_check(void)
goto print; goto print;
} }
#if defined(CONFIG_ACPI_BUS)
/*
* Some x86_64 machines use physical APIC mode regardless of how many
* procs/clusters are present (x86_64 ES7000 is an example).
*/
if (acpi_fadt.revision > FADT2_REVISION_ID)
if (acpi_fadt.force_apic_physical_destination_mode) {
genapic = &apic_cluster;
goto print;
}
#endif
memset(cluster_cnt, 0, sizeof(cluster_cnt)); memset(cluster_cnt, 0, sizeof(cluster_cnt));
for (i = 0; i < NR_CPUS; i++) { for (i = 0; i < NR_CPUS; i++) {