aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/include/asm/uv/uv.h2
-rw-r--r--arch/x86/kernel/apic/x2apic_uv_x.c30
2 files changed, 30 insertions, 2 deletions
diff --git a/arch/x86/include/asm/uv/uv.h b/arch/x86/include/asm/uv/uv.h
index 062921ef34e9..6686820feae9 100644
--- a/arch/x86/include/asm/uv/uv.h
+++ b/arch/x86/include/asm/uv/uv.h
@@ -10,6 +10,7 @@ struct mm_struct;
10 10
11extern enum uv_system_type get_uv_system_type(void); 11extern enum uv_system_type get_uv_system_type(void);
12extern int is_uv_system(void); 12extern int is_uv_system(void);
13extern int is_uv_hubless(void);
13extern void uv_cpu_init(void); 14extern void uv_cpu_init(void);
14extern void uv_nmi_init(void); 15extern void uv_nmi_init(void);
15extern void uv_system_init(void); 16extern void uv_system_init(void);
@@ -23,6 +24,7 @@ extern const struct cpumask *uv_flush_tlb_others(const struct cpumask *cpumask,
23 24
24static inline enum uv_system_type get_uv_system_type(void) { return UV_NONE; } 25static inline enum uv_system_type get_uv_system_type(void) { return UV_NONE; }
25static inline int is_uv_system(void) { return 0; } 26static inline int is_uv_system(void) { return 0; }
27static inline int is_uv_hubless(void) { return 0; }
26static inline void uv_cpu_init(void) { } 28static inline void uv_cpu_init(void) { }
27static inline void uv_system_init(void) { } 29static inline void uv_system_init(void) { }
28static inline const struct cpumask * 30static inline const struct cpumask *
diff --git a/arch/x86/kernel/apic/x2apic_uv_x.c b/arch/x86/kernel/apic/x2apic_uv_x.c
index 656994ac4677..d02cc7e65e4d 100644
--- a/arch/x86/kernel/apic/x2apic_uv_x.c
+++ b/arch/x86/kernel/apic/x2apic_uv_x.c
@@ -42,6 +42,7 @@
42DEFINE_PER_CPU(int, x2apic_extra_bits); 42DEFINE_PER_CPU(int, x2apic_extra_bits);
43 43
44static enum uv_system_type uv_system_type; 44static enum uv_system_type uv_system_type;
45static bool uv_hubless_system;
45static u64 gru_start_paddr, gru_end_paddr; 46static u64 gru_start_paddr, gru_end_paddr;
46static u64 gru_dist_base, gru_first_node_paddr = -1LL, gru_last_node_paddr; 47static u64 gru_dist_base, gru_first_node_paddr = -1LL, gru_last_node_paddr;
47static u64 gru_dist_lmask, gru_dist_umask; 48static 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)
225 int pnodeid; 226 int pnodeid;
226 int uv_apic; 227 int uv_apic;
227 228
228 if (strncmp(oem_id, "SGI", 3) != 0) 229 if (strncmp(oem_id, "SGI", 3) != 0) {
230 if (strncmp(oem_id, "NSGI", 4) == 0) {
231 uv_hubless_system = true;
232 pr_info("UV: OEM IDs %s/%s, HUBLESS\n",
233 oem_id, oem_table_id);
234 }
229 return 0; 235 return 0;
236 }
230 237
231 if (numa_off) { 238 if (numa_off) {
232 pr_err("UV: NUMA is off, disabling UV support\n"); 239 pr_err("UV: NUMA is off, disabling UV support\n");
@@ -300,6 +307,12 @@ int is_uv_system(void)
300} 307}
301EXPORT_SYMBOL_GPL(is_uv_system); 308EXPORT_SYMBOL_GPL(is_uv_system);
302 309
310int is_uv_hubless(void)
311{
312 return uv_hubless_system;
313}
314EXPORT_SYMBOL_GPL(is_uv_hubless);
315
303void **__uv_hub_info_list; 316void **__uv_hub_info_list;
304EXPORT_SYMBOL_GPL(__uv_hub_info_list); 317EXPORT_SYMBOL_GPL(__uv_hub_info_list);
305 318
@@ -1353,7 +1366,7 @@ static void __init build_socket_tables(void)
1353 } 1366 }
1354} 1367}
1355 1368
1356void __init uv_system_init(void) 1369static void __init uv_system_init_hub(void)
1357{ 1370{
1358 struct uv_hub_info_s hub_info = {0}; 1371 struct uv_hub_info_s hub_info = {0};
1359 int bytes, cpu, nodeid; 1372 int bytes, cpu, nodeid;
@@ -1490,4 +1503,17 @@ void __init uv_system_init(void)
1490 reboot_type = BOOT_ACPI; 1503 reboot_type = BOOT_ACPI;
1491} 1504}
1492 1505
1506/*
1507 * There is a small amount of UV specific code needed to initialize a
1508 * UV system that does not have a "UV HUB" (referred to as "hubless").
1509 */
1510void __init uv_system_init(void)
1511{
1512 if (likely(!is_uv_system() && !is_uv_hubless()))
1513 return;
1514
1515 if (is_uv_system())
1516 uv_system_init_hub();
1517}
1518
1493apic_driver(apic_x2apic_uv_x); 1519apic_driver(apic_x2apic_uv_x);