[PATCH v2] ACPI: AGDI: Add interrupt signaling mode support

Ilkka Koskinen ilkka at os.amperecomputing.com
Tue Sep 2 12:39:43 PDT 2025


Hi Kazuhiro,

I have a couple of minor comments below

On Fri, 29 Aug 2025, Kazuhiro Abe wrote:
> AGDI has two types of signaling modes: SDEI and interrupt.
> Currently, the AGDI driver only supports SDEI.
> Therefore, add support for interrupt singaling mode
> The interrupt vector is retrieved from the AGDI table, and call panic
> function when an interrupt occurs.
>
> ---
> I keep normal IRQ code when NMI cannot be used.
> If there is any concern, please let me know.
>
> v1->v2
> - Remove acpica update since there is no need to update define value
>   for this patch.
>
> Signed-off-by: Kazuhiro Abe <fj1078ii at aa.jp.fujitsu.com>
> ---
> drivers/acpi/arm64/agdi.c | 98 ++++++++++++++++++++++++++++++++++++---
> 1 file changed, 91 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/acpi/arm64/agdi.c b/drivers/acpi/arm64/agdi.c
> index e0df3daa4abf..e887aab6b448 100644
> --- a/drivers/acpi/arm64/agdi.c
> +++ b/drivers/acpi/arm64/agdi.c

...

> static int agdi_probe(struct platform_device *pdev)
> {
> 	struct agdi_data *adata = dev_get_platdata(&pdev->dev);
> @@ -55,12 +108,17 @@ static int agdi_probe(struct platform_device *pdev)
> 	if (!adata)
> 		return -EINVAL;
>
> -	return agdi_sdei_probe(pdev, adata);
> +	if (adata->flags & ACPI_AGDI_SIGNALING_MODE)
> +		agdi_interrupt_probe(pdev, adata);
> +	else
> +		agdi_sdei_probe(pdev, adata);
> +
> +	return 0;

Is there a reason why you always return zero instead of a possible
error code from either of the probe functions?

> }
>

...

> +static void agdi_remove(struct platform_device *pdev)
> +{
> +	struct agdi_data *adata = dev_get_platdata(&pdev->dev);
> +
> +	if (adata->flags & ACPI_AGDI_SIGNALING_MODE) {
> +		agdi_interrupt_remove(pdev, adata);
> +	} else {
> +		agdi_sdei_remove(pdev, adata);
> +	}

You don't need curly braces in this if/else block.

Cheers, Ilkka



More information about the linux-arm-kernel mailing list