[PATCH] 2.6.12-rc1-mm4 x86_64 genapic update
Hello, 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]> diff -Naurp linux-2.6.12-rc1-mm4/arch/i386/kernel/acpi/boot.c linux-2.6.12-rc1-mm4-genapic/arch/i386/kernel/acpi/boot.c --- linux-2.6.12-rc1-mm4/arch/i386/kernel/acpi/boot.c 2005-03-02 02:38:25.0 -0500 +++ linux-2.6.12-rc1-mm4-genapic/arch/i386/kernel/acpi/boot.c 2005-03-31 18:15:09.606679144 -0500 @@ -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 -Naurp linux-2.6.12-rc1-mm4/arch/x86_64/kernel/genapic.c linux-2.6.12-rc1-mm4-genapic/arch/x86_64/kernel/genapic.c --- linux-2.6.12-rc1-mm4/arch/x86_64/kernel/genapic.c 2005-03-02 02:38:37.0 -0500 +++ linux-2.6.12-rc1-mm4-genapic/arch/x86_64/kernel/genapic.c 2005-03-31 18:15:09.607678992 -0500 @@ -20,6 +20,10 @@ #include #include +#if defined(CONFIG_ACPI_BUS) +#include +#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++) { - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] ES7000 Legacy Mappings Update
Below is an update to the ES7000 Legacy Mappings patch. - This update only affects Unisys' ES7000 machines. The patch reflects a change needed to determine which generation of ES7000 is currently running. The next generation of ES7000s will have conventional legacy support so the patch accommodates for this. This patch has been tested and verified on both an authentic 5xx ES7000 box and the next generation ES7000 box. Signed-off-by: Natalie Protasevich <[EMAIL PROTECTED]> Signed-off-by: Jason Davis <[EMAIL PROTECTED]> diff -Nuarp linux-2.6.11.3/arch/i386/kernel/mpparse.c linux-2.6.11.3-legacy/arch/i386/kernel/mpparse.c --- linux-2.6.11.3/arch/i386/kernel/mpparse.c 2005-03-13 01:44:19.0 -0500 +++ linux-2.6.11.3-legacy/arch/i386/kernel/mpparse.c2005-03-18 11:19:10.0 -0500 @@ -996,9 +996,9 @@ void __init mp_config_acpi_legacy_irqs ( Dprintk("Bus #%d is ISA\n", MP_ISA_BUS); /* - * ES7000 has no legacy identity mappings + * Older generations of ES7000 have no legacy identity mappings */ - if (es7000_plat) + if (es7000_plat == 1) return; /* diff -Nuarp linux-2.6.11.3/arch/i386/mach-es7000/es7000plat.c linux-2.6.11.3-legacy/arch/i386/mach-es7000/es7000plat.c --- linux-2.6.11.3/arch/i386/mach-es7000/es7000plat.c 2005-03-13 01:44:41.0 -0500 +++ linux-2.6.11.3-legacy/arch/i386/mach-es7000/es7000plat.c 2005-03-18 11:00:03.0 -0500 @@ -138,7 +138,19 @@ parse_unisys_oem (char *oemptr, int oem_ es7000_plat = 0; } else { printk("\nEnabling ES7000 specific features...\n"); - es7000_plat = 1; + /* + * Determine the generation of the ES7000 currently running. + * + * es7000_plat = 0 if the machine is NOT a Unisys ES7000 box + * es7000_plat = 1 if the machine is a 5xx ES7000 box + * es7000_plat = 2 if the machine is a x86_64 ES7000 box + * + */ + if (!(boot_cpu_data.x86 <= 15 && boot_cpu_data.x86_model <= 2)) + es7000_plat = 2; + else + es7000_plat = 1; + ioapic_renumber_irq = es7000_rename_gsi; } return es7000_plat; - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] ES7000 Legacy Mappings Update
See below. On Mon, 14 Mar 2005, Andrew Morton wrote: You triggered my trivia twitch. Jason Davis <[EMAIL PROTECTED]> wrote: - * ES7000 has no legacy identity mappings + * Older generations of ES7000 have no legacy identity mappings */ - if (es7000_plat) + if (es7000_plat && es7000_plat < 2) return; Why not if (es7000_plat == 1) ? Looks like I never learned to apply the concept of reducing fractions :). Thanks for catching this. /* diff -Naurp linux-2.6.11.3/arch/i386/mach-es7000/es7000plat.c linux-2.6.11.3-legacy/arch/i386/mach-es7000/es7000plat.c --- linux-2.6.11.3/arch/i386/mach-es7000/es7000plat.c 2005-03-13 01:44:41.0 -0500 +++ linux-2.6.11.3-legacy/arch/i386/mach-es7000/es7000plat.c 2005-03-14 11:52:44.0 -0500 @@ -138,7 +138,14 @@ parse_unisys_oem (char *oemptr, int oem_ es7000_plat = 0; } else { printk("\nEnabling ES7000 specific features...\n"); - es7000_plat = 1; + /* + * Check to see if this is a x86_64 ES7000 machine. + */ + if (!(boot_cpu_data.x86 <= 15 && boot_cpu_data.x86_model <= 2)) + es7000_plat = 2; + else + es7000_plat = 1; + Perhaps some nice enumerated identifiers here, rather than magic numbers? Initially, I was going to take this approach but that would require some specific platform defines to be thrown into a global header file (mpparse.c would need to see them as well). I didn't think it would be appropriate to mix code like that. I'll be glad to revise the patch to include enumerated identifiers but would it be more acceptable to comment on the semantics of the es7000_plat var in the platform specific "es7000plat.c" file? - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] ES7000 Legacy Mappings Update
Hi - This update only affects Unisys' ES7000 machines. The patch reflects a change needed to determine which generation of ES7000 is currently running. The next generation of ES7000s will have conventional legacy support so the patch accommodates for this. This patch has been tested and verified on both an authentic 5xx ES7000 box and the next generation ES7000 box. Thanks, Jason Davis diff -Naurp linux-2.6.11.3/arch/i386/kernel/mpparse.c linux-2.6.11.3-legacy/arch/i386/kernel/mpparse.c --- linux-2.6.11.3/arch/i386/kernel/mpparse.c 2005-03-13 01:44:19.0 -0500 +++ linux-2.6.11.3-legacy/arch/i386/kernel/mpparse.c2005-03-14 11:52:44.0 -0500 @@ -996,9 +996,9 @@ void __init mp_config_acpi_legacy_irqs ( Dprintk("Bus #%d is ISA\n", MP_ISA_BUS); /* - * ES7000 has no legacy identity mappings + * Older generations of ES7000 have no legacy identity mappings */ - if (es7000_plat) + if (es7000_plat && es7000_plat < 2) return; /* diff -Naurp linux-2.6.11.3/arch/i386/mach-es7000/es7000plat.c linux-2.6.11.3-legacy/arch/i386/mach-es7000/es7000plat.c --- linux-2.6.11.3/arch/i386/mach-es7000/es7000plat.c 2005-03-13 01:44:41.0 -0500 +++ linux-2.6.11.3-legacy/arch/i386/mach-es7000/es7000plat.c 2005-03-14 11:52:44.0 -0500 @@ -138,7 +138,14 @@ parse_unisys_oem (char *oemptr, int oem_ es7000_plat = 0; } else { printk("\nEnabling ES7000 specific features...\n"); - es7000_plat = 1; + /* + * Check to see if this is a x86_64 ES7000 machine. + */ + if (!(boot_cpu_data.x86 <= 15 && boot_cpu_data.x86_model <= 2)) + es7000_plat = 2; + else + es7000_plat = 1; + ioapic_renumber_irq = es7000_rename_gsi; } return es7000_plat; - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/