diff options
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/process.c | 1 | ||||
| -rw-r--r-- | arch/ia64/kernel/setup.c | 3 | ||||
| -rw-r--r-- | arch/ia64/kernel/topology.c | 7 |
5 files changed, 66 insertions, 1 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); | |||
| 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 }; |
| @@ -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 | ||
| 287 | unsigned 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 | |||
| 302 | unsigned 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 | |||
| 314 | void set_cpei_target_cpu(unsigned int cpu) | ||
| 315 | { | ||
| 316 | acpi_cpei_phys_cpuid = cpu_physical_id(cpu); | ||
| 317 | } | ||
| 318 | |||
| 319 | unsigned int get_cpei_target_cpu(void) | ||
| 320 | { | ||
| 321 | return acpi_cpei_phys_cpuid; | ||
| 322 | } | ||
| 323 | |||
| 272 | static int __init | 324 | static int __init |
| 273 | acpi_parse_int_src_ovr ( | 325 | acpi_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 */ |
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/process.c b/arch/ia64/kernel/process.c index 6e35bff05d59..e484910246ad 100644 --- a/arch/ia64/kernel/process.c +++ b/arch/ia64/kernel/process.c | |||
| @@ -196,6 +196,7 @@ update_pal_halt_status(int status) | |||
| 196 | void | 196 | void |
| 197 | default_idle (void) | 197 | default_idle (void) |
| 198 | { | 198 | { |
| 199 | local_irq_enable(); | ||
| 199 | while (!need_resched()) | 200 | while (!need_resched()) |
| 200 | if (can_do_pal_halt) | 201 | if (can_do_pal_halt) |
| 201 | safe_halt(); | 202 | safe_halt(); |
diff --git a/arch/ia64/kernel/setup.c b/arch/ia64/kernel/setup.c index 7fc891aca446..84f89da7c640 100644 --- a/arch/ia64/kernel/setup.c +++ b/arch/ia64/kernel/setup.c | |||
| @@ -41,6 +41,8 @@ | |||
| 41 | #include <linux/serial_core.h> | 41 | #include <linux/serial_core.h> |
| 42 | #include <linux/efi.h> | 42 | #include <linux/efi.h> |
| 43 | #include <linux/initrd.h> | 43 | #include <linux/initrd.h> |
| 44 | #include <linux/platform.h> | ||
| 45 | #include <linux/pm.h> | ||
| 44 | 46 | ||
| 45 | #include <asm/ia32.h> | 47 | #include <asm/ia32.h> |
| 46 | #include <asm/machvec.h> | 48 | #include <asm/machvec.h> |
| @@ -816,6 +818,7 @@ cpu_init (void) | |||
| 816 | /* size of physical stacked register partition plus 8 bytes: */ | 818 | /* size of physical stacked register partition plus 8 bytes: */ |
| 817 | __get_cpu_var(ia64_phys_stacked_size_p8) = num_phys_stacked*8 + 8; | 819 | __get_cpu_var(ia64_phys_stacked_size_p8) = num_phys_stacked*8 + 8; |
| 818 | platform_cpu_init(); | 820 | platform_cpu_init(); |
| 821 | pm_idle = default_idle; | ||
| 819 | } | 822 | } |
| 820 | 823 | ||
| 821 | void | 824 | void |
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 | ||
