Re: [PATCH 02/30] ARM: exynos: prepare for sparse IRQ
On Thu, Apr 11, 2013 at 9:04 AM, Arnd Bergmann wrote: > When we enable CONFIG_SPARSE_IRQ, we have to set the value of NR_IRQS in > the machine_desc for legacy IRQ domains, and any file referring to the > number of interrupts or a specific number must include the mach/irqs.h > header file explicitly. It's really wanted feature. > > Signed-off-by: Arnd Bergmann Acked-by: Kyungmin Park > --- > arch/arm/mach-exynos/dev-uart.c | 1 + > arch/arm/mach-exynos/include/mach/irqs.h | 5 - > arch/arm/mach-exynos/mach-armlex4210.c | 2 ++ > arch/arm/mach-exynos/mach-exynos4-dt.c | 3 +++ > arch/arm/mach-exynos/mach-exynos5-dt.c | 2 ++ > arch/arm/mach-exynos/mach-nuri.c | 2 ++ > arch/arm/mach-exynos/mach-origen.c | 2 ++ > arch/arm/mach-exynos/mach-smdk4x12.c | 2 ++ > arch/arm/mach-exynos/mach-smdkv310.c | 3 +++ > arch/arm/plat-samsung/irq-vic-timer.c| 1 + > arch/arm/plat-samsung/pm.c | 1 + > arch/arm/plat-samsung/s5p-irq.c | 1 + > 12 files changed, 24 insertions(+), 1 deletion(-) > > diff --git a/arch/arm/mach-exynos/dev-uart.c b/arch/arm/mach-exynos/dev-uart.c > index 7c42f4b..c48aff0 100644 > --- a/arch/arm/mach-exynos/dev-uart.c > +++ b/arch/arm/mach-exynos/dev-uart.c > @@ -20,6 +20,7 @@ > #include > #include > #include > +#include > > #include > > diff --git a/arch/arm/mach-exynos/include/mach/irqs.h > b/arch/arm/mach-exynos/include/mach/irqs.h > index 35fe6d5..c72f59d 100644 > --- a/arch/arm/mach-exynos/include/mach/irqs.h > +++ b/arch/arm/mach-exynos/include/mach/irqs.h > @@ -467,7 +467,10 @@ > #define IRQ_TIMER_BASE (IRQ_GPIO_END + 64) > > /* Set the default NR_IRQS */ > +#define EXYNOS_NR_IRQS (IRQ_TIMER_BASE + IRQ_TIMER_COUNT) > > -#define NR_IRQS(IRQ_TIMER_BASE + > IRQ_TIMER_COUNT) > +#ifndef CONFIG_SPARSE_IRQ > +#define NR_IRQSEXYNOS_NR_IRQS > +#endif > > #endif /* __ASM_ARCH_IRQS_H */ > diff --git a/arch/arm/mach-exynos/mach-armlex4210.c > b/arch/arm/mach-exynos/mach-armlex4210.c > index 2c23b65..a503e02 100644 > --- a/arch/arm/mach-exynos/mach-armlex4210.c > +++ b/arch/arm/mach-exynos/mach-armlex4210.c > @@ -25,6 +25,7 @@ > #include > #include > > +#include > #include > > #include "common.h" > @@ -196,6 +197,7 @@ static void __init armlex4210_machine_init(void) > MACHINE_START(ARMLEX4210, "ARMLEX4210") > /* Maintainer: Alim Akhtar */ > .atag_offset= 0x100, > + .nr_irqs= EXYNOS_NR_IRQS, > .smp= smp_ops(exynos_smp_ops), > .init_irq = exynos4_init_irq, > .map_io = armlex4210_map_io, > diff --git a/arch/arm/mach-exynos/mach-exynos4-dt.c > b/arch/arm/mach-exynos/mach-exynos4-dt.c > index b9ed834..5f23682 100644 > --- a/arch/arm/mach-exynos/mach-exynos4-dt.c > +++ b/arch/arm/mach-exynos/mach-exynos4-dt.c > @@ -20,6 +20,8 @@ > > #include > #include > +#include > + > > #include "common.h" > > @@ -54,6 +56,7 @@ static void __init exynos4_reserve(void) > } > DT_MACHINE_START(EXYNOS4210_DT, "Samsung Exynos4 (Flattened Device Tree)") > /* Maintainer: Thomas Abraham */ > + .nr_irqs= EXYNOS_NR_IRQS, > .smp= smp_ops(exynos_smp_ops), > .init_irq = exynos4_init_irq, > .map_io = exynos4_dt_map_io, > diff --git a/arch/arm/mach-exynos/mach-exynos5-dt.c > b/arch/arm/mach-exynos/mach-exynos5-dt.c > index 753b94f..8b7456a 100644 > --- a/arch/arm/mach-exynos/mach-exynos5-dt.c > +++ b/arch/arm/mach-exynos/mach-exynos5-dt.c > @@ -16,6 +16,7 @@ > #include > > #include > +#include > #include > > #include > @@ -76,6 +77,7 @@ static void __init exynos5_reserve(void) > > DT_MACHINE_START(EXYNOS5_DT, "SAMSUNG EXYNOS5 (Flattened Device Tree)") > /* Maintainer: Kukjin Kim */ > + .nr_irqs= EXYNOS_NR_IRQS, > .init_irq = exynos5_init_irq, > .smp= smp_ops(exynos_smp_ops), > .map_io = exynos5_dt_map_io, > diff --git a/arch/arm/mach-exynos/mach-nuri.c > b/arch/arm/mach-exynos/mach-nuri.c > index 0c10852..fbae331 100644 > --- a/arch/arm/mach-exynos/mach-nuri.c > +++ b/arch/arm/mach-exynos/mach-nuri.c > @@ -53,6 +53,7 @@ > #include > #include > > +#include > #include > > #include "common.h" > @@ -1376,6 +1377,7 @@ static void __init nuri_machine_init(void) > MACHINE_START(NURI, "NURI") > /* Maintainer: Kyungmin Park */ > .atag_offset= 0x100, > + .nr_irqs= EXYNOS_NR_IRQS, > .smp= smp_ops(exynos_smp_ops), > .init_irq = exynos4_init_irq, > .map_io = nuri_map_io, > diff --git a/arch/arm/mach-exynos/mach-origen.c > b/arch/arm/mach-exynos/mach-origen.c > index f662345..a3ee06a 100644 > --- a/arch/arm/mach-exynos/mach-origen.c > +++ b/arch/arm/mach-exynos/mach-origen.c > @@ -46,6 +46,7 @@ > #include > > #include >
[PATCH 02/30] ARM: exynos: prepare for sparse IRQ
When we enable CONFIG_SPARSE_IRQ, we have to set the value of NR_IRQS in the machine_desc for legacy IRQ domains, and any file referring to the number of interrupts or a specific number must include the mach/irqs.h header file explicitly. Signed-off-by: Arnd Bergmann --- arch/arm/mach-exynos/dev-uart.c | 1 + arch/arm/mach-exynos/include/mach/irqs.h | 5 - arch/arm/mach-exynos/mach-armlex4210.c | 2 ++ arch/arm/mach-exynos/mach-exynos4-dt.c | 3 +++ arch/arm/mach-exynos/mach-exynos5-dt.c | 2 ++ arch/arm/mach-exynos/mach-nuri.c | 2 ++ arch/arm/mach-exynos/mach-origen.c | 2 ++ arch/arm/mach-exynos/mach-smdk4x12.c | 2 ++ arch/arm/mach-exynos/mach-smdkv310.c | 3 +++ arch/arm/plat-samsung/irq-vic-timer.c| 1 + arch/arm/plat-samsung/pm.c | 1 + arch/arm/plat-samsung/s5p-irq.c | 1 + 12 files changed, 24 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-exynos/dev-uart.c b/arch/arm/mach-exynos/dev-uart.c index 7c42f4b..c48aff0 100644 --- a/arch/arm/mach-exynos/dev-uart.c +++ b/arch/arm/mach-exynos/dev-uart.c @@ -20,6 +20,7 @@ #include #include #include +#include #include diff --git a/arch/arm/mach-exynos/include/mach/irqs.h b/arch/arm/mach-exynos/include/mach/irqs.h index 35fe6d5..c72f59d 100644 --- a/arch/arm/mach-exynos/include/mach/irqs.h +++ b/arch/arm/mach-exynos/include/mach/irqs.h @@ -467,7 +467,10 @@ #define IRQ_TIMER_BASE (IRQ_GPIO_END + 64) /* Set the default NR_IRQS */ +#define EXYNOS_NR_IRQS (IRQ_TIMER_BASE + IRQ_TIMER_COUNT) -#define NR_IRQS(IRQ_TIMER_BASE + IRQ_TIMER_COUNT) +#ifndef CONFIG_SPARSE_IRQ +#define NR_IRQSEXYNOS_NR_IRQS +#endif #endif /* __ASM_ARCH_IRQS_H */ diff --git a/arch/arm/mach-exynos/mach-armlex4210.c b/arch/arm/mach-exynos/mach-armlex4210.c index 2c23b65..a503e02 100644 --- a/arch/arm/mach-exynos/mach-armlex4210.c +++ b/arch/arm/mach-exynos/mach-armlex4210.c @@ -25,6 +25,7 @@ #include #include +#include #include #include "common.h" @@ -196,6 +197,7 @@ static void __init armlex4210_machine_init(void) MACHINE_START(ARMLEX4210, "ARMLEX4210") /* Maintainer: Alim Akhtar */ .atag_offset= 0x100, + .nr_irqs= EXYNOS_NR_IRQS, .smp= smp_ops(exynos_smp_ops), .init_irq = exynos4_init_irq, .map_io = armlex4210_map_io, diff --git a/arch/arm/mach-exynos/mach-exynos4-dt.c b/arch/arm/mach-exynos/mach-exynos4-dt.c index b9ed834..5f23682 100644 --- a/arch/arm/mach-exynos/mach-exynos4-dt.c +++ b/arch/arm/mach-exynos/mach-exynos4-dt.c @@ -20,6 +20,8 @@ #include #include +#include + #include "common.h" @@ -54,6 +56,7 @@ static void __init exynos4_reserve(void) } DT_MACHINE_START(EXYNOS4210_DT, "Samsung Exynos4 (Flattened Device Tree)") /* Maintainer: Thomas Abraham */ + .nr_irqs= EXYNOS_NR_IRQS, .smp= smp_ops(exynos_smp_ops), .init_irq = exynos4_init_irq, .map_io = exynos4_dt_map_io, diff --git a/arch/arm/mach-exynos/mach-exynos5-dt.c b/arch/arm/mach-exynos/mach-exynos5-dt.c index 753b94f..8b7456a 100644 --- a/arch/arm/mach-exynos/mach-exynos5-dt.c +++ b/arch/arm/mach-exynos/mach-exynos5-dt.c @@ -16,6 +16,7 @@ #include #include +#include #include #include @@ -76,6 +77,7 @@ static void __init exynos5_reserve(void) DT_MACHINE_START(EXYNOS5_DT, "SAMSUNG EXYNOS5 (Flattened Device Tree)") /* Maintainer: Kukjin Kim */ + .nr_irqs= EXYNOS_NR_IRQS, .init_irq = exynos5_init_irq, .smp= smp_ops(exynos_smp_ops), .map_io = exynos5_dt_map_io, diff --git a/arch/arm/mach-exynos/mach-nuri.c b/arch/arm/mach-exynos/mach-nuri.c index 0c10852..fbae331 100644 --- a/arch/arm/mach-exynos/mach-nuri.c +++ b/arch/arm/mach-exynos/mach-nuri.c @@ -53,6 +53,7 @@ #include #include +#include #include #include "common.h" @@ -1376,6 +1377,7 @@ static void __init nuri_machine_init(void) MACHINE_START(NURI, "NURI") /* Maintainer: Kyungmin Park */ .atag_offset= 0x100, + .nr_irqs= EXYNOS_NR_IRQS, .smp= smp_ops(exynos_smp_ops), .init_irq = exynos4_init_irq, .map_io = nuri_map_io, diff --git a/arch/arm/mach-exynos/mach-origen.c b/arch/arm/mach-exynos/mach-origen.c index f662345..a3ee06a 100644 --- a/arch/arm/mach-exynos/mach-origen.c +++ b/arch/arm/mach-exynos/mach-origen.c @@ -46,6 +46,7 @@ #include #include +#include #include #include "common.h" @@ -811,6 +812,7 @@ static void __init origen_machine_init(void) MACHINE_START(ORIGEN, "ORIGEN") /* Maintainer: JeongHyeon Kim */ .atag_offset= 0x100, + .nr_irqs= EXYNOS_NR_IRQS, .smp= smp_ops(exynos_smp_ops), .init_irq = exynos4_init_irq, .map