ACPI: thermal: extend the acpi maximum handles for _PSL method
Subsystems (2)
PATCH 1/1 ACPI: thermal: extend the acpi maximum handles for _PSL method
Several platforms encountered the following kernel message:
ACPI: \_TZ_.BATZ: Invalid passive threshold
This issue arises due to the failure of the acpi_evaluate_reference function in drivers/acpi/thermal.c while evaluating the ACPI _PSL method.
status = acpi_evaluate_reference(tz->device->handle, "_PSL",
NULL, &devices);
if (ACPI_FAILURE(status)) {
acpi_handle_info(tz->device->handle,
"Invalid passive threshold\n");
tz->trips.passive.valid = false;
} else {
tz->trips.passive.valid = true;
}However, the root cause lies in the _PSL method returning packages with a count exceeding ACPI_MAX_HANDLES in acpi_evaluate_reference.
As per the ACPI specification, the _PSL (Passive List) method is defined under a thermal zone and evaluates to a list of processor objects to be used for passive cooling. And it will return a variable-length Package containing a list of References to processor objects.
--- include/acpi/acpi_bus.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/acpi/acpi_bus.h +1 -1
@@ -13,7 +13,7 @@#include <linux/property.h> /* TBD: Make dynamic */ -#define ACPI_MAX_HANDLES 10 +#define ACPI_MAX_HANDLES 32struct acpi_handle_list {u32 count;acpi_handle handles[ACPI_MAX_HANDLES ];
Signature · 1 line
2.34.1
Rafael J. Wysocki
maintainerQuoted 20 lines · Ivan Hu
Several platforms encountered the following kernel message:
ACPI: \_TZ_.BATZ: Invalid passive thresholdThis issue arises due to the failure of the
acpi_evaluate_referencefunction indrivers/acpi/thermal.cwhile evaluating the ACPI_PSLmethod.status = acpi_evaluate_reference(tz->device->handle, "
_PSL",NULL, &devices); if (ACPI_FAILURE(status)) { acpi_handle_info(tz->device->handle, "Invalid passive threshold\n"); tz->trips.passive.valid = false; } else { tz->trips.passive.valid = true; }However, the root cause lies in the
_PSLmethod returning packages with a count exceedingACPI_MAX_HANDLESinacpi_evaluate_reference.
Quoted 6 lines
As per the ACPI specification, the
_PSL(Passive List) method is defined under a thermal zone and evaluates to a list of processor objects to be used for passive cooling. And it will return a variable-length Package containing a list of References to processor objects.Signed-off-by Ivan Hu <[email protected]>
Please check if this patch fixes the problem for you (it may need to be rebased):
https://patchwork.kernel.org/project/linux-acpi/patch/[email protected]/
Quoted 20 lines
--- include/acpi/acpi_bus.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)include/acpi/acpi_bus.h +1
-2@@ -13,7 +13,7 @@#include <linux/property.h> /* TBD: Make dynamic */ -#define ACPI_MAX_HANDLES 10 +#define ACPI_MAX_HANDLES 32struct acpi_handle_list {u32 count;acpi_handle handles[ACPI_MAX_HANDLES ]; --2.34.1