Re: [PATCH v6] cxl/core: Create EINJ debugfs files regardless of EINJ init order
From: Cheatham, Benjamin
Date: Tue Nov 03 2026 - 16:32:50 EST
On 11/2/2026 11:36 PM, Yongxin Yang wrote:
> The einj_types file under the CXL debugfs directory is never created when
> cxl_core is built in. cxl_core_init() runs at subsys_initcall level, while
> einj_init() registers EINJ at device_initcall level, so the
> einj_cxl_is_initialized() check in cxl_core_init() always sees EINJ as not
> up yet and the debugfs_create_file() below it is never reached.
>
> Change the file creation condition from EINJ being initialized to a compile
> time check for ACPI_APEI_EINJ_CXL and return -ENODEV until EINJ is up.
>
> The same check also guards the inject files under every downstream port
> directory, not just the RCH ones. Gate that directory creation on
That first sentence should drop the RCH mention, it's not relevant here.
With that:
Reviewed-by: Ben Cheatham <benjamin.cheatham@xxxxxxx>
Thanks,
Ben