diff options
author | Ashok Raj <ashok.raj@intel.com> | 2005-03-31 22:51:10 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2005-07-12 00:01:41 -0400 |
commit | 55e59c511cea3c6c721971467c707e9955922bc2 (patch) | |
tree | 1dc3b66be2e71881167b7ba9259b291484567b01 /arch/ia64/kernel | |
parent | 6940fabaa35b893163b7043d0d1dc5d715f9e1ca (diff) |
[ACPI] Evaluate CPEI Processor Override flag
ACPI 3.0 added a Correctable Platform Error Interrupt (CPEI)
Processor Overide flag to MADT.Platform_Interrupt_Source.
Record the processor that was provided as hint from ACPI.
Signed-off-by: Ashok Raj <ashok.raj@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'arch/ia64/kernel')
-rw-r--r-- | arch/ia64/kernel/acpi.c | 54 | ||||
-rw-r--r-- | arch/ia64/kernel/mca.c | 2 | ||||
-rw-r--r-- | arch/ia64/kernel/topology.c | 7 |
3 files changed, 62 insertions, 1 deletions
diff --git a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c index 72dfd9e7de0f..1c118b72df3c 100644 --- a/arch/ia64/kernel/acpi.c +++ b/arch/ia64/kernel/acpi.c | |||
@@ -11,6 +11,7 @@ | |||
11 | * Copyright (C) 2001 Jenna Hall <jenna.s.hall@intel.com> | 11 | * Copyright (C) 2001 Jenna Hall <jenna.s.hall@intel.com> |
12 | * Copyright (C) 2001 Takayoshi Kochi <t-kochi@bq.jp.nec.com> | 12 | * Copyright (C) 2001 Takayoshi Kochi <t-kochi@bq.jp.nec.com> |
13 | * Copyright (C) 2002 Erich Focht <efocht@ess.nec.de> | 13 | * Copyright (C) 2002 Erich Focht <efocht@ess.nec.de> |
14 | * Copyright (C) 2004 Ashok Raj <ashok.raj@intel.com> | ||
14 | * | 15 | * |
15 | * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 16 | * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
16 | * | 17 | * |
@@ -67,6 +68,11 @@ EXPORT_SYMBOL(pm_power_off); | |||
67 | unsigned char acpi_kbd_controller_present = 1; | 68 | unsigned char acpi_kbd_controller_present = 1; |
68 | unsigned char acpi_legacy_devices; | 69 | unsigned char acpi_legacy_devices; |
69 | 70 | ||
71 | static unsigned int __initdata acpi_madt_rev; | ||
72 | |||
73 | unsigned int acpi_cpei_override; | ||
74 | unsigned int acpi_cpei_phys_cpuid; | ||
75 | |||
70 | #define MAX_SAPICS 256 | 76 | #define MAX_SAPICS 256 |
71 | u16 ia64_acpiid_to_sapicid[MAX_SAPICS] = | 77 | u16 ia64_acpiid_to_sapicid[MAX_SAPICS] = |
72 | { [0 ... MAX_SAPICS - 1] = -1 }; | 78 | { [0 ... MAX_SAPICS - 1] = -1 }; |
@@ -267,10 +273,56 @@ acpi_parse_plat_int_src ( | |||
267 | (plintsrc->flags.trigger == 1) ? IOSAPIC_EDGE : IOSAPIC_LEVEL); | 273 | (plintsrc->flags.trigger == 1) ? IOSAPIC_EDGE : IOSAPIC_LEVEL); |
268 | 274 | ||
269 | platform_intr_list[plintsrc->type] = vector; | 275 | platform_intr_list[plintsrc->type] = vector; |
276 | if (acpi_madt_rev > 1) { | ||
277 | acpi_cpei_override = plintsrc->plint_flags.cpei_override_flag; | ||
278 | } | ||
279 | |||
280 | /* | ||
281 | * Save the physical id, so we can check when its being removed | ||
282 | */ | ||
283 | acpi_cpei_phys_cpuid = ((plintsrc->id << 8) | (plintsrc->eid)) & 0xffff; | ||
284 | |||
270 | return 0; | 285 | return 0; |
271 | } | 286 | } |
272 | 287 | ||
273 | 288 | ||
289 | unsigned int can_cpei_retarget(void) | ||
290 | { | ||
291 | extern int cpe_vector; | ||
292 | |||
293 | /* | ||
294 | * Only if CPEI is supported and the override flag | ||
295 | * is present, otherwise return that its re-targettable | ||
296 | * if we are in polling mode. | ||
297 | */ | ||
298 | if (cpe_vector > 0 && !acpi_cpei_override) | ||
299 | return 0; | ||
300 | else | ||
301 | return 1; | ||
302 | } | ||
303 | |||
304 | unsigned int is_cpu_cpei_target(unsigned int cpu) | ||
305 | { | ||
306 | unsigned int logical_id; | ||
307 | |||
308 | logical_id = cpu_logical_id(acpi_cpei_phys_cpuid); | ||
309 | |||
310 | if (logical_id == cpu) | ||
311 | return 1; | ||
312 | else | ||
313 | return 0; | ||
314 | } | ||
315 | |||
316 | void set_cpei_target_cpu(unsigned int cpu) | ||
317 | { | ||
318 | acpi_cpei_phys_cpuid = cpu_physical_id(cpu); | ||
319 | } | ||
320 | |||
321 | unsigned int get_cpei_target_cpu(void) | ||
322 | { | ||
323 | return acpi_cpei_phys_cpuid; | ||
324 | } | ||
325 | |||
274 | static int __init | 326 | static int __init |
275 | acpi_parse_int_src_ovr ( | 327 | acpi_parse_int_src_ovr ( |
276 | acpi_table_entry_header *header, const unsigned long end) | 328 | acpi_table_entry_header *header, const unsigned long end) |
@@ -328,6 +380,8 @@ acpi_parse_madt (unsigned long phys_addr, unsigned long size) | |||
328 | 380 | ||
329 | acpi_madt = (struct acpi_table_madt *) __va(phys_addr); | 381 | acpi_madt = (struct acpi_table_madt *) __va(phys_addr); |
330 | 382 | ||
383 | acpi_madt_rev = acpi_madt->header.revision; | ||
384 | |||
331 | /* remember the value for reference after free_initmem() */ | 385 | /* remember the value for reference after free_initmem() */ |
332 | #ifdef CONFIG_ITANIUM | 386 | #ifdef CONFIG_ITANIUM |
333 | has_8259 = 1; /* Firmware on old Itanium systems is broken */ | 387 | has_8259 = 1; /* Firmware on old Itanium systems is broken */ |
diff --git a/arch/ia64/kernel/mca.c b/arch/ia64/kernel/mca.c index 736e328b5e61..4ebbf3974381 100644 --- a/arch/ia64/kernel/mca.c +++ b/arch/ia64/kernel/mca.c | |||
@@ -271,7 +271,7 @@ ia64_mca_log_sal_error_record(int sal_info_type) | |||
271 | 271 | ||
272 | #ifdef CONFIG_ACPI | 272 | #ifdef CONFIG_ACPI |
273 | 273 | ||
274 | static int cpe_vector = -1; | 274 | int cpe_vector = -1; |
275 | 275 | ||
276 | static irqreturn_t | 276 | static irqreturn_t |
277 | ia64_mca_cpe_int_handler (int cpe_irq, void *arg, struct pt_regs *ptregs) | 277 | ia64_mca_cpe_int_handler (int cpe_irq, void *arg, struct pt_regs *ptregs) |
diff --git a/arch/ia64/kernel/topology.c b/arch/ia64/kernel/topology.c index f1aafd4c05f9..d8030f3bd865 100644 --- a/arch/ia64/kernel/topology.c +++ b/arch/ia64/kernel/topology.c | |||
@@ -36,6 +36,13 @@ int arch_register_cpu(int num) | |||
36 | parent = &sysfs_nodes[cpu_to_node(num)]; | 36 | parent = &sysfs_nodes[cpu_to_node(num)]; |
37 | #endif /* CONFIG_NUMA */ | 37 | #endif /* CONFIG_NUMA */ |
38 | 38 | ||
39 | /* | ||
40 | * If CPEI cannot be re-targetted, and this is | ||
41 | * CPEI target, then dont create the control file | ||
42 | */ | ||
43 | if (!can_cpei_retarget() && is_cpu_cpei_target(num)) | ||
44 | sysfs_cpus[num].cpu.no_control = 1; | ||
45 | |||
39 | return register_cpu(&sysfs_cpus[num].cpu, num, parent); | 46 | return register_cpu(&sysfs_cpus[num].cpu, num, parent); |
40 | } | 47 | } |
41 | 48 | ||