aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/ia64/kernel/acpi.c54
-rw-r--r--arch/ia64/kernel/mca.c2
-rw-r--r--arch/ia64/kernel/topology.c7
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);
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 */
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
274static int cpe_vector = -1; 274int cpe_vector = -1;
275 275
276static irqreturn_t 276static irqreturn_t
277ia64_mca_cpe_int_handler (int cpe_irq, void *arg, struct pt_regs *ptregs) 277ia64_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