diff options
author | Yinghai Lu <yhlu.kernel@gmail.com> | 2008-07-22 01:08:21 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-22 03:09:15 -0400 |
commit | 1b9b89e7f163336ad84200b66a17284dbf26aced (patch) | |
tree | e5f84e8c4e63de6029c38d10c979054014599874 /arch/x86/kernel/genx2apic_uv_x.c | |
parent | 76c3bb15d6786a0b8da0ad0090e0c9c3672fc08b (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.c | 32 |
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 | ||
30 | static enum uv_system_type uv_system_type; | ||
31 | |||
32 | static 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 | |||
47 | enum uv_system_type get_uv_system_type(void) | ||
48 | { | ||
49 | return uv_system_type; | ||
50 | } | ||
51 | |||
52 | int is_uv_system(void) | ||
53 | { | ||
54 | return uv_system_type != UV_NONE; | ||
55 | } | ||
56 | |||
30 | DEFINE_PER_CPU(struct uv_hub_info_s, __uv_hub_info); | 57 | DEFINE_PER_CPU(struct uv_hub_info_s, __uv_hub_info); |
31 | EXPORT_PER_CPU_SYMBOL_GPL(__uv_hub_info); | 58 | EXPORT_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 | ||
156 | static long set_apic_id(unsigned int id) | 183 | static 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 | ||
183 | struct genapic apic_x2apic_uv_x = { | 210 | struct 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 | |||