From: Huang Yiwei <quic_hyiwei@quicinc.com>
To: Will Deacon <will@kernel.org>
Cc: <rafael@kernel.org>, <lenb@kernel.org>, <james.morse@arm.com>,
<tony.luck@intel.com>, <bp@alien8.de>,
<xueshuai@linux.alibaba.com>, <quic_aiquny@quicinc.com>,
<quic_satyap@quicinc.com>, <linux-acpi@vger.kernel.org>,
<linux-kernel@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>, <kernel@quicinc.com>,
<kernel@oss.qualcomm.com>
Subject: Re: [PATCH] firmware: SDEI: Allow sdei initialization without ACPI_APEI_GHES
Date: Tue, 6 May 2025 16:30:51 +0800 [thread overview]
Message-ID: <b5c04110-c899-4aec-85bf-9978d80bf4ac@quicinc.com> (raw)
In-Reply-To: <20250430102440.GA27570@willie-the-truck>
> On Mon, Apr 28, 2025 at 05:56:23PM +0800, Huang Yiwei wrote:
>> SDEI usually initialize with the ACPI table, but on platforms where
>> ACPI is not used, the SDEI feature can still be used to handle
>> specific firmware calls or other customized purposes. Therefore, it
>> ......
>> }
>> +
>> + return ret;
>> }
>> +#ifndef CONFIG_ACPI_APEI_GHES
>> +subsys_initcall_sync(sdei_init);
>> +#endif
>
> Using an initcall purely for the non-ACPI case feels like a hack to me.
Yeah, I agree with you actually, but to address the dependency chain
issue highlighted in commit dc4e8c07e9e2 ("ACPI: APEI: explicit init of
HEST and GHES in acpi_init()"), where the following relationships need
to be maintained:
ghes_init() => acpi_hest_init() => acpi_bus_init() => acpi_init()
ghes_init() => sdei_init()
> Could we instead just call sdei_init() from the arch code (and remove
> the call from acpi_ghes_init()) so that the platform device is
> registered at the same time, regardless of the firmware?
>
> Will
I propose splitting sdei_init() into two separate functions: sdei_init()
and acpi_sdei_init(). This way, sdei_init() will be called by
arch_initcall and will only initialize the platform driver, while
acpi_sdei_init() will initialize the device from acpi_ghes_init() when
ACPI is ready. This approach should help maintain the dependency chain
without causing any breaks.
sdei_init --> platform_driver_register
arch_initcall(sdei_init)
acpi_init
acpi_bus_init();
acpi_hest_init();
acpi_ghes_init();
acpi_sdei_init(); --> platform_device_register_simple
subsys_initcall(acpi_init);
prev parent reply other threads:[~2025-05-06 8:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-28 9:56 Huang Yiwei
2025-04-29 19:25 ` Konrad Dybcio
2025-04-30 10:24 ` Will Deacon
2025-05-06 8:30 ` Huang Yiwei [this message]
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=b5c04110-c899-4aec-85bf-9978d80bf4ac@quicinc.com \
--to=quic_hyiwei@quicinc.com \
--cc=bp@alien8.de \
--cc=james.morse@arm.com \
--cc=kernel@oss.qualcomm.com \
--cc=kernel@quicinc.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=quic_aiquny@quicinc.com \
--cc=quic_satyap@quicinc.com \
--cc=rafael@kernel.org \
--cc=tony.luck@intel.com \
--cc=will@kernel.org \
--cc=xueshuai@linux.alibaba.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
all inboxes | Powered by JetHome®