Bug 218407 - [BISECTED] Stack trace in ACPI with linux 6.8-rc1
Summary: [BISECTED] Stack trace in ACPI with linux 6.8-rc1
Status: RESOLVED CODE_FIX
Alias: None
Product: Platform Specific/Hardware
Classification: Unclassified
Component: x86-64 (show other bugs)
Hardware: All Linux
: P3 normal
Assignee: Mario Limonciello (AMD)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-01-22 16:05 UTC by Christian Heusel
Modified: 2024-03-05 22:25 UTC (History)
4 users (show)

See Also:
Kernel Version:
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description Christian Heusel 2024-01-22 16:05:41 UTC
I had just upgraded to the latest linux mainline release (6.8-rc1) and noticed the following stack trace in my journal:

[    0.417335] genirq: Flags mismatch irq 9. 00000088 (pinctrl_amd) vs. 00002080 (acpi)
[    0.417340] CPU: 1 PID: 1 Comm: swapper/0 Not tainted 6.8.0-rc1-1-mainline #1 6de976b7897ab2c490f6ac6efce036b3df585834
[    0.417343] Hardware name: LENOVO 20YDS00G00/20YDS00G00, BIOS R1OET26W (1.05 ) 04/28/2021
[    0.417345] Call Trace:
[    0.417348]  <TASK>
[    0.417351]  dump_stack_lvl+0x47/0x60
[    0.417358]  __setup_irq+0x552/0x6f0
[    0.417363]  request_threaded_irq+0xe8/0x190
[    0.417367]  devm_request_threaded_irq+0x71/0xd0
[    0.417371]  ? __pfx_amd_gpio_irq_handler+0x10/0x10
[    0.417377]  amd_gpio_probe+0x2e4/0x430
[    0.417381]  platform_probe+0x44/0xa0
[    0.417386]  really_probe+0x19e/0x3e0
[    0.417391]  ? __pfx___driver_attach+0x10/0x10
[    0.417394]  __driver_probe_device+0x78/0x160
[    0.417397]  driver_probe_device+0x1f/0x90
[    0.417400]  __driver_attach+0xd2/0x1c0
[    0.417404]  bus_for_each_dev+0x88/0xd0
[    0.417407]  bus_add_driver+0x116/0x220
[    0.417411]  driver_register+0x59/0x100
[    0.417414]  ? __pfx_amd_gpio_driver_init+0x10/0x10
[    0.417418]  do_one_initcall+0x5b/0x320
[    0.417425]  kernel_init_freeable+0x1d9/0x320
[    0.417431]  ? __pfx_kernel_init+0x10/0x10
[    0.417435]  kernel_init+0x1a/0x1c0
[    0.417438]  ret_from_fork+0x34/0x50
[    0.417443]  ? __pfx_kernel_init+0x10/0x10
[    0.417445]  ret_from_fork_asm+0x1b/0x30
[    0.417451]  </TASK>
[    0.420073] amd_gpio: probe of AMDI0030:00 failed with error -16

Full dmesg here: https://gist.github.com/christian-heusel/51b43f67b13e5dc60299f30d5f71fa4b

I have bisected it and got to 7a36b901a6eb0e9945341db71ed3c45c7721cfa9 ("ACPI: OSL: Use a threaded interrupt handler for SCI") with the bisection.
Comment 1 Mario Limonciello (AMD) 2024-01-23 17:35:41 UTC
Your laptop; does it happen to use IRQ 9 for both ACPI SCI as well as GPIO controller?  This is something I've seen sometimes on Lenovo designs.
It would appear so from this error.

As a guess; if you take away IRQF_ONESHOT in acpi_os_install_interrupt_handler() does it go away?
Comment 2 Mario Limonciello (AMD) 2024-01-23 17:36:57 UTC
Or adding IRQF_ONESHOT to pinctrl-amd in amd_gpio_probe() might be another way to solve it.
Comment 3 Rafael J. Wysocki 2024-01-23 17:48:57 UTC
(In reply to Mario Limonciello (AMD) from comment #2)
> Or adding IRQF_ONESHOT to pinctrl-amd in amd_gpio_probe() might be another
> way to solve it.

This.

IRQF_ONESHOT is required for the SCI.
Comment 5 Christian Heusel 2024-01-29 20:08:27 UTC
The bug is still present in 6.8-rc2, as the fix is still pending.
Comment 6 Christian Heusel 2024-03-05 22:25:33 UTC
Fixed with 4451e8e8415e ("pinctrl: amd: Add IRQF_ONESHOT to the interrupt request") hitting Linus tree.

Note You need to log in before you can comment on or make changes to this bug.