aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorJason Davis <jason@rightthere.net>2005-04-16 18:24:53 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:24:53 -0400
commit90660ec3c3e3f463a3cc7005213345b6c9ecfab9 (patch)
tree1b9d29d6db925d41e282f2f3dcff189b4c185f90 /arch
parent107ce721abddbd876aa6203ac982821e405400e9 (diff)
[PATCH] x86_64 genapic update
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>
Diffstat (limited to 'arch')
-rw-r--r--arch/i386/kernel/acpi/boot.c4
-rw-r--r--arch/x86_64/kernel/genapic.c16
2 files changed, 20 insertions, 0 deletions
diff --git a/arch/i386/kernel/acpi/boot.c b/arch/i386/kernel/acpi/boot.c
index 9ba0b957d11f..040451e90a04 100644
--- a/arch/i386/kernel/acpi/boot.c
+++ b/arch/i386/kernel/acpi/boot.c
@@ -608,6 +608,10 @@ static int __init acpi_parse_fadt(unsigned long phys, unsigned long size)
608 acpi_fadt.sci_int = fadt->sci_int; 608 acpi_fadt.sci_int = fadt->sci_int;
609#endif 609#endif
610 610
611 /* initialize rev and apic_phys_dest_mode for x86_64 genapic */
612 acpi_fadt.revision = fadt->revision;
613 acpi_fadt.force_apic_physical_destination_mode = fadt->force_apic_physical_destination_mode;
614
611#ifdef CONFIG_X86_PM_TIMER 615#ifdef CONFIG_X86_PM_TIMER
612 /* detect the location of the ACPI PM Timer */ 616 /* detect the location of the ACPI PM Timer */
613 if (fadt->revision >= FADT2_REVISION_ID) { 617 if (fadt->revision >= FADT2_REVISION_ID) {
diff --git a/arch/x86_64/kernel/genapic.c b/arch/x86_64/kernel/genapic.c
index d2c42fb99cb3..69b9c25a8fc4 100644
--- a/arch/x86_64/kernel/genapic.c
+++ b/arch/x86_64/kernel/genapic.c
@@ -20,6 +20,10 @@
20#include <asm/smp.h> 20#include <asm/smp.h>
21#include <asm/ipi.h> 21#include <asm/ipi.h>
22 22
23#if defined(CONFIG_ACPI_BUS)
24#include <acpi/acpi_bus.h>
25#endif
26
23/* which logical CPU number maps to which CPU (physical APIC ID) */ 27/* which logical CPU number maps to which CPU (physical APIC ID) */
24u8 x86_cpu_to_apicid[NR_CPUS] = { [0 ... NR_CPUS-1] = BAD_APICID }; 28u8 x86_cpu_to_apicid[NR_CPUS] = { [0 ... NR_CPUS-1] = BAD_APICID };
25EXPORT_SYMBOL(x86_cpu_to_apicid); 29EXPORT_SYMBOL(x86_cpu_to_apicid);
@@ -47,6 +51,18 @@ void __init clustered_apic_check(void)
47 goto print; 51 goto print;
48 } 52 }
49 53
54#if defined(CONFIG_ACPI_BUS)
55 /*
56 * Some x86_64 machines use physical APIC mode regardless of how many
57 * procs/clusters are present (x86_64 ES7000 is an example).
58 */
59 if (acpi_fadt.revision > FADT2_REVISION_ID)
60 if (acpi_fadt.force_apic_physical_destination_mode) {
61 genapic = &apic_cluster;
62 goto print;
63 }
64#endif
65
50 memset(cluster_cnt, 0, sizeof(cluster_cnt)); 66 memset(cluster_cnt, 0, sizeof(cluster_cnt));
51 67
52 for (i = 0; i < NR_CPUS; i++) { 68 for (i = 0; i < NR_CPUS; i++) {