]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/acpi/processor_perflib.c
Merge branch 'v28-range-hrtimers-for-linus-v2' of git://git.kernel.org/pub/scm/linux...
[linux-2.6-omap-h63xx.git] / drivers / acpi / processor_perflib.c
index 80c251ec6d2aac7dff658a9c6df5fec5733bc168..dc98f7a6f2c49bfb701716f330fc70dff13012a5 100644 (file)
@@ -38,6 +38,7 @@
 
 #include <asm/uaccess.h>
 #endif
+#include <asm/cpufeature.h>
 
 #include <acpi/acpi_bus.h>
 #include <acpi/processor.h>
@@ -126,7 +127,7 @@ static struct notifier_block acpi_ppc_notifier_block = {
 static int acpi_processor_get_platform_limit(struct acpi_processor *pr)
 {
        acpi_status status = 0;
-       unsigned long ppc = 0;
+       unsigned long long ppc = 0;
 
 
        if (!pr)
@@ -334,7 +335,6 @@ static int acpi_processor_get_performance_info(struct acpi_processor *pr)
        acpi_status status = AE_OK;
        acpi_handle handle = NULL;
 
-
        if (!pr || !pr->performance || !pr->handle)
                return -EINVAL;
 
@@ -347,13 +347,25 @@ static int acpi_processor_get_performance_info(struct acpi_processor *pr)
 
        result = acpi_processor_get_performance_control(pr);
        if (result)
-               return result;
+               goto update_bios;
 
        result = acpi_processor_get_performance_states(pr);
        if (result)
-               return result;
+               goto update_bios;
 
        return 0;
+
+       /*
+        * Having _PPC but missing frequencies (_PSS, _PCT) is a very good hint that
+        * the BIOS is older than the CPU and does not know its frequencies
+        */
+ update_bios:
+       if (ACPI_SUCCESS(acpi_get_handle(pr->handle, "_PPC", &handle))){
+               if(boot_cpu_has(X86_FEATURE_EST))
+                       printk(KERN_WARNING FW_BUG "BIOS needs update for CPU "
+                              "frequency support\n");
+       }
+       return result;
 }
 
 int acpi_processor_notify_smm(struct module *calling_module)
@@ -524,13 +536,13 @@ static int acpi_processor_get_psd(struct acpi_processor   *pr)
 
        psd = buffer.pointer;
        if (!psd || (psd->type != ACPI_TYPE_PACKAGE)) {
-               ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid _PSD data\n"));
+               printk(KERN_ERR PREFIX "Invalid _PSD data\n");
                result = -EFAULT;
                goto end;
        }
 
        if (psd->package.count != 1) {
-               ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid _PSD data\n"));
+               printk(KERN_ERR PREFIX "Invalid _PSD data\n");
                result = -EFAULT;
                goto end;
        }
@@ -543,19 +555,19 @@ static int acpi_processor_get_psd(struct acpi_processor   *pr)
        status = acpi_extract_package(&(psd->package.elements[0]),
                &format, &state);
        if (ACPI_FAILURE(status)) {
-               ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid _PSD data\n"));
+               printk(KERN_ERR PREFIX "Invalid _PSD data\n");
                result = -EFAULT;
                goto end;
        }
 
        if (pdomain->num_entries != ACPI_PSD_REV0_ENTRIES) {
-               ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Unknown _PSD:num_entries\n"));
+               printk(KERN_ERR PREFIX "Unknown _PSD:num_entries\n");
                result = -EFAULT;
                goto end;
        }
 
        if (pdomain->revision != ACPI_PSD_REV0_REVISION) {
-               ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Unknown _PSD:revision\n"));
+               printk(KERN_ERR PREFIX "Unknown _PSD:revision\n");
                result = -EFAULT;
                goto end;
        }