Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
[sfrench/cifs-2.6.git] / arch / ia64 / kernel / acpi.c
index a99b0cc92881919a976fabdb02ca3274e8e449e7..00b5d08f6da8d67da2f67c9506d1164e72e7e0a7 100644 (file)
@@ -67,7 +67,10 @@ EXPORT_SYMBOL(pm_power_off);
 unsigned int acpi_cpei_override;
 unsigned int acpi_cpei_phys_cpuid;
 
-const char *acpi_get_sysname(void)
+unsigned long acpi_wakeup_address = 0;
+
+const char __init *
+acpi_get_sysname(void)
 {
 #ifdef CONFIG_IA64_GENERIC
        unsigned long rsdp_phys;
@@ -602,6 +605,9 @@ EXPORT_SYMBOL(acpi_register_gsi);
 
 void acpi_unregister_gsi(u32 gsi)
 {
+       if (acpi_irq_model == ACPI_IRQ_MODEL_PLATFORM)
+               return;
+
        iosapic_unregister_intr(gsi);
 }
 
@@ -648,7 +654,7 @@ int __init acpi_boot_init(void)
         * information -- the successor to MPS tables.
         */
 
-       if (acpi_table_parse(ACPI_SIG_MADT, acpi_parse_madt) < 1) {
+       if (acpi_table_parse(ACPI_SIG_MADT, acpi_parse_madt)) {
                printk(KERN_ERR PREFIX "Can't find MADT\n");
                goto skip_madt;
        }
@@ -672,9 +678,11 @@ int __init acpi_boot_init(void)
        /* I/O APIC */
 
        if (acpi_table_parse_madt
-           (ACPI_MADT_TYPE_IO_SAPIC, acpi_parse_iosapic, NR_IOSAPICS) < 1)
-               printk(KERN_ERR PREFIX
-                      "Error parsing MADT - no IOSAPIC entries\n");
+           (ACPI_MADT_TYPE_IO_SAPIC, acpi_parse_iosapic, NR_IOSAPICS) < 1) {
+               if (!ia64_platform_is("sn2"))
+                       printk(KERN_ERR PREFIX
+                              "Error parsing MADT - no IOSAPIC entries\n");
+       }
 
        /* System-Level Interrupt Routing */
 
@@ -699,7 +707,7 @@ int __init acpi_boot_init(void)
         * gets interrupts such as power and sleep buttons.  If it's not
         * on a Legacy interrupt, it needs to be setup.
         */
-       if (acpi_table_parse(ACPI_SIG_FADT, acpi_parse_fadt) < 1)
+       if (acpi_table_parse(ACPI_SIG_FADT, acpi_parse_fadt))
                printk(KERN_ERR PREFIX "Can't find FADT\n");
 
 #ifdef CONFIG_SMP
@@ -735,16 +743,15 @@ int __init acpi_boot_init(void)
 
 int acpi_gsi_to_irq(u32 gsi, unsigned int *irq)
 {
-       int vector;
+       int tmp;
 
        if (has_8259 && gsi < 16)
                *irq = isa_irq_to_vector(gsi);
        else {
-               vector = gsi_to_vector(gsi);
-               if (vector == -1)
+               tmp = gsi_to_irq(gsi);
+               if (tmp == -1)
                        return -1;
-
-               *irq = vector;
+               *irq = tmp;
        }
        return 0;
 }
@@ -788,7 +795,7 @@ static __init int setup_additional_cpus(char *s)
 early_param("additional_cpus", setup_additional_cpus);
 
 /*
- * cpu_possible_map should be static, it cannot change as cpu's
+ * cpu_possible_map should be static, it cannot change as CPUs
  * are onlined, or offlined. The reason is per-cpu data-structures
  * are allocated by some modules at init time, and dont expect to
  * do this dynamically on cpu arrival/departure.
@@ -853,7 +860,7 @@ int acpi_map_lsapic(acpi_handle handle, int *pcpu)
        lsapic = (struct acpi_madt_local_sapic *)obj->buffer.pointer;
 
        if ((lsapic->header.type != ACPI_MADT_TYPE_LOCAL_SAPIC) ||
-           (!lsapic->lapic_flags & ACPI_MADT_ENABLED)) {
+           (!(lsapic->lapic_flags & ACPI_MADT_ENABLED))) {
                kfree(buffer.pointer);
                return -EINVAL;
        }
@@ -982,4 +989,21 @@ int acpi_unregister_ioapic(acpi_handle handle, u32 gsi_base)
 
 EXPORT_SYMBOL(acpi_unregister_ioapic);
 
+/*
+ * acpi_save_state_mem() - save kernel state
+ *
+ * TBD when when IA64 starts to support suspend...
+ */
+int acpi_save_state_mem(void) { return 0; } 
+
+/*
+ * acpi_restore_state()
+ */
+void acpi_restore_state_mem(void) {}
+
+/*
+ * do_suspend_lowlevel()
+ */
+void do_suspend_lowlevel(void) {}
+
 #endif                         /* CONFIG_ACPI */