From 5307b42f038ed2b5a78ceea563659052a60726d6 Mon Sep 17 00:00:00 2001 From: Connor Roos Date: Wed, 5 Aug 2026 19:56:07 -0700 Subject: [PATCH] Cherry-pick int0002 IRQF_ONESHOT removal on top of the SCI revert Backport stable commit 5938fb0e3285 ("platform/x86: int0002: Remove IRQF_ONESHOT from request_irq()", upstream f6bc712877f2) on top of the revert of 7a36b901a6eb ("ACPI: OSL: Use a threaded interrupt handler for SCI"). The INT0002 GPIO IRQ is typically shared with the ACPI SCI. With the SCI back on a plain IRQF_SHARED request_irq(), INT0002 must drop IRQF_ONESHOT or probe fails with a flags mismatch. Signed-off-by: Connor Roos --- ...form-x86-int0002-remove-irqf-oneshot.patch | 53 +++++++++++++++++++ patches-sonic/series | 1 + 2 files changed, 54 insertions(+) create mode 100644 patches-sonic/platform-x86-int0002-remove-irqf-oneshot.patch diff --git a/patches-sonic/platform-x86-int0002-remove-irqf-oneshot.patch b/patches-sonic/platform-x86-int0002-remove-irqf-oneshot.patch new file mode 100644 index 000000000..689ddab80 --- /dev/null +++ b/patches-sonic/platform-x86-int0002-remove-irqf-oneshot.patch @@ -0,0 +1,53 @@ +From: Sebastian Andrzej Siewior +Date: 2026-01-28 +Subject: platform/x86: int0002: Remove IRQF_ONESHOT from request_irq() + +Backport of stable commit 5938fb0e328508a50c334852e30f02ecc28b74d6 +[ Upstream commit f6bc712877f24dc89bdfd7bdbf1a32f3b9960b34 ] + +Passing IRQF_ONESHOT ensures that the interrupt source is masked until the +secondary (threaded) handler is done. If only a primary handler is used +then the flag makes no sense because the interrupt cannot fire (again) +while its handler is running. + +The flag also prevents force-threading of the primary handler and the +irq-core will warn about this. + +The flag was added to match the flag on the shared handler which uses a +threaded handler and therefore IRQF_ONESHOT. This is no longer needed +because devm_request_irq() now passes IRQF_COND_ONESHOT for this case. + +Revert adding IRQF_ONESHOT to irqflags. + +Applied here on top of revert-acpi-osl-use-threaded-irq-for-sci.patch, +which requests the ACPI SCI with plain IRQF_SHARED again. The INT0002 +GPIO IRQ is typically shared with the SCI, so dropping IRQF_ONESHOT here +keeps the two request_irq() flag sets in agreement and avoids: + + genirq: Flags mismatch irq 9. 00000084 (INT0002) vs. 00002080 (acpi) + +Fixes: 8f812373d1958 ("platform/x86: intel: int0002_vgpio: Pass IRQF_ONESHOT to request_irq()") +Reported-by: Borah, Chaitanya Kumar +Signed-off-by: Sebastian Andrzej Siewior +Signed-off-by: Thomas Gleixner +Reviewed-by: Hans de Goede +Acked-by: Ilpo Järvinen +Signed-off-by: Sasha Levin +--- + drivers/platform/x86/intel/int0002_vgpio.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/drivers/platform/x86/intel/int0002_vgpio.c b/drivers/platform/x86/intel/int0002_vgpio.c +--- a/drivers/platform/x86/intel/int0002_vgpio.c ++++ b/drivers/platform/x86/intel/int0002_vgpio.c +@@ -195,8 +195,8 @@ + * FIXME: augment this if we managed to pull handling of shared + * IRQs into gpiolib. + */ +- ret = devm_request_irq(dev, irq, int0002_irq, +- IRQF_ONESHOT | IRQF_SHARED, "INT0002", chip); ++ ret = devm_request_irq(dev, irq, int0002_irq, IRQF_SHARED, "INT0002", ++ chip); + if (ret) { + dev_err(dev, "Error requesting IRQ %d: %d\n", irq, ret); + return ret; diff --git a/patches-sonic/series b/patches-sonic/series index b93fd5949..25dcad625 100644 --- a/patches-sonic/series +++ b/patches-sonic/series @@ -45,6 +45,7 @@ driver-net-tg3-change-dma-mask-for-57766.patch 0005-dt-bindings-hwmon-Add-tmp75b-to-lm75.txt.patch 0006-device-tree-bindinds-add-NXP-PCT2075-as-compatible-d.patch revert-acpi-osl-use-threaded-irq-for-sci.patch +platform-x86-int0002-remove-irqf-oneshot.patch #Support-for-fullcone-nat.patch # TODO(trixie): update for current version #