diff options
author | Jack Steiner <steiner@sgi.com> | 2008-03-28 15:12:06 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-04-17 11:41:33 -0400 |
commit | ae261868658773538ddda829c50224e5851c2342 (patch) | |
tree | c6176e3c2bffae7307f32900a723e49efb2d6246 /arch/x86/kernel/genapic_64.c | |
parent | 05f2d12c3563dea8c81b301f9f3cf7919af23b13 (diff) |
x86: add functions to determine if platform is a UV platform
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>
Diffstat (limited to 'arch/x86/kernel/genapic_64.c')
-rw-r--r-- | arch/x86/kernel/genapic_64.c | 25 |
1 files changed, 25 insertions, 0 deletions
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 | ||
34 | struct genapic __read_mostly *genapic = &apic_flat; | 34 | struct genapic __read_mostly *genapic = &apic_flat; |
35 | 35 | ||
36 | static 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 | |||
70 | int __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 | |||
83 | enum uv_system_type get_uv_system_type(void) | ||
84 | { | ||
85 | return uv_system_type; | ||
86 | } | ||
87 | |||
88 | int is_uv_system(void) | ||
89 | { | ||
90 | return uv_system_type != UV_NONE; | ||
91 | } | ||