aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64/kernel/acpi.c
diff options
context:
space:
mode:
authorAshok Raj <ashok.raj@intel.com>2005-03-31 22:51:10 -0500
committerLen Brown <len.brown@intel.com>2005-07-12 00:01:41 -0400
commit55e59c511cea3c6c721971467c707e9955922bc2 (patch)
tree1dc3b66be2e71881167b7ba9259b291484567b01 /arch/ia64/kernel/acpi.c
parent6940fabaa35b893163b7043d0d1dc5d715f9e1ca (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/acpi.c')
-rw-r--r--arch/ia64/kernel/acpi.c54
1 files changed, 54 insertions, 0 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);
67unsigned char acpi_kbd_controller_present = 1; 68unsigned char acpi_kbd_controller_present = 1;
68unsigned char acpi_legacy_devices; 69unsigned char acpi_legacy_devices;
69 70
71static unsigned int __initdata acpi_madt_rev;
72
73unsigned int acpi_cpei_override;
74unsigned int acpi_cpei_phys_cpuid;
75
70#define MAX_SAPICS 256 76#define MAX_SAPICS 256
71u16 ia64_acpiid_to_sapicid[MAX_SAPICS] = 77u16 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
289unsigned 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
304unsigned 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
316void set_cpei_target_cpu(unsigned int cpu)
317{
318 acpi_cpei_phys_cpuid = cpu_physical_id(cpu);
319}
320
321unsigned int get_cpei_target_cpu(void)
322{
323 return acpi_cpei_phys_cpuid;
324}
325
274static int __init 326static int __init
275acpi_parse_int_src_ovr ( 327acpi_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 */