aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/kernel/acpi/boot.c4
-rw-r--r--arch/x86/kernel/genapic_64.c25
-rw-r--r--include/asm-x86/genapic_32.h5
-rw-r--r--include/asm-x86/genapic_64.h5
4 files changed, 36 insertions, 3 deletions
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
index e277c370246d..05878ac934db 100644
--- a/arch/x86/kernel/acpi/boot.c
+++ b/arch/x86/kernel/acpi/boot.c
@@ -56,9 +56,7 @@ EXPORT_SYMBOL(acpi_disabled);
56#ifdef CONFIG_X86_64 56#ifdef CONFIG_X86_64
57 57
58#include <asm/proto.h> 58#include <asm/proto.h>
59 59#include <asm/genapic.h>
60static inline int acpi_madt_oem_check(char *oem_id, char *oem_table_id) { return 0; }
61
62 60
63#else /* X86 */ 61#else /* X86 */
64 62
diff --git a/arch/x86/kernel/genapic_64.c b/arch/x86/kernel/genapic_64.c
index 4ae7b6440260..c873f60c74a6 100644
--- a/arch/x86/kernel/genapic_64.c
+++ b/arch/x86/kernel/genapic_64.c
@@ -33,6 +33,8 @@ EXPORT_PER_CPU_SYMBOL(x86_cpu_to_apicid);
33 33
34struct genapic __read_mostly *genapic = &apic_flat; 34struct genapic __read_mostly *genapic = &apic_flat;
35 35
36static enum uv_system_type uv_system_type;
37
36/* 38/*
37 * Check the APIC IDs in bios_cpu_apicid and choose the APIC mode. 39 * Check the APIC IDs in bios_cpu_apicid and choose the APIC mode.
38 */ 40 */
@@ -64,3 +66,26 @@ void send_IPI_self(int vector)
64{ 66{
65 __send_IPI_shortcut(APIC_DEST_SELF, vector, APIC_DEST_PHYSICAL); 67 __send_IPI_shortcut(APIC_DEST_SELF, vector, APIC_DEST_PHYSICAL);
66} 68}
69
70int __init acpi_madt_oem_check(char *oem_id, char *oem_table_id)
71{
72 if (!strcmp(oem_id, "SGI")) {
73 if (!strcmp(oem_table_id, "UVL"))
74 uv_system_type = UV_LEGACY_APIC;
75 else if (!strcmp(oem_table_id, "UVX"))
76 uv_system_type = UV_X2APIC;
77 else if (!strcmp(oem_table_id, "UVH"))
78 uv_system_type = UV_NON_UNIQUE_APIC;
79 }
80 return 0;
81}
82
83enum uv_system_type get_uv_system_type(void)
84{
85 return uv_system_type;
86}
87
88int is_uv_system(void)
89{
90 return uv_system_type != UV_NONE;
91}
diff --git a/include/asm-x86/genapic_32.h b/include/asm-x86/genapic_32.h
index 5fa893dce729..f1b96932746b 100644
--- a/include/asm-x86/genapic_32.h
+++ b/include/asm-x86/genapic_32.h
@@ -114,4 +114,9 @@ struct genapic {
114 114
115extern struct genapic *genapic; 115extern struct genapic *genapic;
116 116
117enum uv_system_type {UV_NONE, UV_LEGACY_APIC, UV_X2APIC, UV_NON_UNIQUE_APIC};
118#define get_uv_system_type() UV_NONE
119#define is_uv_system() 0
120
121
117#endif 122#endif
diff --git a/include/asm-x86/genapic_64.h b/include/asm-x86/genapic_64.h
index d7e516ccbaa4..914815c28ae5 100644
--- a/include/asm-x86/genapic_64.h
+++ b/include/asm-x86/genapic_64.h
@@ -33,5 +33,10 @@ extern struct genapic *genapic;
33 33
34extern struct genapic apic_flat; 34extern struct genapic apic_flat;
35extern struct genapic apic_physflat; 35extern struct genapic apic_physflat;
36extern int acpi_madt_oem_check(char *, char *);
37
38enum uv_system_type {UV_NONE, UV_LEGACY_APIC, UV_X2APIC, UV_NON_UNIQUE_APIC};
39extern enum uv_system_type get_uv_system_type(void);
40extern int is_uv_system(void);
36 41
37#endif 42#endif