This series is just a start of attaching the ACPI code to the IRQ domain so we map IRQs in a method compatible with FDT booting.
Firstly get the GIC to register itself as the default domain.
Then change the ARM ACPI code to use default domain to map IRQs.
Graeme
From: Graeme Gregory graeme.gregory@linaro.org
If we set the GIC as the default domain then we can access it for IRQ mapping within the ACPI code.
Signed-off-by: Graeme Gregory graeme.gregory@linaro.org --- drivers/irqchip/irq-gic.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip/irq-gic.c index 73b7327..98f7cdf 100644 --- a/drivers/irqchip/irq-gic.c +++ b/drivers/irqchip/irq-gic.c @@ -813,6 +813,10 @@ void __init gic_init_bases(unsigned int gic_nr, int irq_start, if (WARN_ON(!gic->domain)) return;
+#ifdef CONFIG_ACPI + irq_set_default_host(gic->domain); +#endif + #ifdef CONFIG_SMP set_smp_cross_call(gic_raise_softirq); register_cpu_notifier(&gic_cpu_notifier);
From: Graeme Gregory graeme.gregory@linaro.org
Use the default domain to do IRQ mapping. This should be the GIC on the platforms we are using.
Signed-off-by: Graeme Gregory graeme.gregory@linaro.org --- arch/arm/kernel/acpi/boot.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/arch/arm/kernel/acpi/boot.c b/arch/arm/kernel/acpi/boot.c index 496feb5..8848024 100644 --- a/arch/arm/kernel/acpi/boot.c +++ b/arch/arm/kernel/acpi/boot.c @@ -35,6 +35,7 @@ #include <linux/memblock.h> #include <linux/module.h> #include <linux/irq.h> +#include <linux/irqdomain.h> #include <linux/slab.h> #include <linux/bootmem.h> #include <linux/ioport.h> @@ -90,7 +91,9 @@ enum acpi_irq_model_id acpi_irq_model = ACPI_IRQ_MODEL_GIC;
static unsigned int gsi_to_irq(unsigned int gsi) { - return gsi; + int irq = irq_create_mapping(NULL, gsi); + + return irq; }
/*