[openwrt/openwrt] kernel: backport commit reverting genirq patch causing regressions

LEDE Commits lede-commits at lists.infradead.org
Thu Apr 5 02:31:36 PDT 2018


rmilecki pushed a commit to openwrt/openwrt.git, branch lede-17.01:
https://git.lede-project.org/afca23558a2fbfb2cb044ec69bfb9a7447121927

commit afca23558a2fbfb2cb044ec69bfb9a7447121927
Author: Rafał Miłecki <rafal at milecki.pl>
AuthorDate: Thu Apr 5 11:08:27 2018 +0200

    kernel: backport commit reverting genirq patch causing regressions
    
    Switching from kernel 4.4.120 to 4.4.124 introduced a regression in
    the genirq code. It was caused by a commit 9d0273bb1c4b6 ("genirq: Use
    irqd_get_trigger_type to compare the trigger type for shared IRQs").
    
    On bcm53xx it breaks serial console and results in a flood of:
    [   22.078829] genirq: Flags mismatch irq 18. 00000080 (serial) vs. 00000080 (gpio)
    [   22.086432] genirq: Flags mismatch irq 18. 00000080 (serial) vs. 00000080 (gpio)
    [   22.601150] genirq: Flags mismatch irq 18. 00000080 (serial) vs. 00000080 (gpio)
    [   22.608845] genirq: Flags mismatch irq 18. 00000080 (serial) vs. 00000080 (gpio)
    
    Later in the upstream "linux-4.4.y" branch that commit was reverted and
    it was followed by a 4.4.126 release. Until we switch from 4.4.124 to
    4.4.126 (or newer), let's backport that reverting commit.
    
    Fixes: bed0ee7cbfaa5 ("Kernel: bump 4.4 to 4.4.124 for 17.01")
    Signed-off-by: Rafał Miłecki <rafal at milecki.pl>
---
 ...rq-Use-irqd_get_trigger_type-to-compare-t.patch | 37 ++++++++++++++++++++++
 1 file changed, 37 insertions(+)

diff --git a/target/linux/generic/patches-4.4/005-Revert-genirq-Use-irqd_get_trigger_type-to-compare-t.patch b/target/linux/generic/patches-4.4/005-Revert-genirq-Use-irqd_get_trigger_type-to-compare-t.patch
new file mode 100644
index 0000000..5b44e99
--- /dev/null
+++ b/target/linux/generic/patches-4.4/005-Revert-genirq-Use-irqd_get_trigger_type-to-compare-t.patch
@@ -0,0 +1,37 @@
+From 6f879697d6393aa6918537c4c46e44c8579dd2a1 Mon Sep 17 00:00:00 2001
+From: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
+Date: Fri, 30 Mar 2018 10:53:44 +0200
+Subject: [PATCH] Revert "genirq: Use irqd_get_trigger_type to compare the
+ trigger type for shared IRQs"
+
+This reverts commit 9d0273bb1c4b645817eccfe5c5975ea29add3300 which is
+commit 382bd4de61827dbaaf5fb4fb7b1f4be4a86505e7 upstream.
+
+It causes too many problems with the stable tree, and would require too
+many other things to be backported, so just revert it.
+
+Reported-by: Guenter Roeck <linux at roeck-us.net>
+Cc: Thomas Gleixner <tglx at linutronix.de>
+Cc: Hans de Goede <hdegoede at redhat.com>
+Cc: Marc Zyngier <marc.zyngier at arm.com>
+Cc: Thomas Gleixner <tglx at linutronix.de>
+Cc: Sasha Levin <alexander.levin at microsoft.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
+---
+ kernel/irq/manage.c | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+--- a/kernel/irq/manage.c
++++ b/kernel/irq/manage.c
+@@ -1189,10 +1189,8 @@ __setup_irq(unsigned int irq, struct irq
+ 		 * set the trigger type must match. Also all must
+ 		 * agree on ONESHOT.
+ 		 */
+-		unsigned int oldtype = irqd_get_trigger_type(&desc->irq_data);
+-
+ 		if (!((old->flags & new->flags) & IRQF_SHARED) ||
+-		    (oldtype != (new->flags & IRQF_TRIGGER_MASK)) ||
++		    ((old->flags ^ new->flags) & IRQF_TRIGGER_MASK) ||
+ 		    ((old->flags ^ new->flags) & IRQF_ONESHOT))
+ 			goto mismatch;
+ 



More information about the lede-commits mailing list