processor: nocst module parameter
PATCH 4/5 processor: nocst module parameter
Add a "nocst" module parameter which blocks _CST parsing and always uses FADT info instead.
---
drivers/acpi/processor_idle.c | 13 ++++++++++--- 1 files changed, 10 insertions(+), 3 deletions(-)
drivers/acpi/processor_idle.c +10 -3
@@ -55,7 +55,10 @@#define C3_OVERHEAD 4/* 1us (3.579 ticks per us) */ static void (*pm_idle_save)(void ); -module_param_named (max_cstate, max_cstate, uint,0644 ); +module_param (max_cstate, uint,0644 ); + +static unsigned int nocst =0 ; +module_param (nocst, uint,0000 );/* -------------------------------------------------------------------------- Power Management
@@ -506,6 +509,10 @@if (errata.smp)return_VALUE (-ENODEV ); + +if (nocst) +return_VALUE (-ENODEV ); + pr->power.count =0 ;for (i =0 ; i <ACPI_PROCESSOR_MAX_POWER ; i++)memset (pr->power.states,0 ,sizeof (struct acpi_processor_cx ));
@@ -800,7 +807,7 @@if (!pr)return_VALUE (-EINVAL ); -if (errata.smp) { +if (errata.smp || nocst) {return_VALUE (-ENODEV ); }
@@ -917,7 +924,7 @@ first_run++; } -if (!errata.smp && (pr->id ==0 ) && acpi_fadt.cst_cnt) { +if (!errata.smp && (pr->id ==0 ) && acpi_fadt.cst_cnt && !nocst) { status =acpi_os_write_port (acpi_fadt.smi_cmd, acpi_fadt.cst_cnt,8 );if (ACPI_FAILURE (status)) { ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
A message that is not in the archive (sent off-list or not yet received): 20041223140809.GD7973-X3ehHDuj6sIIGcDfoQAp7BvVK+yQ3ZXh@public.gmane.org
Len Brown
AppliedApplied.
thanks,
-Len
Quoted 59 lines · Dominik Brodowski
Add a "nocst" module parameter which blocks
_CSTparsing and always uses FADT info instead.Signed-off-by Dominik Brodowski <[email protected]>---
drivers/acpi/processor_idle.c | 13 ++++++++++--- 1 files changed, 10 insertions(+), 3 deletions(-)Index:
linux-2.6.10-rc3+bk-acpi/drivers/acpi/processor_idle.c
===================================================================
---linux-2.6.10-rc3+bk-acpi.orig/drivers/acpi/processor_idle.c2004-12-23 14:25:28.737417644 +0100 +++ linux-2.6.10-rc3+bk-acpi/drivers/acpi/processor_idle.c 2004-12-23 14:25:32.385908579 +0100(quoted diff) +0
-0@@ -55,7 +55,10 @@ #define C3_OVERHEAD 4 /* 1us (3.579 ticksper us) */
static void (*pm_idle_save)(void);
drivers/acpi/processor_idle.c +8
-2-module_param_named (max_cstate, max_cstate, uint,0644 ); +module_param (max_cstate, uint,0644 ); + +static unsigned int nocst =0 ; +module_param (nocst, uint,0000 );/* -------------------------------------------------------------------------- Power Management @@ -506,6 +509,10 @@if (errata.smp)return_VALUE (-ENODEV ); + +if (nocst) +return_VALUE (-ENODEV ); + pr->power.count =0 ;for (i =0 ; i <ACPI_PROCESSOR_MAX_POWER ; i++) memset(pr->power.states, 0, sizeof(struct
acpi_processor_cx));drivers/acpi/processor_idle.c +2
-2@@ -800,7 +807,7 @@if (!pr)return_VALUE (-EINVAL ); -if (errata.smp) { +if (errata.smp || nocst) {return_VALUE (-ENODEV ); }@@ -917,7 +924,7 @@ first_run++; } -if (!errata.smp && (pr->id ==0 ) && acpi_fadt.cst_cnt) { +if (!errata.smp && (pr->id ==0 ) && acpi_fadt.cst_cnt && !nocst) { status =acpi_os_write_port (acpi_fadt.smi_cmd, acpi_fadt.cst_cnt,8 );
Quoted 4 lines
if (ACPI_FAILURE(status)) {
ACPI_DEBUG_PRINT((ACPI_DB_ERROR,-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/