diff options
Diffstat (limited to 'drivers/acpi/processor_throttling.c')
-rw-r--r-- | drivers/acpi/processor_throttling.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/acpi/processor_throttling.c b/drivers/acpi/processor_throttling.c index d0d1f4d50434..5f09fb8c0e05 100644 --- a/drivers/acpi/processor_throttling.c +++ b/drivers/acpi/processor_throttling.c | |||
@@ -45,6 +45,14 @@ | |||
45 | #define _COMPONENT ACPI_PROCESSOR_COMPONENT | 45 | #define _COMPONENT ACPI_PROCESSOR_COMPONENT |
46 | ACPI_MODULE_NAME("processor_throttling"); | 46 | ACPI_MODULE_NAME("processor_throttling"); |
47 | 47 | ||
48 | /* ignore_tpc: | ||
49 | * 0 -> acpi processor driver doesn't ignore _TPC values | ||
50 | * 1 -> acpi processor driver ignores _TPC values | ||
51 | */ | ||
52 | static int ignore_tpc; | ||
53 | module_param(ignore_tpc, int, 0644); | ||
54 | MODULE_PARM_DESC(ignore_tpc, "Disable broken BIOS _TPC throttling support"); | ||
55 | |||
48 | struct throttling_tstate { | 56 | struct throttling_tstate { |
49 | unsigned int cpu; /* cpu nr */ | 57 | unsigned int cpu; /* cpu nr */ |
50 | int target_state; /* target T-state */ | 58 | int target_state; /* target T-state */ |
@@ -283,6 +291,10 @@ static int acpi_processor_get_platform_limit(struct acpi_processor *pr) | |||
283 | 291 | ||
284 | if (!pr) | 292 | if (!pr) |
285 | return -EINVAL; | 293 | return -EINVAL; |
294 | |||
295 | if (ignore_tpc) | ||
296 | goto end; | ||
297 | |||
286 | status = acpi_evaluate_integer(pr->handle, "_TPC", NULL, &tpc); | 298 | status = acpi_evaluate_integer(pr->handle, "_TPC", NULL, &tpc); |
287 | if (ACPI_FAILURE(status)) { | 299 | if (ACPI_FAILURE(status)) { |
288 | if (status != AE_NOT_FOUND) { | 300 | if (status != AE_NOT_FOUND) { |
@@ -290,6 +302,8 @@ static int acpi_processor_get_platform_limit(struct acpi_processor *pr) | |||
290 | } | 302 | } |
291 | return -ENODEV; | 303 | return -ENODEV; |
292 | } | 304 | } |
305 | |||
306 | end: | ||
293 | pr->throttling_platform_limit = (int)tpc; | 307 | pr->throttling_platform_limit = (int)tpc; |
294 | return 0; | 308 | return 0; |
295 | } | 309 | } |
@@ -302,6 +316,9 @@ int acpi_processor_tstate_has_changed(struct acpi_processor *pr) | |||
302 | struct acpi_processor_limit *limit; | 316 | struct acpi_processor_limit *limit; |
303 | int target_state; | 317 | int target_state; |
304 | 318 | ||
319 | if (ignore_tpc) | ||
320 | return 0; | ||
321 | |||
305 | result = acpi_processor_get_platform_limit(pr); | 322 | result = acpi_processor_get_platform_limit(pr); |
306 | if (result) { | 323 | if (result) { |
307 | /* Throttling Limit is unsupported */ | 324 | /* Throttling Limit is unsupported */ |