linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: robherring2@gmail.com (Rob Herring)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/9] arm: add set_handle_irq() to register the parent IRQ controller handler function
Date: Tue, 20 Nov 2012 20:58:25 -0600	[thread overview]
Message-ID: <1353466713-18967-2-git-send-email-robherring2@gmail.com> (raw)
In-Reply-To: <1353466713-18967-1-git-send-email-robherring2@gmail.com>

From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

In order to allow irqchip drivers to register their IRQ handling
function as the parent IRQ controller handler function, we provide a
convenience function. This will avoid poking directly into the global
handle_arch_irq variable.

Suggested by Arnd Bergmann.

[Rob Herring: remove warning. 1st one to initialize wins.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 arch/arm/include/asm/mach/irq.h |    1 +
 arch/arm/kernel/irq.c           |   10 ++++++++++
 2 files changed, 11 insertions(+)

diff --git a/arch/arm/include/asm/mach/irq.h b/arch/arm/include/asm/mach/irq.h
index 15cb035..18c8830 100644
--- a/arch/arm/include/asm/mach/irq.h
+++ b/arch/arm/include/asm/mach/irq.h
@@ -22,6 +22,7 @@ extern int show_fiq_list(struct seq_file *, int);
 
 #ifdef CONFIG_MULTI_IRQ_HANDLER
 extern void (*handle_arch_irq)(struct pt_regs *);
+extern void set_handle_irq(void (*handle_irq)(struct pt_regs *));
 #endif
 
 /*
diff --git a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c
index 8961650..8e4ef4c 100644
--- a/arch/arm/kernel/irq.c
+++ b/arch/arm/kernel/irq.c
@@ -117,6 +117,16 @@ void __init init_IRQ(void)
 	machine_desc->init_irq();
 }
 
+#ifdef CONFIG_MULTI_IRQ_HANDLER
+void __init set_handle_irq(void (*handle_irq)(struct pt_regs *))
+{
+	if (handle_arch_irq)
+		return;
+
+	handle_arch_irq = handle_irq;
+}
+#endif
+
 #ifdef CONFIG_SPARSE_IRQ
 int __init arch_probe_nr_irqs(void)
 {
-- 
1.7.10.4

  reply	other threads:[~2012-11-21  2:58 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-21  2:58 [PATCH v3 0/9] GIC and VIC clean-ups Rob Herring
2012-11-21  2:58 ` Rob Herring [this message]
2012-11-21  2:58 ` [PATCH 2/9] ARM: mach-ux500: use SGI0 to wake up the other core Rob Herring
2012-11-21  2:58 ` [PATCH 3/9] ARM: GIC: remove assembly ifdefs from gic.h Rob Herring
2012-11-21  2:58 ` [PATCH 4/9] ARM: GIC: remove direct use of gic_raise_softirq Rob Herring
2012-11-26 21:37   ` Rob Herring
2012-12-06 20:33     ` Rob Herring
2012-11-21  2:58 ` [PATCH 5/9] ARM: GIC: set handle_arch_irq in GIC initialization Rob Herring
2012-11-21  2:58 ` [PATCH 6/9] ARM: remove mach .handle_irq for GIC users Rob Herring
2012-11-21  3:42   ` viresh kumar
2012-11-21 12:03   ` Kukjin Kim
2012-11-22  6:57   ` Shawn Guo
2012-11-21  2:58 ` [PATCH 7/9] ARM: VIC: shrink down vic.h Rob Herring
2012-11-21  2:58 ` [PATCH 8/9] ARM: VIC: set handle_arch_irq in VIC initialization Rob Herring
2012-11-21  2:58 ` [PATCH 9/9] ARM: remove mach .handle_irq for VIC users Rob Herring
2012-11-21  3:00   ` Mark Brown
2012-11-21  3:41   ` viresh kumar
2012-11-21 12:04   ` Kukjin Kim
2012-11-23 12:06   ` Jamie Iles
2012-11-26 17:26   ` H Hartley Sweeten
2012-11-26 19:19   ` Linus Walleij
2012-11-21  7:36 ` [PATCH v3 0/9] GIC and VIC clean-ups Olof Johansson

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=1353466713-18967-2-git-send-email-robherring2@gmail.com \
    --to=robherring2@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).