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 289A52F0B83; Mon, 5 May 2025 23:11:24 +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=1746486686; cv=none; b=u5qEGtNn7ocEutAf/7EPTwyOBhSAkX1FMh9p9bvbCrF8sdh73POcEmfCjHFz4ea+PVedQlNt0Bm6YM/1HPC3U43w+jR7ePUd85SnLeTSa4iCgNlg0vL+TkNRIQGj6Z5t9luKhU/XNtSGTFFd/Y8CPlK+XSljNBycG3Lorj0MeuA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746486686; c=relaxed/simple; bh=h0WXM/WDpf+FPGx3bg9an/uVxwJ3jQ7JB/lR+LOPOoY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=sJsWWRIGp78KDURqtQa+EdC29wbruC33QXXELwMC7d1M0SkTpDgQgTaEvfYvJvI0WsFEZq9M/lMAeOTQPUM3lA3ikdegDsvdMRKrTbVkHJGbqkyPZq2Xd0o5xMU6g3zxYXNfl5ITxZQM5xZXebYkBXwB1q+RFPH0Fa0oSABm+y0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=D3VhUg40; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="D3VhUg40" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D64FEC4CEED; Mon, 5 May 2025 23:11:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1746486684; bh=h0WXM/WDpf+FPGx3bg9an/uVxwJ3jQ7JB/lR+LOPOoY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=D3VhUg40WOaIEsddXVfLTtd7z2lfe+G2OY4L2DV6gf9xeywwy8Wgf9rLNcrLzBzAD EJPs3Bm9XKM5+3BauHY491lWL3EQE5aoN5BOASpBwY0Bm1OEKg2luyjPV20heJEU4C GigRHGOArOj+xLVaDA8LCa1HzhpRhi2kNgamzpcFF5UvU1gSeuv8lVB9oQe5wz+1iO XfhdY5NPkjUqeuW9yqhlzl45aYR1jGtgsRNMJgd4FUt4x73pIFRzrub5oktTu7mMKD qTfo2cyJ87EIUNHHLepgiZBV7iFdZmrzdo5MammZIdOqsRWOzIjvpuiBhV3SwEJoYc Nu4sXzdeiKYWw== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Xiaofei Tan , "Rafael J . Wysocki" , Sasha Levin , rafael@kernel.org, linux-acpi@vger.kernel.org Subject: [PATCH AUTOSEL 6.1 150/212] ACPI: HED: Always initialize before evged Date: Mon, 5 May 2025 19:05:22 -0400 Message-Id: <20250505230624.2692522-150-sashal@kernel.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250505230624.2692522-1-sashal@kernel.org> References: <20250505230624.2692522-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-acpi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-stable-base: Linux 6.1.136 Content-Transfer-Encoding: 8bit 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 473241b5193fa..596e96d3b3bdb 100644 --- a/drivers/acpi/Kconfig +++ b/drivers/acpi/Kconfig @@ -438,7 +438,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