Re: [PATCH] pinctrl: amd: Add IRQF_ONESHOT to the interrupt request

From: Linux regression tracking (Thorsten Leemhuis)
Date: Fri Jan 26 2024 - 11:19:23 EST


On 23.01.24 19:08, Mario Limonciello wrote:
> On some systems the interrupt is shared between GPIO controller
> and ACPI SCI. When the interrupt is shared with the ACPI SCI the
> flags need to be identical.
>
> This should fix the GPIO controller failing to work after commit
> 7a36b901a6eb ("ACPI: OSL: Use a threaded interrupt handler for SCI").
> ```
> [ 0.417335] genirq: Flags mismatch irq 9. 00000088 (pinctrl_amd) vs. 00002080 (acpi)
> [ 0.420073] amd_gpio: probe of AMDI0030:00 failed with error -16
> ```
>
> Cc: Rafael J. Wysocki <rafael@xxxxxxxxxx>
> Reported-by: Christian Heusel <christian@xxxxxxxxx>
> Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218407
> Fixes: 7a36b901a6eb ("ACPI: OSL: Use a threaded interrupt handler for SCI")

I'm affected by this regression myself on my Thinkpad T14s Gen1 AMD
(power button does not work, but I guess there might be more). Haven't
tested this patch yet, seemed like this was pretty clear case and
Christian already tested it. But if it makes anyone happy I can do that.

> Link: https://lore.kernel.org/linux-acpi/CAJZ5v0iRqUXeuKmC_+dAJtDBLWQ3x15n4gRH48y7MEaLoXF+UA@xxxxxxxxxxxxxx/T/#mc5506014141b61e472b24e095889535a04458083

Side note: might be wise to change that to something slightly shorter:

Link:
https://lore.kernel.org/linux-acpi/kvoclxvyhmdmrfpfgwfjr33bdltej3upw5qcnazc4xakwdgg2b@krewjw2uk42k/

Ciao, Thorsten

> Signed-off-by: Mario Limonciello <mario.limonciello@xxxxxxx>
> ---
> drivers/pinctrl/pinctrl-amd.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/pinctrl/pinctrl-amd.c b/drivers/pinctrl/pinctrl-amd.c
> index ca4a247c2cd1..6a33b584976c 100644
> --- a/drivers/pinctrl/pinctrl-amd.c
> +++ b/drivers/pinctrl/pinctrl-amd.c
> @@ -1162,7 +1162,7 @@ static int amd_gpio_probe(struct platform_device *pdev)
> }
>
> ret = devm_request_irq(&pdev->dev, gpio_dev->irq, amd_gpio_irq_handler,
> - IRQF_SHARED, KBUILD_MODNAME, gpio_dev);
> + IRQF_SHARED | IRQF_ONESHOT, KBUILD_MODNAME, gpio_dev);
> if (ret)
> goto out2;
>

P.S.: Let me add this to the tracking while at it:

#regzbot introduced 7a36b901a6eb ^
https://bugzilla.kernel.org/show_bug.cgi?id=218407
#regzbot title ACPI: OSL:/pinctrl: GPIO controller failing to work
#regzbot fix pinctrl: amd: Add IRQF_ONESHOT to the interrupt request
#regzbot ignore-activity