mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org,
	Thomas Gleixner <tglx@linutronix.de>,
	Peter Zijlstra <peterz@infradead.org>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: [GIT PULL] IRQ fixes
Date: Sun, 11 Jul 2021 15:40:29 +0200	[thread overview]
Message-ID: <YOr0zV5US6ajbTaM@gmail.com> (raw)

Linus,

Please pull the latest irq/urgent git tree from:

   git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git irq-urgent-2021-07-11

   # HEAD: 48400483565f0b7e633cbef94b139ff295b59de3 Merge tag 'irqchip-fixes-5.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into irq/urgent

Two fixes:

 - Fix a MIPS IRQ handling RCU bug
 - Remove a DocBook annotation for a parameter that doesn't exist anymore

 Thanks,

	Ingo

------------------>
Marc Zyngier (1):
      irqchip/mips: Fix RCU violation when using irqdomain lookup on interrupt entry

Randy Dunlap (1):
      genirq/irqdesc: Drop excess kernel-doc entry @lookup


 arch/mips/include/asm/irq.h      |  3 +++
 arch/mips/kernel/irq.c           | 16 ++++++++++++++++
 drivers/irqchip/irq-mips-cpu.c   | 10 ++++++----
 drivers/irqchip/irq-mips-gic.c   |  8 ++++----
 drivers/irqchip/irq-pic32-evic.c |  5 ++---
 kernel/irq/irqdesc.c             |  1 -
 6 files changed, 31 insertions(+), 12 deletions(-)

diff --git a/arch/mips/include/asm/irq.h b/arch/mips/include/asm/irq.h
index d1477ecb1af9..57561e0e6e8d 100644
--- a/arch/mips/include/asm/irq.h
+++ b/arch/mips/include/asm/irq.h
@@ -57,6 +57,9 @@ asmlinkage void plat_irq_dispatch(void);
 
 extern void do_IRQ(unsigned int irq);
 
+struct irq_domain;
+extern void do_domain_IRQ(struct irq_domain *domain, unsigned int irq);
+
 extern void arch_init_irq(void);
 extern void spurious_interrupt(void);
 
diff --git a/arch/mips/kernel/irq.c b/arch/mips/kernel/irq.c
index 85b6c60f285d..d20e002b3246 100644
--- a/arch/mips/kernel/irq.c
+++ b/arch/mips/kernel/irq.c
@@ -21,6 +21,7 @@
 #include <linux/kallsyms.h>
 #include <linux/kgdb.h>
 #include <linux/ftrace.h>
+#include <linux/irqdomain.h>
 
 #include <linux/atomic.h>
 #include <linux/uaccess.h>
@@ -107,3 +108,18 @@ void __irq_entry do_IRQ(unsigned int irq)
 	irq_exit();
 }
 
+#ifdef CONFIG_IRQ_DOMAIN
+void __irq_entry do_domain_IRQ(struct irq_domain *domain, unsigned int hwirq)
+{
+	struct irq_desc *desc;
+
+	irq_enter();
+	check_stack_overflow();
+
+	desc = irq_resolve_mapping(domain, hwirq);
+	if (likely(desc))
+		handle_irq_desc(desc);
+
+	irq_exit();
+}
+#endif
diff --git a/drivers/irqchip/irq-mips-cpu.c b/drivers/irqchip/irq-mips-cpu.c
index 0bbb0b2d0dd5..0c7ae71a0af0 100644
--- a/drivers/irqchip/irq-mips-cpu.c
+++ b/drivers/irqchip/irq-mips-cpu.c
@@ -127,7 +127,6 @@ static struct irq_chip mips_mt_cpu_irq_controller = {
 asmlinkage void __weak plat_irq_dispatch(void)
 {
 	unsigned long pending = read_c0_cause() & read_c0_status() & ST0_IM;
-	unsigned int virq;
 	int irq;
 
 	if (!pending) {
@@ -137,12 +136,15 @@ asmlinkage void __weak plat_irq_dispatch(void)
 
 	pending >>= CAUSEB_IP;
 	while (pending) {
+		struct irq_domain *d;
+
 		irq = fls(pending) - 1;
 		if (IS_ENABLED(CONFIG_GENERIC_IRQ_IPI) && irq < 2)
-			virq = irq_linear_revmap(ipi_domain, irq);
+			d = ipi_domain;
 		else
-			virq = irq_linear_revmap(irq_domain, irq);
-		do_IRQ(virq);
+			d = irq_domain;
+
+		do_domain_IRQ(d, irq);
 		pending &= ~BIT(irq);
 	}
 }
diff --git a/drivers/irqchip/irq-mips-gic.c b/drivers/irqchip/irq-mips-gic.c
index b146e069bf5b..54c7092cc61d 100644
--- a/drivers/irqchip/irq-mips-gic.c
+++ b/drivers/irqchip/irq-mips-gic.c
@@ -169,8 +169,8 @@ static void gic_handle_shared_int(bool chained)
 			generic_handle_domain_irq(gic_irq_domain,
 						  GIC_SHARED_TO_HWIRQ(intr));
 		else
-			do_IRQ(irq_find_mapping(gic_irq_domain,
-						GIC_SHARED_TO_HWIRQ(intr)));
+			do_domain_IRQ(gic_irq_domain,
+				      GIC_SHARED_TO_HWIRQ(intr));
 	}
 }
 
@@ -320,8 +320,8 @@ static void gic_handle_local_int(bool chained)
 			generic_handle_domain_irq(gic_irq_domain,
 						  GIC_LOCAL_TO_HWIRQ(intr));
 		else
-			do_IRQ(irq_find_mapping(gic_irq_domain,
-						GIC_LOCAL_TO_HWIRQ(intr)));
+			do_domain_IRQ(gic_irq_domain,
+				      GIC_LOCAL_TO_HWIRQ(intr));
 	}
 }
 
diff --git a/drivers/irqchip/irq-pic32-evic.c b/drivers/irqchip/irq-pic32-evic.c
index 34c4b4ffacd1..1d9bb28d13e5 100644
--- a/drivers/irqchip/irq-pic32-evic.c
+++ b/drivers/irqchip/irq-pic32-evic.c
@@ -42,11 +42,10 @@ static void __iomem *evic_base;
 
 asmlinkage void __weak plat_irq_dispatch(void)
 {
-	unsigned int irq, hwirq;
+	unsigned int hwirq;
 
 	hwirq = readl(evic_base + REG_INTSTAT) & 0xFF;
-	irq = irq_linear_revmap(evic_irq_domain, hwirq);
-	do_IRQ(irq);
+	do_domain_IRQ(evic_irq_domain, hwirq);
 }
 
 static struct evic_chip_data *irqd_to_priv(struct irq_data *data)
diff --git a/kernel/irq/irqdesc.c b/kernel/irq/irqdesc.c
index f4dd5186858a..fadb93766020 100644
--- a/kernel/irq/irqdesc.c
+++ b/kernel/irq/irqdesc.c
@@ -682,7 +682,6 @@ EXPORT_SYMBOL_GPL(generic_handle_domain_irq);
  *                     usually for a root interrupt controller
  * @domain:	The domain where to perform the lookup
  * @hwirq:	The HW irq number to convert to a logical one
- * @lookup:	Whether to perform the domain lookup or not
  * @regs:	Register file coming from the low-level handling code
  *
  * Returns:	0 on success, or -EINVAL if conversion has failed

             reply	other threads:[~2021-07-11 13:40 UTC|newest]

Thread overview: 78+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-11 13:40 Ingo Molnar [this message]
2021-07-11 18:22 ` pr-tracker-bot
  -- strict thread matches above, loose matches on Subject: below --
2026-07-05  7:26 Ingo Molnar
2026-07-05 15:46 ` pr-tracker-bot
2026-06-23 16:55 Ingo Molnar
2026-06-24  0:20 ` pr-tracker-bot
2026-05-24  6:52 Ingo Molnar
2026-05-24 20:12 ` pr-tracker-bot
2026-05-17  6:20 Ingo Molnar
2026-05-17 19:28 ` pr-tracker-bot
2026-03-29  5:10 Ingo Molnar
2026-03-29 17:29 ` pr-tracker-bot
2026-03-15  2:59 Ingo Molnar
2026-03-15 18:47 ` pr-tracker-bot
2026-03-01  8:48 Ingo Molnar
2026-03-01 21:37 ` pr-tracker-bot
2026-02-01  8:40 Ingo Molnar
2026-02-01 19:46 ` pr-tracker-bot
2026-01-24  9:20 Ingo Molnar
2026-01-24 18:00 ` pr-tracker-bot
2026-01-11 10:22 Ingo Molnar
2026-01-12 19:38 ` pr-tracker-bot
2025-12-12  9:33 Ingo Molnar
2025-12-13 18:12 ` pr-tracker-bot
2025-05-17 13:37 Ingo Molnar
2025-05-17 16:27 ` pr-tracker-bot
2025-05-04  7:08 Ingo Molnar
2025-05-04 15:23 ` pr-tracker-bot
2025-04-18 20:26 Ingo Molnar
2025-04-18 21:15 ` pr-tracker-bot
2025-04-10 21:38 Ingo Molnar
2025-04-10 22:52 ` pr-tracker-bot
2025-02-22 13:48 Ingo Molnar
2025-02-22 19:23 ` pr-tracker-bot
2024-06-08  7:52 Ingo Molnar
2024-06-08 16:50 ` pr-tracker-bot
2022-08-21 21:10 Ingo Molnar
2022-08-21 23:13 ` pr-tracker-bot
2020-08-03 10:54 Ingo Molnar
2020-08-03 22:10 ` pr-tracker-bot
2019-06-29  8:50 Ingo Molnar
2019-06-29 11:45 ` pr-tracker-bot
2019-04-12 11:52 Ingo Molnar
2019-04-13  4:05 ` pr-tracker-bot
2019-02-10  9:08 Ingo Molnar
2019-02-10 18:30 ` pr-tracker-bot
2018-11-03 22:59 Ingo Molnar
2018-11-04  1:13 ` Linus Torvalds
2017-12-06 22:09 Ingo Molnar
2017-10-14 15:57 Ingo Molnar
2017-09-24 11:21 Ingo Molnar
2017-09-12 15:30 Ingo Molnar
2017-07-21 10:07 [GIT PULL] irq fixes Ingo Molnar
2017-02-11 18:06 [GIT PULL] IRQ fixes Ingo Molnar
2016-10-22 10:40 Ingo Molnar
2016-10-18 10:18 [GIT PULL] irq fixes Ingo Molnar
2016-07-08 13:37 Ingo Molnar
2016-04-23 11:15 Ingo Molnar
2016-01-31  9:01 [GIT PULL] IRQ fixes Ingo Molnar
2015-07-18  2:36 [GIT PULL] irq fixes Ingo Molnar
2015-02-20 13:35 [GIT PULL] IRQ fixes Ingo Molnar
2012-02-27 10:26 [GIT PULL] irq fixes Ingo Molnar
2011-09-30 18:16 Ingo Molnar
2011-09-30 18:35 ` Josh Boyer
2011-09-30 19:43 ` Thomas Gleixner
2011-06-07 18:48 Ingo Molnar
2011-03-25 13:03 Ingo Molnar
2011-03-18 13:49 Ingo Molnar
2011-02-22 16:19 Ingo Molnar
2011-02-06 11:58 Ingo Molnar
2010-03-26 15:09 Ingo Molnar
2009-06-20 17:26 [GIT PULL] IRQ fixes Ingo Molnar
2009-04-26 17:13 [GIT PULL] irq fixes Ingo Molnar
2009-04-09 15:39 Ingo Molnar
2009-01-30 23:10 [git pull] " Ingo Molnar
2009-01-06 16:13 Ingo Molnar
2008-11-29 19:41 Ingo Molnar
2008-10-21 14:14 Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YOr0zV5US6ajbTaM@gmail.com \
    --to=mingo@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox