]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
6.11-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 2 Dec 2024 14:30:36 +0000 (15:30 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 2 Dec 2024 14:30:36 +0000 (15:30 +0100)
added patches:
irqdomain-always-associate-interrupts-for-legacy-domains.patch

queue-6.11/irqdomain-always-associate-interrupts-for-legacy-domains.patch [new file with mode: 0644]
queue-6.11/series

diff --git a/queue-6.11/irqdomain-always-associate-interrupts-for-legacy-domains.patch b/queue-6.11/irqdomain-always-associate-interrupts-for-legacy-domains.patch
new file mode 100644 (file)
index 0000000..5504839
--- /dev/null
@@ -0,0 +1,85 @@
+From 24d02c4e53e2f02da16b2ae8a1bc92553110ca25 Mon Sep 17 00:00:00 2001
+From: Matti Vaittinen <mazziesaccount@gmail.com>
+Date: Tue, 13 Aug 2024 14:34:27 +0300
+Subject: irqdomain: Always associate interrupts for legacy domains
+
+From: Matti Vaittinen <mazziesaccount@gmail.com>
+
+commit 24d02c4e53e2f02da16b2ae8a1bc92553110ca25 upstream.
+
+The unification of irq_domain_create_legacy() missed the fact that
+interrupts must be associated even when the Linux interrupt number provided
+in the first_irq argument is 0.
+
+This breaks all call sites of irq_domain_create_legacy() which supply 0 as
+the first_irq argument.
+
+Enforce the association for legacy domains in __irq_domain_instantiate() to
+cure this.
+
+[ tglx: Massaged it slightly. ]
+
+Fixes: 70114e7f7585 ("irqdomain: Simplify simple and legacy domain creation")
+Reported-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
+Signed-off-by Matti Vaittinen <mazziesaccount@gmail.com>
+Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
+Tested-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
+Link: https://lore.kernel.org/all/c3379142-10bc-4f14-b8ac-a46927aeac38@gmail.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ kernel/irq/irqdomain.c |   16 ++++++++++------
+ 1 file changed, 10 insertions(+), 6 deletions(-)
+
+--- a/kernel/irq/irqdomain.c
++++ b/kernel/irq/irqdomain.c
+@@ -300,7 +300,7 @@ static void irq_domain_instantiate_descs
+ }
+ static struct irq_domain *__irq_domain_instantiate(const struct irq_domain_info *info,
+-                                                 bool cond_alloc_descs)
++                                                 bool cond_alloc_descs, bool force_associate)
+ {
+       struct irq_domain *domain;
+       int err;
+@@ -336,8 +336,12 @@ static struct irq_domain *__irq_domain_i
+       if (cond_alloc_descs && info->virq_base > 0)
+               irq_domain_instantiate_descs(info);
+-      /* Legacy interrupt domains have a fixed Linux interrupt number */
+-      if (info->virq_base > 0) {
++      /*
++       * Legacy interrupt domains have a fixed Linux interrupt number
++       * associated. Other interrupt domains can request association by
++       * providing a Linux interrupt number > 0.
++       */
++      if (force_associate || info->virq_base > 0) {
+               irq_domain_associate_many(domain, info->virq_base, info->hwirq_base,
+                                         info->size - info->hwirq_base);
+       }
+@@ -360,7 +364,7 @@ err_domain_free:
+  */
+ struct irq_domain *irq_domain_instantiate(const struct irq_domain_info *info)
+ {
+-      return __irq_domain_instantiate(info, false);
++      return __irq_domain_instantiate(info, false, false);
+ }
+ EXPORT_SYMBOL_GPL(irq_domain_instantiate);
+@@ -464,7 +468,7 @@ struct irq_domain *irq_domain_create_sim
+               .ops            = ops,
+               .host_data      = host_data,
+       };
+-      struct irq_domain *domain = __irq_domain_instantiate(&info, true);
++      struct irq_domain *domain = __irq_domain_instantiate(&info, true, false);
+       return IS_ERR(domain) ? NULL : domain;
+ }
+@@ -513,7 +517,7 @@ struct irq_domain *irq_domain_create_leg
+               .ops            = ops,
+               .host_data      = host_data,
+       };
+-      struct irq_domain *domain = irq_domain_instantiate(&info);
++      struct irq_domain *domain = __irq_domain_instantiate(&info, false, true);
+       return IS_ERR(domain) ? NULL : domain;
+ }
index efa8ea9d0de135955797ea920831f4ebd75d61c6..3ef00476f826b82c63109898970a82e3bd521618 100644 (file)
@@ -635,3 +635,4 @@ dm-cache-fix-warnings-about-duplicate-slab-caches.patch
 dm-bufio-fix-warnings-about-duplicate-slab-caches.patch
 asoc-intel-sst-fix-used-of-uninitialized-ctx-to-log-an-error.patch
 soc-qcom-socinfo-fix-revision-check-in-qcom_socinfo_probe.patch
+irqdomain-always-associate-interrupts-for-legacy-domains.patch