]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - arch/x86/kernel/apic/x2apic_uv_x.c
Merge branches 'pm-core', 'pm-qos', 'pm-domains' and 'pm-opp'
[linux.git] / arch / x86 / kernel / apic / x2apic_uv_x.c
index 656994ac46778f62a5debabf5bb19223002b2991..e9f8f8cdd57085db85dee8247b67150250308a42 100644 (file)
@@ -42,6 +42,7 @@
 DEFINE_PER_CPU(int, x2apic_extra_bits);
 
 static enum uv_system_type     uv_system_type;
+static bool                    uv_hubless_system;
 static u64                     gru_start_paddr, gru_end_paddr;
 static u64                     gru_dist_base, gru_first_node_paddr = -1LL, gru_last_node_paddr;
 static u64                     gru_dist_lmask, gru_dist_umask;
@@ -225,8 +226,14 @@ static int __init uv_acpi_madt_oem_check(char *oem_id, char *oem_table_id)
        int pnodeid;
        int uv_apic;
 
-       if (strncmp(oem_id, "SGI", 3) != 0)
+       if (strncmp(oem_id, "SGI", 3) != 0) {
+               if (strncmp(oem_id, "NSGI", 4) == 0) {
+                       uv_hubless_system = true;
+                       pr_info("UV: OEM IDs %s/%s, HUBLESS\n",
+                               oem_id, oem_table_id);
+               }
                return 0;
+       }
 
        if (numa_off) {
                pr_err("UV: NUMA is off, disabling UV support\n");
@@ -300,6 +307,12 @@ int is_uv_system(void)
 }
 EXPORT_SYMBOL_GPL(is_uv_system);
 
+int is_uv_hubless(void)
+{
+       return uv_hubless_system;
+}
+EXPORT_SYMBOL_GPL(is_uv_hubless);
+
 void **__uv_hub_info_list;
 EXPORT_SYMBOL_GPL(__uv_hub_info_list);
 
@@ -1353,7 +1366,7 @@ static void __init build_socket_tables(void)
        }
 }
 
-void __init uv_system_init(void)
+static void __init uv_system_init_hub(void)
 {
        struct uv_hub_info_s hub_info = {0};
        int bytes, cpu, nodeid;
@@ -1490,4 +1503,19 @@ void __init uv_system_init(void)
                reboot_type = BOOT_ACPI;
 }
 
+/*
+ * There is a small amount of UV specific code needed to initialize a
+ * UV system that does not have a "UV HUB" (referred to as "hubless").
+ */
+void __init uv_system_init(void)
+{
+       if (likely(!is_uv_system() && !is_uv_hubless()))
+               return;
+
+       if (is_uv_system())
+               uv_system_init_hub();
+       else
+               uv_nmi_setup_hubless();
+}
+
 apic_driver(apic_x2apic_uv_x);