ACPI : Create "idle=nomwait" bootparam
[linux-2.6-block.git] / drivers / acpi / processor_core.c
index 9a803f85ccfe340e7c5430ea223edae4528a27bf..4e1bb89fd6c378212a4b5191524b70ebe8cc949a 100644 (file)
@@ -265,7 +265,20 @@ static int acpi_processor_set_pdc(struct acpi_processor *pr)
 
        if (!pdc_in)
                return status;
+       if (idle_nomwait) {
+               /*
+                * If mwait is disabled for CPU C-states, the C2C3_FFH access
+                * mode will be disabled in the parameter of _PDC object.
+                * Of course C1_FFH access mode will also be disabled.
+                */
+               union acpi_object *obj;
+               u32 *buffer = NULL;
 
+               obj = pdc_in->pointer;
+               buffer = (u32 *)(obj->buffer.pointer);
+               buffer[2] &= ~(ACPI_PDC_C_C2C3_FFH | ACPI_PDC_C_C1_FFH);
+
+       }
        status = acpi_evaluate_object(pr->handle, "_PDC", pdc_in, NULL);
 
        if (ACPI_FAILURE(status))