ACPI processor: introduce module parameter processor.ignore_tpc
PATCH 1/2 ACPI processor: introduce module parameter processor.ignore_tpc
Introduce module parameter processor.ignore_tpc.
Some laptops are shipped with buggy _TPC implemented, this module parameter is used to workaround this kind of issues.
http://bugzilla.kernel.org/show_bug.cgi?id=13259
Signed-off-by Zhang Rui <[email protected]>
Tested-by James Ettle <[email protected]>
--- drivers/acpi/processor_throttling.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)
drivers/acpi/processor_throttling.c +19 -0
@@ -45,6 +45,16 @@#define _COMPONENT ACPI_PROCESSOR_COMPONENTACPI_MODULE_NAME ("processor_throttling" ); +/* ignore_tpc: +* 0 -> acpi processor driver doesn't ignore _TPC values +* 1 -> acpi processor driver ignores _TPC values +*/ +static int ignore_tpc; +module_param (ignore_tpc, int,0644 ); +MODULE_PARM_DESC (ignore_tpc,"If the processor throttling state of your machine gets wrongly" \ +"limited by BIOS, this should help" ); + +struct throttling_tstate {unsigned int cpu;/* cpu nr */ int target_state;/* target T-state */
@@ -283,6 +293,10 @@ static int acpi_processor_get_platform_lif (!pr)return -EINVAL ; + +if (ignore_tpc) + goto end; + status =acpi_evaluate_integer (pr->handle,"_TPC" ,NULL , &tpc);if (ACPI_FAILURE (status)) {if (status !=AE_NOT_FOUND ) {
@@ -290,6 +304,8 @@ static int acpi_processor_get_platform_l }return -ENODEV ; } + +end: pr->throttling_platform_limit = (int )tpc;return 0 ; }
@@ -302,6 +318,9 @@ int acpi_processor_tstate_has_changed(ststruct acpi_processor_limit *limit;int target_state; +if (ignore_tpc) +return 0 ; + result =acpi_processor_get_platform_limit (pr);if (result) {/* Throttling Limit is unsupported */
Len Brown
reviewerapplied (with some English tweaks:-)
thanks,
Len Brown, Intel Open Source Technology Center