From patchwork Tue Jan 23 04:14:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivan Hu X-Patchwork-Id: 1889490 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=185.125.189.65; helo=lists.ubuntu.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=patchwork.ozlabs.org) Received: from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4TJtzk6lZQz23f0 for ; Tue, 23 Jan 2024 15:15:30 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=lists.ubuntu.com) by lists.ubuntu.com with esmtp (Exim 4.86_2) (envelope-from ) id 1rS8Bv-0007d1-9g; Tue, 23 Jan 2024 04:15:15 +0000 Received: from smtp-relay-canonical-0.internal ([10.131.114.83] helo=smtp-relay-canonical-0.canonical.com) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1rS8Bf-0007XU-6B for kernel-team@lists.ubuntu.com; Tue, 23 Jan 2024 04:14:59 +0000 Received: from canonical.com (unknown [106.104.136.95]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-0.canonical.com (Postfix) with ESMTPSA id 54C213F2C9 for ; Tue, 23 Jan 2024 04:14:58 +0000 (UTC) From: Ivan Hu To: kernel-team@lists.ubuntu.com Subject: [SRU][M][PATCH v2 0/2] Dynamically determine acpi_handle_list size Date: Tue, 23 Jan 2024 12:14:52 +0800 Message-Id: <20240123041454.11189-1-ivan.hu@canonical.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" BugLink: https://bugs.launchpad.net/bugs/2049733 [Impact] ACPI handle list will be dynamic allocated without default fixed size. [Fix] Currently the ACPI_MAX_HANDLES is defined fix to 10, and it is not enough for some platforms that called ACPI _PSL method to get passive cooling device objects. then will get the error message "Invalid passive threshold", this patch change the fixed size with the dynamic handle list size which fixes the handle reference error. [Test Case] check the dmesg to see if there is the error message "Invalid passive threshold" [Where problems could occur] Only change the fixed size with the dynamic handle list size. Risk of regression is low. [Other Info] Change of v2: add the "ACPI: utils: Fix error path in acpi_evaluate_reference()" patch for fixing the "ACPI: utils: Dynamically determine acpi_handle_list size" issue and modify the cherrypicked to backported Rafael J. Wysocki (2): ACPI: utils: Dynamically determine acpi_handle_list size ACPI: utils: Fix error path in acpi_evaluate_reference() drivers/acpi/acpi_lpss.c | 10 ++- drivers/acpi/scan.c | 1 + drivers/acpi/thermal.c | 29 ++++++--- drivers/acpi/utils.c | 63 ++++++++++++++++++- .../platform/surface/surface_acpi_notify.c | 10 ++- include/acpi/acpi_bus.h | 9 ++- 6 files changed, 101 insertions(+), 21 deletions(-)