* [patch 070/198] x86_64 genapic update
@ 2005-04-12 10:31 akpm
2005-04-17 6:27 ` Chris Wedgwood
0 siblings, 1 reply; 3+ messages in thread
From: akpm @ 2005-04-12 10:31 UTC (permalink / raw)
To: torvalds; +Cc: linux-kernel, akpm, jason, ak, jason.davis
From: Jason Davis <jason@rightthere.net>
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>
---
25-akpm/arch/i386/kernel/acpi/boot.c | 4 ++++
25-akpm/arch/x86_64/kernel/genapic.c | 16 ++++++++++++++++
2 files changed, 20 insertions(+)
diff -puN arch/i386/kernel/acpi/boot.c~x86_64-genapic-update arch/i386/kernel/acpi/boot.c
--- 25/arch/i386/kernel/acpi/boot.c~x86_64-genapic-update 2005-04-12 03:21:20.212064200 -0700
+++ 25-akpm/arch/i386/kernel/acpi/boot.c 2005-04-12 03:21:20.217063440 -0700
@@ -608,6 +608,10 @@ static int __init acpi_parse_fadt(unsign
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) {
diff -puN arch/x86_64/kernel/genapic.c~x86_64-genapic-update arch/x86_64/kernel/genapic.c
--- 25/arch/x86_64/kernel/genapic.c~x86_64-genapic-update 2005-04-12 03:21:20.214063896 -0700
+++ 25-akpm/arch/x86_64/kernel/genapic.c 2005-04-12 03:21:20.218063288 -0700
@@ -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 @@ void __init clustered_apic_check(void)
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++) {
_
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [patch 070/198] x86_64 genapic update
2005-04-12 10:31 [patch 070/198] x86_64 genapic update akpm
@ 2005-04-17 6:27 ` Chris Wedgwood
2005-04-18 9:11 ` Andi Kleen
0 siblings, 1 reply; 3+ messages in thread
From: Chris Wedgwood @ 2005-04-17 6:27 UTC (permalink / raw)
To: akpm; +Cc: torvalds, linux-kernel, jason, ak, jason.davis
On Tue, Apr 12, 2005 at 03:31:41AM -0700, akpm@osdl.org wrote:
> diff -puN arch/i386/kernel/acpi/boot.c~x86_64-genapic-update arch/i386/kernel/acpi/boot.c
> --- 25/arch/i386/kernel/acpi/boot.c~x86_64-genapic-update 2005-04-12 03:21:20.212064200 -0700
> +++ 25-akpm/arch/i386/kernel/acpi/boot.c 2005-04-12 03:21:20.217063440 -0700
> @@ -608,6 +608,10 @@ static int __init acpi_parse_fadt(unsign
> 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;
> +
This breaks for me. It seems acpi_fadt needs CONFIG_ACPI_BUS. How
does this look?
Signed-off-By: Chris Wedgwood <cw@f00f.org>
Index: cw-current/arch/i386/kernel/acpi/boot.c
===================================================================
--- cw-current.orig/arch/i386/kernel/acpi/boot.c 2005-04-16 20:17:09.801272343 -0700
+++ cw-current/arch/i386/kernel/acpi/boot.c 2005-04-16 23:24:59.014298068 -0700
@@ -608,9 +608,11 @@
acpi_fadt.sci_int = fadt->sci_int;
#endif
+#ifdef CONFIG_ACPI_BUS
/* 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;
+#endif
#ifdef CONFIG_X86_PM_TIMER
/* detect the location of the ACPI PM Timer */
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [patch 070/198] x86_64 genapic update
2005-04-17 6:27 ` Chris Wedgwood
@ 2005-04-18 9:11 ` Andi Kleen
0 siblings, 0 replies; 3+ messages in thread
From: Andi Kleen @ 2005-04-18 9:11 UTC (permalink / raw)
To: Chris Wedgwood; +Cc: akpm, torvalds, linux-kernel, jason, ak, jason.davis
On Sat, Apr 16, 2005 at 11:27:26PM -0700, Chris Wedgwood wrote:
> On Tue, Apr 12, 2005 at 03:31:41AM -0700, akpm@osdl.org wrote:
>
> > diff -puN arch/i386/kernel/acpi/boot.c~x86_64-genapic-update arch/i386/kernel/acpi/boot.c
> > --- 25/arch/i386/kernel/acpi/boot.c~x86_64-genapic-update 2005-04-12 03:21:20.212064200 -0700
> > +++ 25-akpm/arch/i386/kernel/acpi/boot.c 2005-04-12 03:21:20.217063440 -0700
> > @@ -608,6 +608,10 @@ static int __init acpi_parse_fadt(unsign
> > 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;
> > +
>
> This breaks for me. It seems acpi_fadt needs CONFIG_ACPI_BUS. How
> does this look?
Looks good, thanks. Linus, can you please add it? Thanks.
-Andi
>
> Signed-off-By: Chris Wedgwood <cw@f00f.org>
>
> Index: cw-current/arch/i386/kernel/acpi/boot.c
> ===================================================================
> --- cw-current.orig/arch/i386/kernel/acpi/boot.c 2005-04-16 20:17:09.801272343 -0700
> +++ cw-current/arch/i386/kernel/acpi/boot.c 2005-04-16 23:24:59.014298068 -0700
> @@ -608,9 +608,11 @@
> acpi_fadt.sci_int = fadt->sci_int;
> #endif
>
> +#ifdef CONFIG_ACPI_BUS
> /* 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;
> +#endif
>
> #ifdef CONFIG_X86_PM_TIMER
> /* detect the location of the ACPI PM Timer */
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-04-18 9:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-12 10:31 [patch 070/198] x86_64 genapic update akpm
2005-04-17 6:27 ` Chris Wedgwood
2005-04-18 9:11 ` Andi Kleen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®