Commit 5dad2623 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'irq_urgent_for_v6.9_rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull irq fixes from Borislav Petkov:

 - Fix an unused function warning on irqchip/irq-armada-370-xp

 - Fix the IRQ sharing with pinctrl-amd and ACPI OSL

* tag 'irq_urgent_for_v6.9_rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  irqchip/armada-370-xp: Suppress unused-function warning
  genirq: Introduce IRQF_COND_ONESHOT and use it in pinctrl-amd
parents 448f828f 9e81e329
...@@ -316,7 +316,7 @@ static int armada_370_xp_msi_init(struct device_node *node, ...@@ -316,7 +316,7 @@ static int armada_370_xp_msi_init(struct device_node *node,
return 0; return 0;
} }
#else #else
static void armada_370_xp_msi_reenable_percpu(void) {} static __maybe_unused void armada_370_xp_msi_reenable_percpu(void) {}
static inline int armada_370_xp_msi_init(struct device_node *node, static inline int armada_370_xp_msi_init(struct device_node *node,
phys_addr_t main_int_phys_base) phys_addr_t main_int_phys_base)
......
...@@ -1159,7 +1159,7 @@ static int amd_gpio_probe(struct platform_device *pdev) ...@@ -1159,7 +1159,7 @@ static int amd_gpio_probe(struct platform_device *pdev)
} }
ret = devm_request_irq(&pdev->dev, gpio_dev->irq, amd_gpio_irq_handler, ret = devm_request_irq(&pdev->dev, gpio_dev->irq, amd_gpio_irq_handler,
IRQF_SHARED | IRQF_ONESHOT, KBUILD_MODNAME, gpio_dev); IRQF_SHARED | IRQF_COND_ONESHOT, KBUILD_MODNAME, gpio_dev);
if (ret) if (ret)
goto out2; goto out2;
......
...@@ -67,6 +67,8 @@ ...@@ -67,6 +67,8 @@
* later. * later.
* IRQF_NO_DEBUG - Exclude from runnaway detection for IPI and similar handlers, * IRQF_NO_DEBUG - Exclude from runnaway detection for IPI and similar handlers,
* depends on IRQF_PERCPU. * depends on IRQF_PERCPU.
* IRQF_COND_ONESHOT - Agree to do IRQF_ONESHOT if already set for a shared
* interrupt.
*/ */
#define IRQF_SHARED 0x00000080 #define IRQF_SHARED 0x00000080
#define IRQF_PROBE_SHARED 0x00000100 #define IRQF_PROBE_SHARED 0x00000100
...@@ -82,6 +84,7 @@ ...@@ -82,6 +84,7 @@
#define IRQF_COND_SUSPEND 0x00040000 #define IRQF_COND_SUSPEND 0x00040000
#define IRQF_NO_AUTOEN 0x00080000 #define IRQF_NO_AUTOEN 0x00080000
#define IRQF_NO_DEBUG 0x00100000 #define IRQF_NO_DEBUG 0x00100000
#define IRQF_COND_ONESHOT 0x00200000
#define IRQF_TIMER (__IRQF_TIMER | IRQF_NO_SUSPEND | IRQF_NO_THREAD) #define IRQF_TIMER (__IRQF_TIMER | IRQF_NO_SUSPEND | IRQF_NO_THREAD)
......
...@@ -1643,8 +1643,13 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new) ...@@ -1643,8 +1643,13 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new)
} }
if (!((old->flags & new->flags) & IRQF_SHARED) || if (!((old->flags & new->flags) & IRQF_SHARED) ||
(oldtype != (new->flags & IRQF_TRIGGER_MASK)) || (oldtype != (new->flags & IRQF_TRIGGER_MASK)))
((old->flags ^ new->flags) & IRQF_ONESHOT)) goto mismatch;
if ((old->flags & IRQF_ONESHOT) &&
(new->flags & IRQF_COND_ONESHOT))
new->flags |= IRQF_ONESHOT;
else if ((old->flags ^ new->flags) & IRQF_ONESHOT)
goto mismatch; goto mismatch;
/* All handlers must agree on per-cpuness */ /* All handlers must agree on per-cpuness */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment