diff options
-rw-r--r-- | arch/x86/include/asm/uv/uv.h | 2 | ||||
-rw-r--r-- | arch/x86/kernel/apic/x2apic_uv_x.c | 30 |
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 | ||
11 | extern enum uv_system_type get_uv_system_type(void); | 11 | extern enum uv_system_type get_uv_system_type(void); |
12 | extern int is_uv_system(void); | 12 | extern int is_uv_system(void); |
13 | extern int is_uv_hubless(void); | ||
13 | extern void uv_cpu_init(void); | 14 | extern void uv_cpu_init(void); |
14 | extern void uv_nmi_init(void); | 15 | extern void uv_nmi_init(void); |
15 | extern void uv_system_init(void); | 16 | extern void uv_system_init(void); |
@@ -23,6 +24,7 @@ extern const struct cpumask *uv_flush_tlb_others(const struct cpumask *cpumask, | |||
23 | 24 | ||
24 | static inline enum uv_system_type get_uv_system_type(void) { return UV_NONE; } | 25 | static inline enum uv_system_type get_uv_system_type(void) { return UV_NONE; } |
25 | static inline int is_uv_system(void) { return 0; } | 26 | static inline int is_uv_system(void) { return 0; } |
27 | static inline int is_uv_hubless(void) { return 0; } | ||
26 | static inline void uv_cpu_init(void) { } | 28 | static inline void uv_cpu_init(void) { } |
27 | static inline void uv_system_init(void) { } | 29 | static inline void uv_system_init(void) { } |
28 | static inline const struct cpumask * | 30 | static 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 @@ | |||
42 | DEFINE_PER_CPU(int, x2apic_extra_bits); | 42 | DEFINE_PER_CPU(int, x2apic_extra_bits); |
43 | 43 | ||
44 | static enum uv_system_type uv_system_type; | 44 | static enum uv_system_type uv_system_type; |
45 | static bool uv_hubless_system; | ||
45 | static u64 gru_start_paddr, gru_end_paddr; | 46 | static u64 gru_start_paddr, gru_end_paddr; |
46 | static u64 gru_dist_base, gru_first_node_paddr = -1LL, gru_last_node_paddr; | 47 | static u64 gru_dist_base, gru_first_node_paddr = -1LL, gru_last_node_paddr; |
47 | static u64 gru_dist_lmask, gru_dist_umask; | 48 | 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) | |||
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 | } |
301 | EXPORT_SYMBOL_GPL(is_uv_system); | 308 | EXPORT_SYMBOL_GPL(is_uv_system); |
302 | 309 | ||
310 | int is_uv_hubless(void) | ||
311 | { | ||
312 | return uv_hubless_system; | ||
313 | } | ||
314 | EXPORT_SYMBOL_GPL(is_uv_hubless); | ||
315 | |||
303 | void **__uv_hub_info_list; | 316 | void **__uv_hub_info_list; |
304 | EXPORT_SYMBOL_GPL(__uv_hub_info_list); | 317 | EXPORT_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 | ||
1356 | void __init uv_system_init(void) | 1369 | static 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 | */ | ||
1510 | void __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 | |||
1493 | apic_driver(apic_x2apic_uv_x); | 1519 | apic_driver(apic_x2apic_uv_x); |