diff options
| author | Martin J. Bligh <martin.bligh@us.ibm.com> | 2002-10-15 05:38:02 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.transmeta.com> | 2002-10-15 05:38:02 -0700 |
| commit | 8d7dfcd0aa8047e39cd67a051568aec14326e28e (patch) | |
| tree | 15659c67a7ae6a132b7f44f35185750264b98a6f | |
| parent | f0175f7fa5d8bad9567f4bbbac37aa34a0bbe408 (diff) | |
[PATCH] Summit: MPS table detection
Adds detection for summit machines from the MPS tables.
Prints a handy-dandy debug message telling you what kind of twisted
machine the kernel thinks you have.
| -rw-r--r-- | arch/i386/kernel/mpparse.c | 13 | ||||
| -rw-r--r-- | arch/i386/mach-generic/mach_apic.h | 10 | ||||
| -rw-r--r-- | arch/i386/mach-summit/mach_apic.h | 12 |
3 files changed, 32 insertions, 3 deletions
diff --git a/arch/i386/kernel/mpparse.c b/arch/i386/kernel/mpparse.c index 2f6f8b504523..0768f1f09941 100644 --- a/arch/i386/kernel/mpparse.c +++ b/arch/i386/kernel/mpparse.c @@ -30,6 +30,7 @@ #include <asm/mpspec.h> #include <asm/pgalloc.h> #include <asm/io_apic.h> +#include "mach_apic.h" /* Have we found an MP table */ int smp_found_config; @@ -69,6 +70,8 @@ static unsigned int __initdata num_processors; /* Bitmask of physically existing CPUs */ unsigned long phys_cpu_present_map; +int summit_x86 = 0; + /* * Intel MP BIOS table parsing routines: */ @@ -356,6 +359,7 @@ static void __init smp_read_mpc_oem(struct mp_config_oemtable *oemtable, \ static int __init smp_read_mpc(struct mp_config_table *mpc) { char str[16]; + char oem[10]; int count=sizeof(*mpc); unsigned char *mpt=((unsigned char *)mpc)+count; @@ -380,14 +384,16 @@ static int __init smp_read_mpc(struct mp_config_table *mpc) printk(KERN_ERR "SMP mptable: null local APIC address!\n"); return 0; } - memcpy(str,mpc->mpc_oem,8); - str[8]=0; - printk("OEM ID: %s ",str); + memcpy(oem,mpc->mpc_oem,8); + oem[8]=0; + printk("OEM ID: %s ",oem); memcpy(str,mpc->mpc_productid,12); str[12]=0; printk("Product ID: %s ",str); + summit_check(oem, str); + printk("APIC at: 0x%lX\n",mpc->mpc_lapic); /* @@ -465,6 +471,7 @@ static int __init smp_read_mpc(struct mp_config_table *mpc) } ++mpc_record; } + clustered_apic_check(); if (!num_processors) printk(KERN_ERR "SMP mptable: no processors registered!\n"); return num_processors; diff --git a/arch/i386/mach-generic/mach_apic.h b/arch/i386/mach-generic/mach_apic.h index ea38d35c8ded..6b3dd2e232cc 100644 --- a/arch/i386/mach-generic/mach_apic.h +++ b/arch/i386/mach-generic/mach_apic.h @@ -20,4 +20,14 @@ static inline unsigned long calculate_ldr(unsigned long old) #define APIC_BROADCAST_ID 0x0F #define check_apicid_used(bitmap, apicid) (bitmap & (1 << apicid)) +static inline void summit_check(char *oem, char *productid) +{ +} + +static inline void clustered_apic_check(void) +{ + printk("Enabling APIC mode: %s. Using %d I/O APICs\n", + (clustered_apic_mode ? "NUMA-Q" : "Flat"), nr_ioapics); +} + #endif /* __ASM_MACH_APIC_H */ diff --git a/arch/i386/mach-summit/mach_apic.h b/arch/i386/mach-summit/mach_apic.h index 5b2a6999c968..0c21ed845c1a 100644 --- a/arch/i386/mach-summit/mach_apic.h +++ b/arch/i386/mach-summit/mach_apic.h @@ -26,4 +26,16 @@ static inline unsigned long calculate_ldr(unsigned long old) #define APIC_BROADCAST_ID (x86_summit ? 0xFF : 0x0F) #define check_apicid_used(bitmap, apicid) (0) +static inline void summit_check(char *oem, char *productid) +{ + if (!strncmp(oem, "IBM ENSW", 8) && !strncmp(str, "VIGIL SMP", 9)) + x86_summit = 1; +} + +static inline void clustered_apic_check(void) +{ + printk("Enabling APIC mode: %s. Using %d I/O APICs\n", + (x86_summit ? "Summit" : "Flat"), nr_ioapics); +} + #endif /* __ASM_MACH_APIC_H */ |
