]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
x86: add functions to determine if platform is a UV platform
authorJack Steiner <steiner@sgi.com>
Fri, 28 Mar 2008 19:12:06 +0000 (14:12 -0500)
committerIngo Molnar <mingo@elte.hu>
Thu, 17 Apr 2008 15:41:33 +0000 (17:41 +0200)
Add functions that can be used to determine if an x86_64
system is a SGI "UV" system. UV systems come in 3 types and
are identified by the OEM ID in the MADT.

Signed-off-by: Jack Steiner <steiner@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/acpi/boot.c
arch/x86/kernel/genapic_64.c
include/asm-x86/genapic_32.h
include/asm-x86/genapic_64.h

index e277c370246dfb773e5339ca0a54171fdeb175e4..05878ac934db404cda72b42b58508cf4b5799de6 100644 (file)
@@ -56,9 +56,7 @@ EXPORT_SYMBOL(acpi_disabled);
 #ifdef CONFIG_X86_64
 
 #include <asm/proto.h>
-
-static inline int acpi_madt_oem_check(char *oem_id, char *oem_table_id) { return 0; }
-
+#include <asm/genapic.h>
 
 #else                          /* X86 */
 
index 4ae7b64402602d98eae00f1f85b2fda1ba847cd1..c873f60c74a67b8916e0329f566968437addbd02 100644 (file)
@@ -33,6 +33,8 @@ EXPORT_PER_CPU_SYMBOL(x86_cpu_to_apicid);
 
 struct genapic __read_mostly *genapic = &apic_flat;
 
+static enum uv_system_type uv_system_type;
+
 /*
  * Check the APIC IDs in bios_cpu_apicid and choose the APIC mode.
  */
@@ -64,3 +66,26 @@ void send_IPI_self(int vector)
 {
        __send_IPI_shortcut(APIC_DEST_SELF, vector, APIC_DEST_PHYSICAL);
 }
+
+int __init acpi_madt_oem_check(char *oem_id, char *oem_table_id)
+{
+       if (!strcmp(oem_id, "SGI")) {
+               if (!strcmp(oem_table_id, "UVL"))
+                       uv_system_type = UV_LEGACY_APIC;
+               else if (!strcmp(oem_table_id, "UVX"))
+                       uv_system_type = UV_X2APIC;
+               else if (!strcmp(oem_table_id, "UVH"))
+                       uv_system_type = UV_NON_UNIQUE_APIC;
+       }
+       return 0;
+}
+
+enum uv_system_type get_uv_system_type(void)
+{
+       return uv_system_type;
+}
+
+int is_uv_system(void)
+{
+       return uv_system_type != UV_NONE;
+}
index 5fa893dce7293df361d5aa8611673b67fab0d7aa..f1b96932746be9ec9de3fd6b37d3f6b49adaf9e3 100644 (file)
@@ -114,4 +114,9 @@ struct genapic {
 
 extern struct genapic *genapic;
 
+enum uv_system_type {UV_NONE, UV_LEGACY_APIC, UV_X2APIC, UV_NON_UNIQUE_APIC};
+#define get_uv_system_type()           UV_NONE
+#define is_uv_system()                 0
+
+
 #endif
index d7e516ccbaa4d3ae54f8957750358c07ccd366d4..914815c28ae52469350701d5822474d24a34970d 100644 (file)
@@ -33,5 +33,10 @@ extern struct genapic *genapic;
 
 extern struct genapic apic_flat;
 extern struct genapic apic_physflat;
+extern int acpi_madt_oem_check(char *, char *);
+
+enum uv_system_type {UV_NONE, UV_LEGACY_APIC, UV_X2APIC, UV_NON_UNIQUE_APIC};
+extern enum uv_system_type get_uv_system_type(void);
+extern int is_uv_system(void);
 
 #endif