aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64/kernel/acpi.c
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2005-07-12 17:21:56 -0400
committerLen Brown <len.brown@intel.com>2005-07-12 17:21:56 -0400
commit5028770a42e7bc4d15791a44c28f0ad539323807 (patch)
tree74800e35129775413c13ce7caf036ca19e3ce56c /arch/ia64/kernel/acpi.c
parent9f02d6b7b43d46a74dd385f06090104ecd0fb807 (diff)
parentd8683a0cb5d09cb7f19feefa708424a84577e68f (diff)
[ACPI] merge acpi-2.6.12 branch into latest Linux 2.6.13-rc...
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 542256e98e60..9609f243e5d0 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 };
@@ -265,10 +271,56 @@ acpi_parse_plat_int_src (
265 (plintsrc->flags.trigger == 1) ? IOSAPIC_EDGE : IOSAPIC_LEVEL); 271 (plintsrc->flags.trigger == 1) ? IOSAPIC_EDGE : IOSAPIC_LEVEL);
266 272
267 platform_intr_list[plintsrc->type] = vector; 273 platform_intr_list[plintsrc->type] = vector;
274 if (acpi_madt_rev > 1) {
275 acpi_cpei_override = plintsrc->plint_flags.cpei_override_flag;
276 }
277
278 /*
279 * Save the physical id, so we can check when its being removed
280 */
281 acpi_cpei_phys_cpuid = ((plintsrc->id << 8) | (plintsrc->eid)) & 0xffff;
282
268 return 0; 283 return 0;
269} 284}
270 285
271 286
287unsigned int can_cpei_retarget(void)
288{
289 extern int cpe_vector;
290
291 /*
292 * Only if CPEI is supported and the override flag
293 * is present, otherwise return that its re-targettable
294 * if we are in polling mode.
295 */
296 if (cpe_vector > 0 && !acpi_cpei_override)
297 return 0;
298 else
299 return 1;
300}
301
302unsigned int is_cpu_cpei_target(unsigned int cpu)
303{
304 unsigned int logical_id;
305
306 logical_id = cpu_logical_id(acpi_cpei_phys_cpuid);
307
308 if (logical_id == cpu)
309 return 1;
310 else
311 return 0;
312}
313
314void set_cpei_target_cpu(unsigned int cpu)
315{
316 acpi_cpei_phys_cpuid = cpu_physical_id(cpu);
317}
318
319unsigned int get_cpei_target_cpu(void)
320{
321 return acpi_cpei_phys_cpuid;
322}
323
272static int __init 324static int __init
273acpi_parse_int_src_ovr ( 325acpi_parse_int_src_ovr (
274 acpi_table_entry_header *header, const unsigned long end) 326 acpi_table_entry_header *header, const unsigned long end)
@@ -326,6 +378,8 @@ acpi_parse_madt (unsigned long phys_addr, unsigned long size)
326 378
327 acpi_madt = (struct acpi_table_madt *) __va(phys_addr); 379 acpi_madt = (struct acpi_table_madt *) __va(phys_addr);
328 380
381 acpi_madt_rev = acpi_madt->header.revision;
382
329 /* remember the value for reference after free_initmem() */ 383 /* remember the value for reference after free_initmem() */
330#ifdef CONFIG_ITANIUM 384#ifdef CONFIG_ITANIUM
331 has_8259 = 1; /* Firmware on old Itanium systems is broken */ 385 has_8259 = 1; /* Firmware on old Itanium systems is broken */