Commit a39a2d7c72b358c6253a2ec28e17b023b7f6f41c
Committed by
Len Brown
1 parent
8410565f54
Exists in
master
and in
7 other branches
ACPI: Reject below-freezing temperatures as invalid critical temperatures
My laptop thinks that it's a good idea to give -73C as the critical CPU temperature.... which isn't the best thing since it causes a shutdown right at bootup. Temperatures below freezing are clearly invalid critical thresholds so just reject these as such. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Acked-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Showing 1 changed file with 9 additions and 2 deletions Side-by-side Diff
drivers/acpi/thermal.c
... | ... | @@ -364,10 +364,17 @@ |
364 | 364 | if (flag & ACPI_TRIPS_CRITICAL) { |
365 | 365 | status = acpi_evaluate_integer(tz->device->handle, |
366 | 366 | "_CRT", NULL, &tz->trips.critical.temperature); |
367 | - if (ACPI_FAILURE(status)) { | |
367 | + /* | |
368 | + * Treat freezing temperatures as invalid as well; some | |
369 | + * BIOSes return really low values and cause reboots at startup. | |
370 | + * Below zero (Celcius) values clearly aren't right for sure.. | |
371 | + * ... so lets discard those as invalid. | |
372 | + */ | |
373 | + if (ACPI_FAILURE(status) || | |
374 | + tz->trips.critical.temperature <= 2732) { | |
368 | 375 | tz->trips.critical.flags.valid = 0; |
369 | 376 | ACPI_EXCEPTION((AE_INFO, status, |
370 | - "No critical threshold")); | |
377 | + "No or invalid critical threshold")); | |
371 | 378 | return -ENODEV; |
372 | 379 | } else { |
373 | 380 | tz->trips.critical.flags.valid = 1; |