From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5A0B6228CA9; Mon, 2 Jun 2025 14:57:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1748876231; cv=none; b=ScYfpOvZA1BBvCaEhYfqnc34/5rsm2SwuMOBTjk8JLrZ2lsq4ejZvgcCAxWIUDn8XgAcQ5RKIN6uMlOOKsgGFLrUCGd3dldwVODVoQHNVOi/8zrAYefa4+5A8XwyBWiZ9ud4FQN/NODK6WiNYOhSRQvk064rJQGJHGcZYJr9sV8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1748876231; c=relaxed/simple; bh=namX4ubmtI1ZBg/Idqg2sUfvYqaYiY5kWTN8a4sdqRg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Q6vE2eaXFDkjcq4dMBcCWc+gcUmckBFsXMkgwvUo2EXAfTIiEdOiIh3HyBKz4/S0YLXHvS+S7EzP+au0MMcMUqn5ZWJZQvly64KsxevoxurrXh7WbT+JB01NO43q38V1mRdizuLTVGu2Wu439UrwICJACoEcBLB3y5Dj6Annufw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=LJHEvwpV; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="LJHEvwpV" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6F1C8C4CEEB; Mon, 2 Jun 2025 14:57:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1748876229; bh=namX4ubmtI1ZBg/Idqg2sUfvYqaYiY5kWTN8a4sdqRg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LJHEvwpVrr9osBHHHcGes/cWFpndF4NmcHFMl4pOd5MUVVXWG+yVxWjq2RH3VLbrs J0s/47XbjvCP2tp5FJhh/DskkxJaIV6STJLm5KB08XI+3k+jspj9M4qqk+OFys7Xyx MUJVsKM6wqdf/G3IPEvJnr/bCsrr8gT09SLRJYT4= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Xiaofei Tan , "Rafael J. Wysocki" , Sasha Levin Subject: [PATCH 5.15 112/207] ACPI: HED: Always initialize before evged Date: Mon, 2 Jun 2025 15:48:04 +0200 Message-ID: <20250602134303.115935530@linuxfoundation.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250602134258.769974467@linuxfoundation.org> References: <20250602134258.769974467@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Xiaofei Tan [ Upstream commit cccf6ee090c8c133072d5d5b52ae25f3bc907a16 ] When the HED driver is built-in, it initializes after evged because they both are at the same initcall level, so the initialization ordering depends on the Makefile order. However, this prevents RAS records coming in between the evged driver initialization and the HED driver initialization from being handled. If the number of such RAS records is above the APEI HEST error source number, the HEST resources may be exhausted, and that may affect subsequent RAS error reporting. To fix this issue, change the initcall level of HED to subsys_initcall and prevent the driver from being built as a module by changing ACPI_HED in Kconfig from "tristate" to "bool". Signed-off-by: Xiaofei Tan Link: https://patch.msgid.link/20250212063408.927666-1-tanxiaofei@huawei.com [ rjw: Changelog edits ] Signed-off-by: Rafael J. Wysocki Signed-off-by: Sasha Levin --- drivers/acpi/Kconfig | 2 +- drivers/acpi/hed.c | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig index 1da360c51d662..6a178e38fc4a8 100644 --- a/drivers/acpi/Kconfig +++ b/drivers/acpi/Kconfig @@ -437,7 +437,7 @@ config ACPI_SBS the modules will be called sbs and sbshc. config ACPI_HED - tristate "Hardware Error Device" + bool "Hardware Error Device" help This driver supports the Hardware Error Device (PNP0C33), which is used to report some hardware errors notified via diff --git a/drivers/acpi/hed.c b/drivers/acpi/hed.c index 60a2939cde6c5..e8e9b1ac06b88 100644 --- a/drivers/acpi/hed.c +++ b/drivers/acpi/hed.c @@ -72,7 +72,12 @@ static struct acpi_driver acpi_hed_driver = { .notify = acpi_hed_notify, }, }; -module_acpi_driver(acpi_hed_driver); + +static int __init acpi_hed_driver_init(void) +{ + return acpi_bus_register_driver(&acpi_hed_driver); +} +subsys_initcall(acpi_hed_driver_init); MODULE_AUTHOR("Huang Ying"); MODULE_DESCRIPTION("ACPI Hardware Error Device Driver"); -- 2.39.5