]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/acpi/processor_idle.c
s390: cio: Delay uevents for subchannels
[linux-2.6-omap-h63xx.git] / drivers / acpi / processor_idle.c
index 8206fc1ecc580621a8fd5195b823829765f4492c..cdf78943af4db915f1a54da4285cbca2cc1c42ac 100644 (file)
 #include <asm/apic.h>
 #endif
 
+/*
+ * Include the apic definitions for x86 to have the APIC timer related defines
+ * available also for UP (on SMP it gets magically included via linux/smp.h).
+ */
+#ifdef CONFIG_X86
+#include <asm/apic.h>
+#endif
+
 #include <asm/io.h>
 #include <asm/uaccess.h>
 
@@ -59,9 +67,8 @@
 
 #define ACPI_PROCESSOR_COMPONENT        0x01000000
 #define ACPI_PROCESSOR_CLASS            "processor"
-#define ACPI_PROCESSOR_DRIVER_NAME      "ACPI Processor Driver"
 #define _COMPONENT              ACPI_PROCESSOR_COMPONENT
-ACPI_MODULE_NAME("acpi_processor")
+ACPI_MODULE_NAME("processor_idle");
 #define ACPI_PROCESSOR_FILE_POWER      "power"
 #define US_TO_PM_TIMER_TICKS(t)                ((t * (PM_TIMER_FREQUENCY/1000)) / 1000)
 #define C2_OVERHEAD                    4       /* 1us (3.579 ticks per us) */
@@ -261,6 +268,7 @@ static void acpi_timer_check_state(int state, struct acpi_processor *pr,
                                   struct acpi_processor_cx *cx)
 {
        struct acpi_processor_power *pwr = &pr->power;
+       u8 type = local_apic_timer_c2_ok ? ACPI_STATE_C3 : ACPI_STATE_C2;
 
        /*
         * Check, if one of the previous states already marked the lapic
@@ -269,7 +277,7 @@ static void acpi_timer_check_state(int state, struct acpi_processor *pr,
        if (pwr->timer_broadcast_on_state < state)
                return;
 
-       if (cx->type >= ACPI_STATE_C2)
+       if (cx->type >= type)
                pr->power.timer_broadcast_on_state = state;
 }