tree 8fcfd5c3ea244bdf5c2bc1b3d06727dc62b04753
parent 3783443cbe2deea0e784b20f048c45b3e8cc7db1
author Jason Davis <[EMAIL PROTECTED]> Tue Apr 12 08:25:24 2005
committer Linus Torvalds <[EMAIL PROTECTED]> Tue Apr 12 08:25:24 2005
[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 <[EMAIL PROTECTED]>
Acked-by: Andi Kleen <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
i386/kernel/acpi/boot.c | 4 ++++
x86_64/kernel/genapic.c | 16 ++++++++++++++++
2 files changed, 20 insertions(+)
Index: arch/i386/kernel/acpi/boot.c
===================================================================
--- da321d20547b422bbb425da7ceed079b7ce9cce5/arch/i386/kernel/acpi/boot.c
(mode:100644 sha1:f68f73a0bff53cb27ea23d064c74fbc0f2582ed5)
+++ 8fcfd5c3ea244bdf5c2bc1b3d06727dc62b04753/arch/i386/kernel/acpi/boot.c
(mode:100644 sha1:90193411cb5bbcd38106891b3dc50ea02b42483e)
@@ -608,6 +608,10 @@
acpi_fadt.sci_int = fadt->sci_int;
#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
/* detect the location of the ACPI PM Timer */
if (fadt->revision >= FADT2_REVISION_ID) {
Index: arch/x86_64/kernel/genapic.c
===================================================================
--- da321d20547b422bbb425da7ceed079b7ce9cce5/arch/x86_64/kernel/genapic.c
(mode:100644 sha1:1f2852ced015557aeb4050e3c0d8e4733f6b3792)
+++ 8fcfd5c3ea244bdf5c2bc1b3d06727dc62b04753/arch/x86_64/kernel/genapic.c
(mode:100644 sha1:d72903f1a69c3f642c6d1ef2a9ce8303180dc8f6)
@@ -20,6 +20,10 @@
#include <asm/smp.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) */
u8 x86_cpu_to_apicid[NR_CPUS] = { [0 ... NR_CPUS-1] = BAD_APICID };
EXPORT_SYMBOL(x86_cpu_to_apicid);
@@ -47,6 +51,18 @@
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));
for (i = 0; i < NR_CPUS; i++) {
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html