From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
To: Xiaofei Tan <tanxiaofei@huawei.com>
Cc: <rafael@kernel.org>, <lenb@kernel.org>,
<linux-acpi@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<jonathan.cameron@huawei.com>, <M.Chehab@huawei.com>,
<roberto.sassu@huawei.com>, <shiju.jose@huawei.com>,
<prime.zeng@hisilicon.com>, <linuxarm@huawei.com>
Subject: Re: [PATCH] acpi: Fix hed module initialization order when it is built-in
Date: Wed, 11 Dec 2024 17:22:07 +0100 [thread overview]
Message-ID: <20241211172207.513957e2@sal.lan> (raw)
In-Reply-To: <20241115035014.1339256-1-tanxiaofei@huawei.com>
Em Fri, 15 Nov 2024 11:50:14 +0800
Xiaofei Tan <tanxiaofei@huawei.com> escreveu:
Please always copy my @kernel.org address for upstream work.
> When the module hed is built-in, the init order is determined by
> Makefile order. That order violates expectations. Because the module
> hed init is behind evged. RAS records can't be handled in the
> special time window that evged has initialized while hed not.
> If the number of such RAS records is more than the APEI HEST error
> source number, the HEST resources could be occupied all, and then
> could affect subsequent RAS error reporting.
IMO, it is a lot better to use a late init call. Please see:
include/linux/init.h
This would be done by, for instance, using late_initcall().
Now, what we have is:
acpi-y += evged.o
obj-$(CONFIG_ACPI_HED) += hed.o
Where ACPI_HED being a tri-state.
It sounds to me, that even, with your patch, if you build
HED as a module, you'll still have a problem.
Shouldn't be ACPI_HED be changed from tristate to bool?
Regards,
Mauro
>
> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Signed-off-by: Xiaofei Tan <tanxiaofei@huawei.com>
> ---
> drivers/acpi/Makefile | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/acpi/Makefile b/drivers/acpi/Makefile
> index 61ca4afe83dc..54f60b7922ad 100644
> --- a/drivers/acpi/Makefile
> +++ b/drivers/acpi/Makefile
> @@ -15,6 +15,13 @@ endif
>
> obj-$(CONFIG_ACPI) += tables.o
>
> +#
> +# The hed.o needs to be in front of evged.o to avoid the problem that
> +# RAS errors cannot be handled in the special time window of startup
> +# phase that evged has initialized while hed not.
> +#
> +obj-$(CONFIG_ACPI_HED) += hed.o
> +
> #
> # ACPI Core Subsystem (Interpreter)
> #
> @@ -95,7 +102,6 @@ obj-$(CONFIG_ACPI_HOTPLUG_IOAPIC) += ioapic.o
> obj-$(CONFIG_ACPI_BATTERY) += battery.o
> obj-$(CONFIG_ACPI_SBS) += sbshc.o
> obj-$(CONFIG_ACPI_SBS) += sbs.o
> -obj-$(CONFIG_ACPI_HED) += hed.o
> obj-$(CONFIG_ACPI_EC_DEBUGFS) += ec_sys.o
> obj-$(CONFIG_ACPI_BGRT) += bgrt.o
> obj-$(CONFIG_ACPI_CPPC_LIB) += cppc_acpi.o
next prev parent reply other threads:[~2024-12-11 16:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-15 3:50 [PATCH] acpi: Fix hed module initialization order when it is built-in Xiaofei Tan
2024-12-10 17:59 ` Rafael J. Wysocki
2024-12-23 9:31 ` Xiaofei Tan
2024-12-23 19:33 ` Jonathan Cameron
2024-12-28 10:23 ` Xiaofei Tan
2024-12-11 16:22 ` Mauro Carvalho Chehab [this message]
2024-12-23 9:44 ` Xiaofei Tan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241211172207.513957e2@sal.lan \
--to=mchehab+huawei@kernel.org \
--cc=M.Chehab@huawei.com \
--cc=jonathan.cameron@huawei.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=prime.zeng@hisilicon.com \
--cc=rafael@kernel.org \
--cc=roberto.sassu@huawei.com \
--cc=shiju.jose@huawei.com \
--cc=tanxiaofei@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox