Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1581369 > unrolled thread

[PATCH] genirq: Reenable shared irq debugging in request_*_irq()

Started byThomas Gleixner <tglx@linutronix.de>
First post2017-02-15 15:50 +0100
Last post2017-02-16 15:40 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] genirq: Reenable shared irq debugging in request_*_irq() Thomas Gleixner <tglx@linutronix.de> - 2017-02-15 15:50 +0100
    [tip:irq/core] genirq: Reenable shared irq debugging in  request_*_irq() tip-bot for Thomas Gleixner <tipbot@zytor.com> - 2017-02-16 15:40 +0100

#1581369 — [PATCH] genirq: Reenable shared irq debugging in request_*_irq()

FromThomas Gleixner <tglx@linutronix.de>
Date2017-02-15 15:50 +0100
Subject[PATCH] genirq: Reenable shared irq debugging in request_*_irq()
Message-ID<tb946-1ef-17@gated-at.bofh.it>
Commit 6d83f94db95c ("genirq: Disable the SHIRQ_DEBUG call in
request_threaded_irq for now") disabled the SHIRQ_DEBUG facility for the
irq request side. Unfortunately the 'for now' part and the _FIXME add on to
the CONFIG_SHIRQ_DEBUG guard got forgotten.

It's unfortunately not possible to keep the original idea of just invoking
the newly installed handler due to the reasons described in the commit
which disabled it, but having this debug facility available makes a lot of
sense.

The only way to regain that testing is to invoke the real interrupt
handling mechanism, which will also invoke an already registered handler,
but that's not an issue because _all_ interrupt handlers need to be
prepared for handling spurious interrupts.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 kernel/irq/manage.c |   10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -1696,23 +1696,17 @@ int request_threaded_irq(unsigned int ir
 		kfree(action);
 	}
 
-#ifdef CONFIG_DEBUG_SHIRQ_FIXME
+#ifdef CONFIG_DEBUG_SHIRQ
 	if (!retval && (irqflags & IRQF_SHARED)) {
 		/*
 		 * It's a shared IRQ -- the driver ought to be prepared for it
 		 * to happen immediately, so let's make sure....
-		 * We disable the irq to make sure that a 'real' IRQ doesn't
-		 * run in parallel with our fake.
 		 */
 		unsigned long flags;
 
-		disable_irq(irq);
 		local_irq_save(flags);
-
-		handler(irq, dev_id);
-
+		generic_handle_irq_desc(desc);
 		local_irq_restore(flags);
-		enable_irq(irq);
 	}
 #endif
 	return retval;

[toc] | [next] | [standalone]


#1582618 — [tip:irq/core] genirq: Reenable shared irq debugging in request_*_irq()

Fromtip-bot for Thomas Gleixner <tipbot@zytor.com>
Date2017-02-16 15:40 +0100
Subject[tip:irq/core] genirq: Reenable shared irq debugging in request_*_irq()
Message-ID<tbvnY-7s2-13@gated-at.bofh.it>
In reply to#1581369
Commit-ID:  f91f694540f3f8ed25da57814fe0c673afd36e7e
Gitweb:     http://git.kernel.org/tip/f91f694540f3f8ed25da57814fe0c673afd36e7e
Author:     Thomas Gleixner <tglx@linutronix.de>
AuthorDate: Wed, 15 Feb 2017 15:43:54 +0100
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Thu, 16 Feb 2017 15:32:19 +0100

genirq: Reenable shared irq debugging in request_*_irq()

Commit 6d83f94db95c ("genirq: Disable the SHIRQ_DEBUG call in
request_threaded_irq for now") disabled the SHIRQ_DEBUG facility for the
irq request side. Unfortunately the 'for now' part and the _FIXME add on to
the CONFIG_SHIRQ_DEBUG guard got forgotten.

It's unfortunately not possible to keep the original idea of just invoking
the newly installed handler due to the reasons described in the commit
which disabled it, but having this debug facility available makes a lot of
sense.

The only way to regain that testing is to invoke the real interrupt
handling mechanism, which will also invoke an already registered handler,
but that's not an issue because _all_ interrupt handlers need to be
prepared for handling spurious interrupts.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/alpine.DEB.2.20.1702151542330.3562@nanos
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

---
 kernel/irq/manage.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index 6b66959..6db4345 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -1696,23 +1696,17 @@ int request_threaded_irq(unsigned int irq, irq_handler_t handler,
 		kfree(action);
 	}
 
-#ifdef CONFIG_DEBUG_SHIRQ_FIXME
+#ifdef CONFIG_DEBUG_SHIRQ
 	if (!retval && (irqflags & IRQF_SHARED)) {
 		/*
 		 * It's a shared IRQ -- the driver ought to be prepared for it
 		 * to happen immediately, so let's make sure....
-		 * We disable the irq to make sure that a 'real' IRQ doesn't
-		 * run in parallel with our fake.
 		 */
 		unsigned long flags;
 
-		disable_irq(irq);
 		local_irq_save(flags);
-
-		handler(irq, dev_id);
-
+		generic_handle_irq_desc(desc);
 		local_irq_restore(flags);
-		enable_irq(irq);
 	}
 #endif
 	return retval;

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web