Re: [PATCH v5 5/9] ACPI: APEI: EINJ: Enable the discovery of EINJv2 capabilities
From: Ira Weiny
Date: Fri Apr 04 2025 - 10:24:09 EST
Zaid Alali wrote:
> Enable the driver to show all supported error injections for EINJ
> and EINJv2 at the same time. EINJv2 capabilities can be discovered
> by checking the return value of get_error_type, where bit 30 set
> indicates EINJv2 support.
>
> Signed-off-by: Zaid Alali <zaidal@xxxxxxxxxxxxxxxxxxxxxx>
[snip]
> @@ -174,12 +176,12 @@ static int __einj_get_available_error_type(u32 *type)
> }
>
> /* Get error injection capabilities of the platform */
> -int einj_get_available_error_type(u32 *type)
> +int einj_get_available_error_type(u32 *type, int einj_action)
Why require two separate calls to get each error mask?
IOW Why not:
int einj_get_available_error_type(u32 *type, u32 *type2)
And have the query determine if type2 is supported?
Ira
[snip]