x86/dtb: make irq host list accessible
PATCH 1/2 x86/dtb: make irq host list accessible
From: Torben Hohn <[email protected]>
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.
--- arch/x86/include/asm/irq_controller.h | 2 ++ arch/x86/kernel/devicetree.c | 15 +++++++++++---- 2 files changed, 13 insertions(+), 4 deletions(-)
arch/x86/include/asm/irq_controller.h +2 -0
@@ -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
arch/x86/kernel/devicetree.c +11 -4
@@ -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 ; } }
Signature · 1 line
1.7.4.4
Quoted 11 lines · Sebastian Andrzej Siewior
From: Torben Hohn <[email protected]>
There is an gpio irq chip comming which needs this from the outside. There is no
EXPORT_SYMBOLbecause this does not yet work in modules.Signed-off-by Torben Hohn <[email protected]>Signed-off-by Sebastian Andrzej Siewior <[email protected]>--- arch/x86/include/asm/irq_controller.h | 2 ++ arch/x86/kernel/devicetree.c | 15 +++++++++++---- 2 files changed, 13 insertions(+), 4 deletions(-)
Can you rework this to sit on top of the of_irq_domain series I sent out yesterday? I *really* hope to get of_irq_domain merged into .40, but this change would conflict.
Thanks,
g.
Quoted 55 lines
arch/x86/include/asm/irq_controller.h +2
-0@@ -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 arch/x86/kernel/devicetree.c +11
-4@@ -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 ; } }Signature · 1 line
1.7.4.4
Quoted 9 lines · * Grant Likely | 2011-04-29 16:26:00 [-0600]:
Quoted 5 lines · Sebastian Andrzej Siewior
From: Torben Hohn <[email protected]>
There is an gpio irq chip comming which needs this from the outside. There is no
EXPORT_SYMBOLbecause this does not yet work in modules.Can you rework this to sit on top of the
of_irq_domainseries I sent out yesterday? I *really* hope to getof_irq_domainmerged into .40, but this change would conflict.
This patch should be obsolete with of_irq_domain beeing generic now. Could you please take look at the gpio driver? If there is nothing obvious wrong I would rework it to work with of_irq_domain() and repost.
Quoted 2 lines
Thanks,
g.
Sebastian
Quoted 8 lines · Sebastian Andrzej Siewior
Quoted 6 lines · * Grant Likely | 2011-04-29 16:26:00 [-0600]:
Quoted 5 lines · Sebastian Andrzej Siewior
From: Torben Hohn <[email protected]>
There is an gpio irq chip comming which needs this from the outside. There is no
EXPORT_SYMBOLbecause this does not yet work in modules.
Quoted 8 lines
Quoted 3 lines
Can you rework this to sit on top of the
of_irq_domainseries I sent out yesterday? I *really* hope to getof_irq_domainmerged into .40, but this change would conflict.This patch should be obsolete with
of_irq_domainbeeing generic now. Could you please take look at the gpio driver? If there is nothing obvious wrong I would rework it to work withof_irq_domain()and repost.
okay, will do.
g.
Quoted 6 lines · Grant Likely
Quoted 4 lines
This patch should be obsolete with
of_irq_domainbeeing generic now. Could you please take look at the gpio driver? If there is nothing obvious wrong I would rework it to work withof_irq_domain()and repost.okay, will do.
Ping :)
Quoted 1 line
g.
Sebastian
Quoted 9 lines · Sebastian Andrzej Siewior
Quoted 6 lines · Grant Likely
Quoted 4 lines
This patch should be obsolete with
of_irq_domainbeeing generic now. Could you please take look at the gpio driver? If there is nothing obvious wrong I would rework it to work withof_irq_domain()and repost.okay, will do.
Ping :)
The of_irq_domain patches needed heavy rework after review, and the rework didn't happen until late last night. Unfortunately that means I also didn't get a change to look at the gpio driver, and so it won't make it into $NEXT_KERNEL (entirely my fault, and I'm sorry).
However, I do hope that the new irq_domain will get finalized quickly so that I can pick up your patches early in $NEXT_KERNEL stabilization cycle.
g.