x86: convert to generic irq_domain
PATCH 1/1 x86: convert to generic irq_domain
From: Grant Likely <grant.likely-s3s/[email protected]>
This patch adds irq_domain infrastructure for translating from hardware irq numbers to linux irqs. This is particularly important for architectures adding device tree support because the current implementation (excluding PowerPC and SPARC) cannot handle translation for more than a single interrupt controller. irq_domain supports device tree translation for any number of interrupt controllers.
This is the x86 portion of irq_domain support originally posted by Grant Likely with only a minor change removing irq_hw_number_t:
http://lists.ozlabs.org/pipermail/devicetree-discuss/2011-July/006685.html
This is needed to avoid struct collisions with the generic irq_domain support being added to kernel/irq/generic-chip.c.
Boot tested, but not on a DT enabled platform.
--- arch/x86/include/asm/irq_controller.h | 12 ---- arch/x86/include/asm/prom.h | 10 --- arch/x86/kernel/devicetree.c | 101 +++++++++++---------------------- 3 files changed, 34 insertions(+), 89 deletions(-) delete mode 100644 arch/x86/include/asm/irq_controller.h
arch/x86/include/asm/irq_controller.h deleted +0 -12
@@ -1,12 +0,0 @@ -#ifndef __IRQ_CONTROLLER__ -#define __IRQ_CONTROLLER__ - -struct irq_domain { -int (*xlate)(struct irq_domain *h,const u32 *intspec,u32 intsize, -u32 *out_hwirq,u32 *out_type); -void *priv; -struct device_node *controller; -struct list_head l; -}; - -#endif
arch/x86/include/asm/prom.h +0 -10
@@ -21,7 +21,6 @@#include <asm/irq.h> #include <linux/atomic.h> #include <asm/setup.h> -#include <asm/irq_controller.h> #ifdef CONFIG_OF extern int of_ioapic;
@@ -43,15 +42,6 @@ extern char cmd_line[COMMAND_LINE_SIZE];#define pci_address_to_pio pci_address_to_piounsigned long pci_address_to_pio (phys_addr_t addr); -/** -* irq_dispose_mapping - Unmap an interrupt -* @virq: linux virq number of the interrupt to unmap -* -* FIXME: We really should implement proper virq handling like power, -* but that's going to be major surgery. -*/ -static inline void irq_dispose_mapping (unsigned int virq) { } -#define HAVE_ARCH_DEVTREE_FIXUPS #endif /* __ASSEMBLY__ */
arch/x86/kernel/devicetree.c +34 -67
147 lines not on this page · raw message
Signature · 1 line
1.7.5.4
Quoted 4 lines · * Rob Herring | 2011-12-16 23:18:49 [-0600]:
This is needed to avoid struct collisions with the generic
irq_domainsupport being added tokernel/irq/generic-chip.c.Boot tested, but not on a DT enabled platform.
I had a patch in my tree for this and it did not work. One bug was fixed by eef24a ("irq: Fix check for already initialized irq_domain in irq_domain_add"). Something else come up after that. I will grab a board test it later and let you know :)
Sebastian
Sebastian,
Quoted 5 lines · Sebastian Andrzej Siewior
Quoted 3 lines · * Rob Herring | 2011-12-16 23:18:49 [-0600]:
This is needed to avoid struct collisions with the generic
irq_domainsupport being added tokernel/irq/generic-chip.c.
Quoted 7 lines
Quoted 1 line
Boot tested, but not on a DT enabled platform.
I had a patch in my tree for this and it did not work. One bug was fixed by eef24a ("irq: Fix check for already initialized
irq_domaininirq_domain_add"). Something else come up after that. I will grab a board test it later and let you know :)
Any update on testing this?
Rob
Quoted 1 line · * Rob Herring | 2011-12-30 09:22:40 [-0600]:
Any update on testing this?
Just got back from vacation, will do this soon.
Quoted 2 lines
Rob
Sebastian
Quoted 6 lines · * Rob Herring | 2011-12-16 23:18:49 [-0600]:
From: Grant Likely <grant.likely-s3s/[email protected]>
This is needed to avoid struct collisions with the generic
irq_domainsupport being added tokernel/irq/generic-chip.c.Boot tested, but not on a DT enabled platform.
If you add this piece into your patch:
Quoted 1 line
From
34d9bb9b582136c8412e14ad870c8aaaa28c9e15Mon Sep 17 00:00:00 2001
From: Sebastian Andrzej Siewior <[email protected]>
Date: Sun, 15 Jan 2012 16:52:13 +0100
Subject: [PATCH] fixup of "x86: convert to generic irq_domain"
--- arch/x86/Kconfig | 1 + arch/x86/kernel/devicetree.c | 1 + 2 files changed, 2 insertions(+), 0 deletions(-)
arch/x86/Kconfig +1 -0
@@ -397,6 +397,7 @@ config X86_INTEL_CE select X86_REBOOTFIXUPS select OF select OF_EARLY_FLATTREE + select IRQ_DOMAIN ---help--- Select for the Intel CE media processor (CE4100) SOC. This option compiles in support for the CE4100 SOC for settop
arch/x86/kernel/devicetree.c +1 -0
@@ -4,6 +4,7 @@#include <linux/bootmem.h> #include <linux/export.h> #include <linux/io.h> +#include <linux/irqdomain.h> #include <linux/interrupt.h> #include <linux/list.h> #include <linux/of.h>
Signature · 3 lines
you add my acked-by to it. Sebastian
Quoted 9 lines · Sebastian Andrzej Siewior
Quoted 6 lines · * Rob Herring | 2011-12-16 23:18:49 [-0600]:
From: Grant Likely <grant.likely-s3s/[email protected]>
This is needed to avoid struct collisions with the generic
irq_domainsupport being added tokernel/irq/generic-chip.c.Boot tested, but not on a DT enabled platform.
Quoted 8 lines
If you add this piece into your patch:
From
34d9bb9b582136c8412e14ad870c8aaaa28c9e15Mon Sep 17 00:00:00 2001
From: Sebastian Andrzej Siewior <[email protected]>
Date: Sun, 15 Jan 2012 16:52:13 +0100
Subject: [PATCH] fixup of "x86: convert to genericirq_domain"Signed-off-by Sebastian Andrzej Siewior <[email protected]>
It's a little late for 3.3, and I've got a major rework to irq_domain almost ready which will get merged in 3.4. I'll rework the patch on top of that series and get you to retest.
g.
Quoted 34 lines
--- arch/x86/Kconfig | 1 + arch/x86/kernel/devicetree.c | 1 + 2 files changed, 2 insertions(+), 0 deletions(-)arch/x86/Kconfig +1
-0@@ -397,6 +397,7 @@ config X86_INTEL_CE select X86_REBOOTFIXUPS select OF select OF_EARLY_FLATTREE + select IRQ_DOMAIN ---help--- Select for the Intel CE media processor (CE4100) SOC. This option compiles in support for the CE4100 SOC for settoparch/x86/kernel/devicetree.c +1
-0@@ -4,6 +4,7 @@#include <linux/bootmem.h> #include <linux/export.h> #include <linux/io.h> +#include <linux/irqdomain.h> #include <linux/interrupt.h> #include <linux/list.h> #include <linux/of.h> Signature · 3 lines
you add my acked-by to it. Sebastian