aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/genx2apic_uv_x.c
diff options
context:
space:
mode:
authorYinghai Lu <yhlu.kernel@gmail.com>2008-07-22 01:08:21 -0400
committerIngo Molnar <mingo@elte.hu>2008-07-22 03:09:15 -0400
commit1b9b89e7f163336ad84200b66a17284dbf26aced (patch)
treee5f84e8c4e63de6029c38d10c979054014599874 /arch/x86/kernel/genx2apic_uv_x.c
parent76c3bb15d6786a0b8da0ad0090e0c9c3672fc08b (diff)
x86: add apic probe for genapic 64bit, v2
introducing an APIC handling probing abstraction: static struct genapic *apic_probe[] __initdata = { &apic_x2apic_uv_x, &apic_x2apic_phys, &apic_x2apic_cluster, &apic_physflat, NULL, }; This way we can remove UV, x2apic specific code from genapic_64.c and move them to their specific genapic files. [ v2: fix compiling when CONFIG_ACPI is not set ] Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Cc: Jack Steiner <steiner@sgi.com> Cc: Suresh Siddha <suresh.b.siddha@intel.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/genx2apic_uv_x.c')
-rw-r--r--arch/x86/kernel/genx2apic_uv_x.c32
1 files changed, 31 insertions, 1 deletions
diff --git a/arch/x86/kernel/genx2apic_uv_x.c b/arch/x86/kernel/genx2apic_uv_x.c
index a8e5cb4c4d43..a882bc3a2ce9 100644
--- a/arch/x86/kernel/genx2apic_uv_x.c
+++ b/arch/x86/kernel/genx2apic_uv_x.c
@@ -27,6 +27,33 @@
27#include <asm/uv/uv_hub.h> 27#include <asm/uv/uv_hub.h>
28#include <asm/uv/bios.h> 28#include <asm/uv/bios.h>
29 29
30static enum uv_system_type uv_system_type;
31
32static int __init uv_acpi_madt_oem_check(char *oem_id, char *oem_table_id)
33{
34 if (!strcmp(oem_id, "SGI")) {
35 if (!strcmp(oem_table_id, "UVL"))
36 uv_system_type = UV_LEGACY_APIC;
37 else if (!strcmp(oem_table_id, "UVX"))
38 uv_system_type = UV_X2APIC;
39 else if (!strcmp(oem_table_id, "UVH")) {
40 uv_system_type = UV_NON_UNIQUE_APIC;
41 return 1;
42 }
43 }
44 return 0;
45}
46
47enum uv_system_type get_uv_system_type(void)
48{
49 return uv_system_type;
50}
51
52int is_uv_system(void)
53{
54 return uv_system_type != UV_NONE;
55}
56
30DEFINE_PER_CPU(struct uv_hub_info_s, __uv_hub_info); 57DEFINE_PER_CPU(struct uv_hub_info_s, __uv_hub_info);
31EXPORT_PER_CPU_SYMBOL_GPL(__uv_hub_info); 58EXPORT_PER_CPU_SYMBOL_GPL(__uv_hub_info);
32 59
@@ -153,7 +180,7 @@ static unsigned int get_apic_id(unsigned long x)
153 return id; 180 return id;
154} 181}
155 182
156static long set_apic_id(unsigned int id) 183static unsigned long set_apic_id(unsigned int id)
157{ 184{
158 unsigned long x; 185 unsigned long x;
159 186
@@ -182,6 +209,7 @@ static void uv_send_IPI_self(int vector)
182 209
183struct genapic apic_x2apic_uv_x = { 210struct genapic apic_x2apic_uv_x = {
184 .name = "UV large system", 211 .name = "UV large system",
212 .acpi_madt_oem_check = uv_acpi_madt_oem_check,
185 .int_delivery_mode = dest_Fixed, 213 .int_delivery_mode = dest_Fixed,
186 .int_dest_mode = (APIC_DEST_PHYSICAL != 0), 214 .int_dest_mode = (APIC_DEST_PHYSICAL != 0),
187 .target_cpus = uv_target_cpus, 215 .target_cpus = uv_target_cpus,
@@ -433,3 +461,5 @@ void __cpuinit uv_cpu_init(void)
433 if (get_uv_system_type() == UV_NON_UNIQUE_APIC) 461 if (get_uv_system_type() == UV_NON_UNIQUE_APIC)
434 set_x2apic_extra_bits(uv_hub_info->pnode); 462 set_x2apic_extra_bits(uv_hub_info->pnode);
435} 463}
464
465