From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: x86@kernel.org
Cc: linux-kernel@vger.kernel.org, sodaville@linutronix.de,
Grant Likely <grant.likely@secretlab.ca>,
Torben Hohn <torbenh@linutronix.de>,
Florian Fainelli <florian@openwrt.org>
Subject: [PATCH 1/2] x86/dtb: make irq host list accessible
Date: Wed, 27 Apr 2011 16:34:23 +0200 [thread overview]
Message-ID: <20110427143423.GB15211@linutronix.de> (raw)
From: Torben Hohn <torbenh@linutronix.de>
There is an gpio irq chip comming which needs this from the outside.
There is no EXPORT_SYMBOL because this does not yet work in modules.
Signed-off-by: Torben Hohn <torbenh@linutronix.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
arch/x86/include/asm/irq_controller.h | 2 ++
arch/x86/kernel/devicetree.c | 15 +++++++++++----
2 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/arch/x86/include/asm/irq_controller.h b/arch/x86/include/asm/irq_controller.h
index 423bbbd..04fecc0 100644
--- a/arch/x86/include/asm/irq_controller.h
+++ b/arch/x86/include/asm/irq_controller.h
@@ -9,4 +9,6 @@ struct irq_domain {
struct list_head l;
};
+extern void irq_add_of_interrupt_host(struct irq_domain *ih);
+extern void irq_remove_of_interrupt_host(struct irq_domain *ih);
#endif
diff --git a/arch/x86/kernel/devicetree.c b/arch/x86/kernel/devicetree.c
index e90f084..58c4208 100644
--- a/arch/x86/kernel/devicetree.c
+++ b/arch/x86/kernel/devicetree.c
@@ -26,8 +26,7 @@ static DEFINE_RAW_SPINLOCK(big_irq_lock);
int __initdata of_ioapic;
-#ifdef CONFIG_X86_IO_APIC
-static void add_interrupt_host(struct irq_domain *ih)
+void irq_add_of_interrupt_host(struct irq_domain *ih)
{
unsigned long flags;
@@ -35,7 +34,15 @@ static void add_interrupt_host(struct irq_domain *ih)
list_add(&ih->l, &irq_domains);
raw_spin_unlock_irqrestore(&big_irq_lock, flags);
}
-#endif
+
+void irq_remove_of_interrupt_host(struct irq_domain *ih)
+{
+ unsigned long flags;
+
+ raw_spin_lock_irqsave(&big_irq_lock, flags);
+ list_del(&ih->l);
+ raw_spin_unlock_irqrestore(&big_irq_lock, flags);
+}
static struct irq_domain *get_ih_from_node(struct device_node *controller)
{
@@ -415,7 +422,7 @@ static void __init ioapic_add_ofnode(struct device_node *np)
id->controller = np;
id->xlate = ioapic_xlate;
id->priv = (void *)i;
- add_interrupt_host(id);
+ irq_add_of_interrupt_host(id);
return;
}
}
--
1.7.4.4
next reply other threads:[~2011-04-27 14:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-27 14:34 Sebastian Andrzej Siewior [this message]
2011-04-29 22:26 ` Grant Likely
2011-04-30 9:02 ` Sebastian Andrzej Siewior
2011-05-02 21:59 ` Grant Likely
2011-05-18 10:47 ` Sebastian Andrzej Siewior
2011-05-26 20:06 ` Grant Likely
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=20110427143423.GB15211@linutronix.de \
--to=bigeasy@linutronix.de \
--cc=florian@openwrt.org \
--cc=grant.likely@secretlab.ca \
--cc=linux-kernel@vger.kernel.org \
--cc=sodaville@linutronix.de \
--cc=torbenh@linutronix.de \
--cc=x86@kernel.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
all inboxes | Powered by JetHome®