]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
Merge branch 'misc' into release
authorLen Brown <len.brown@intel.com>
Fri, 9 Jan 2009 08:37:48 +0000 (03:37 -0500)
committerLen Brown <len.brown@intel.com>
Fri, 9 Jan 2009 08:37:48 +0000 (03:37 -0500)
Conflicts:
include/acpi/acpixf.h

Signed-off-by: Len Brown <len.brown@intel.com>
Documentation/kernel-parameters.txt
arch/ia64/kernel/acpi.c
arch/x86/kernel/acpi/boot.c
arch/x86/kernel/acpi/cstate.c
drivers/acpi/acpica/tbutils.c
drivers/acpi/pci_link.c
drivers/acpi/video.c
drivers/cpuidle/governors/menu.c
include/acpi/acpixf.h

index c9115c1b672c6e9eadb9ce59c2c198fea024823c..136f02842de9e2221e607ccd221389da1097b868 100644 (file)
@@ -139,6 +139,7 @@ and is between 256 and 4096 characters. It is defined in the file
                        ht -- run only enough ACPI to enable Hyper Threading
                        strict -- Be less tolerant of platforms that are not
                                strictly ACPI specification compliant.
+                       rsdt -- prefer RSDT over (default) XSDT
 
                        See also Documentation/power/pm.txt, pci=noacpi
 
index bd7acc71e8a9e4d408e50102e513bbe4a948a064..c19b686db9b8d87ed2f8930c0ef74d72e676a8be 100644 (file)
@@ -65,6 +65,7 @@ EXPORT_SYMBOL(pm_idle);
 void (*pm_power_off) (void);
 EXPORT_SYMBOL(pm_power_off);
 
+u32 acpi_rsdt_forced;
 unsigned int acpi_cpei_override;
 unsigned int acpi_cpei_phys_cpuid;
 
index de8ce79dd8818a5295c712a1dd656703026c32be..39ae3d0e3a4a7e0cf6521bbbea5bd05058e152cd 100644 (file)
@@ -47,7 +47,7 @@
 #endif
 
 static int __initdata acpi_force = 0;
-
+u32 acpi_rsdt_forced;
 #ifdef CONFIG_ACPI
 int acpi_disabled = 0;
 #else
@@ -1794,6 +1794,10 @@ static int __init parse_acpi(char *arg)
                        disable_acpi();
                acpi_ht = 1;
        }
+       /* acpi=rsdt use RSDT instead of XSDT */
+       else if (strcmp(arg, "rsdt") == 0) {
+               acpi_rsdt_forced = 1;
+       }
        /* "acpi=noirq" disables ACPI interrupt routing */
        else if (strcmp(arg, "noirq") == 0) {
                acpi_noirq_set();
index c2502eb9aa8355488a7057602bfdfa71134785a7..a4805b3b4095bd7e0b8cdb68bd73d617d423c136 100644 (file)
@@ -56,6 +56,7 @@ static struct cstate_entry *cpu_cstate_entry; /* per CPU ptr */
 static short mwait_supported[ACPI_PROCESSOR_MAX_POWER];
 
 #define MWAIT_SUBSTATE_MASK    (0xf)
+#define MWAIT_CSTATE_MASK      (0xf)
 #define MWAIT_SUBSTATE_SIZE    (4)
 
 #define CPUID_MWAIT_LEAF (5)
@@ -98,7 +99,8 @@ int acpi_processor_ffh_cstate_probe(unsigned int cpu,
        cpuid(CPUID_MWAIT_LEAF, &eax, &ebx, &ecx, &edx);
 
        /* Check whether this particular cx_type (in CST) is supported or not */
-       cstate_type = (cx->address >> MWAIT_SUBSTATE_SIZE) + 1;
+       cstate_type = ((cx->address >> MWAIT_SUBSTATE_SIZE) &
+                       MWAIT_CSTATE_MASK) + 1;
        edx_part = edx >> (cstate_type * MWAIT_SUBSTATE_SIZE);
        num_cstate_subtype = edx_part & MWAIT_SUBSTATE_MASK;
 
index 3a8d8d2eee9210ee17ce21e2892b722837152f36..9684cc827930c7e4682aab1d16ae98fcdbb12ab1 100644 (file)
@@ -445,7 +445,8 @@ acpi_tb_parse_root_table(acpi_physical_address rsdp_address, u8 flags)
 
        /* Differentiate between RSDT and XSDT root tables */
 
-       if (rsdp->revision > 1 && rsdp->xsdt_physical_address) {
+       if (rsdp->revision > 1 && rsdp->xsdt_physical_address
+                       && !acpi_rsdt_forced) {
                /*
                 * Root table is an XSDT (64-bit physical addresses). We must use the
                 * XSDT if the revision is > 1 and the XSDT pointer is present, as per
index 4869fa1b7892bf4b1b5390f410f1f2f6faebdc21..1c6e73c7865edcb4fca3dbe0f2f5964a12c22f9f 100644 (file)
@@ -796,10 +796,6 @@ static int irqrouter_resume(struct sys_device *dev)
        struct list_head *node = NULL;
        struct acpi_pci_link *link = NULL;
 
-
-       /* Make sure SCI is enabled again (Apple firmware bug?) */
-       acpi_set_register(ACPI_BITREG_SCI_ENABLE, 1);
-
        list_for_each(node, &acpi_link.entries) {
                link = list_entry(node, struct acpi_pci_link, node);
                if (!link) {
index 38bf8b43fd19eba47111b3a068444927839f3b75..f261737636da7a5550c6ac26ab3d178c6220ab9a 100644 (file)
@@ -482,6 +482,7 @@ acpi_video_device_lcd_set_level(struct acpi_video_device *device, int level)
        int status = AE_OK;
        union acpi_object arg0 = { ACPI_TYPE_INTEGER };
        struct acpi_object_list args = { 1, &arg0 };
+       int state;
 
 
        arg0.integer.value = level;
@@ -490,6 +491,10 @@ acpi_video_device_lcd_set_level(struct acpi_video_device *device, int level)
                status = acpi_evaluate_object(device->dev->handle, "_BCM",
                                              &args, NULL);
        device->brightness->curr = level;
+       for (state = 2; state < device->brightness->count; state++)
+               if (level == device->brightness->levels[state])
+                       device->backlight->props.brightness = state - 2;
+
        return status;
 }
 
index 8d7cf3f31450728ab60a3f349f2e9f88b00cfb95..f1df59f59a37710e4c0370e993ae786f2bddbc4b 100644 (file)
 #include <linux/tick.h>
 
 #define BREAK_FUZZ     4       /* 4 us */
+#define PRED_HISTORY_PCT       50
 
 struct menu_device {
        int             last_state_idx;
 
        unsigned int    expected_us;
        unsigned int    predicted_us;
+       unsigned int    current_predicted_us;
        unsigned int    last_measured_us;
        unsigned int    elapsed_us;
 };
@@ -47,6 +49,12 @@ static int menu_select(struct cpuidle_device *dev)
        data->expected_us =
                (u32) ktime_to_ns(tick_nohz_get_sleep_length()) / 1000;
 
+       /* Recalculate predicted_us based on prediction_history_pct */
+       data->predicted_us *= PRED_HISTORY_PCT;
+       data->predicted_us += (100 - PRED_HISTORY_PCT) *
+                               data->current_predicted_us;
+       data->predicted_us /= 100;
+
        /* find the deepest idle state that satisfies our constraints */
        for (i = CPUIDLE_DRIVER_STATE_START + 1; i < dev->state_count; i++) {
                struct cpuidle_state *s = &dev->states[i];
@@ -97,7 +105,7 @@ static void menu_reflect(struct cpuidle_device *dev)
                measured_us = -1;
 
        /* Predict time until next break event */
-       data->predicted_us = max(measured_us, data->last_measured_us);
+       data->current_predicted_us = max(measured_us, data->last_measured_us);
 
        if (last_idle_us + BREAK_FUZZ <
            data->expected_us - target->exit_latency) {
index 7c7074f20087ad1b7073a2f9ba54a790fcc8bb96..c8e8cf45830f6c5203f5d7e13f1531ff949d34ce 100644 (file)
@@ -70,6 +70,7 @@ extern u32 acpi_gbl_trace_flags;
 extern u32 acpi_current_gpe_count;
 extern struct acpi_table_fadt acpi_gbl_FADT;
 
+extern u32 acpi_rsdt_forced;
 /*
  * Global interfaces
  */