Allow boards to specify the exact number of IRQs needed
RFC PATCH 3/3 Allow boards to specify the exact number of IRQs needed
commit 988a6a2bd322d83eba42c05cb6cb77a74cba056b
Author: Eric Miao <[email protected]> Date: Thu Feb 4 11:06:35 2010 -0800
[ARM] Allow boards to specify the exact number of IRQs needed
This will only take effect if SPARSE_IRQ is enabled, any board that depends on this _only_ has to explicitly select SPARSE_IRQ.
arch/arm/include/asm/irq.h +1 -0
@@ -19,6 +19,7 @@#ifndef __ASSEMBLY__struct irqaction ; +extern int arch_nr_irqs;extern void migrate_irqs (void );extern void asm_do_IRQ (unsigned int ,struct pt_regs *);
arch/arm/include/asm/mach/arch.h +1 -0
@@ -20,6 +20,7 @@ struct machine_desc {* by assembler code in head.S, head-common.S */ unsigned int nr;/* architecture number */ +unsigned int num_irqs;/* number of IRQs */ unsigned int phys_io;/* start of physical io */ unsigned int io_pg_offst;/* byte offset for io * page tabe entry */
arch/arm/kernel/irq.c +1 -1
@@ -168,7 +168,7 @@ void __init init_IRQ(void)#ifdef CONFIG_SPARSE_IRQ int __init arch_probe_nr_irqs (void ) { - nr_irqs =NR_IRQS ; + nr_irqs = arch_nr_irqs ? arch_nr_irqs :NR_IRQS ;return 0 ; }#endif
arch/arm/kernel/setup.c +1 -0
@@ -755,6 +755,7 @@ void __init setup_arch(char **cmdline_p)/* * Set up various architecture-specific pointers */ + arch_nr_irqs = mdesc->num_irqs; init_arch_irq = mdesc->init_irq; system_timer = mdesc->timer; init_machine = mdesc->init_machine;
RFC PATCH 3/3 Allow boards to specify the exact number of IRQs needed
Quoted 10 lines · Eric Miao
commit
988a6a2bd322d83eba42c05cb6cb77a74cba056bAuthor: Eric Miao <[email protected]> Date: Thu Feb 4 11:06:35 2010 -0800[ARM] Allow boards to specify the exact number of IRQs needed
This will only take effect if
SPARSE_IRQis enabled, any board that depends on this _only_ has to explicitly selectSPARSE_IRQ.Signed-off-by Eric Miao <[email protected]>
Is this going to cause errors when the core support tries to register irq chips over the number that the board itself supports?
Quoted 54 lines
arch/arm/include/asm/irq.h +1
-0@@ -19,6 +19,7 @@#ifndef __ASSEMBLY__struct irqaction ; +extern int arch_nr_irqs;extern void migrate_irqs (void );extern void asm_do_IRQ (unsigned int ,struct pt_regs *);arch/arm/include/asm/mach/arch.h +1
-0@@ -20,6 +20,7 @@ struct machine_desc {* by assembler code in head.S, head-common.S */ unsigned int nr;/* architecture number */ +unsigned int num_irqs;/* number of IRQs */ unsigned int phys_io;/* start of physical io */ unsigned int io_pg_offst;/* byte offset for io * page tabe entry */ arch/arm/kernel/irq.c +1
-1@@ -168,7 +168,7 @@ void __init init_IRQ(void)#ifdef CONFIG_SPARSE_IRQ int __init arch_probe_nr_irqs (void ) { - nr_irqs =NR_IRQS ; + nr_irqs = arch_nr_irqs ? arch_nr_irqs :NR_IRQS ;return 0 ; }#endif arch/arm/kernel/setup.c +1
-0@@ -755,6 +755,7 @@ void __init setup_arch(char **cmdline_p)/* * Set up various architecture-specific pointers */ + arch_nr_irqs = mdesc->num_irqs; init_arch_irq = mdesc->init_irq; system_timer = mdesc->timer; init_machine = mdesc->init_machine;_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Signature · 5 lines
-- Ben Q: What's a light-year? A: One-third less calories than a regular year.
RFC PATCH 3/3 Allow boards to specify the exact number of IRQs needed
In reply to Eric MiaoQuoted 10 lines · Eric Miao
commit
988a6a2bd322d83eba42c05cb6cb77a74cba056bAuthor: Eric Miao <[email protected]> Date: Thu Feb 4 11:06:35 2010 -0800[ARM] Allow boards to specify the exact number of IRQs needed
This will only take effect if
SPARSE_IRQis enabled, any board that depends on this _only_ has to explicitly selectSPARSE_IRQ.Signed-off-by Eric Miao <[email protected]>
out of interest, what happens if the user wants to instantiate an irq that is above the board's nr_irq setting?
Signature · 4 lines
Ben Q: What's a light-year? A: One-third less calories than a regular year.
RFC PATCH 3/3 Allow boards to specify the exact number of IRQs needed
Quoted 7 lines · Ben Dooks
Quoted 6 lines · Eric Miao
commit
988a6a2bd322d83eba42c05cb6cb77a74cba056b
Author: Eric Miao <[email protected]>
Date: ? Thu Feb 4 11:06:35 2010 -0800? ? [ARM] Allow boards to specify the exact number of IRQs needed
Quoted 8 lines
Quoted 4 lines
? ? This will only take effect if
SPARSE_IRQis enabled, any board that ? ? depends on this _only_ has to explicitly selectSPARSE_IRQ.? ? Signed-off-by: Eric Miao <[email protected]>
out of interest, what happens if the user wants to instantiate an irq that is above the board's
nr_irqsetting?
Normally, he doesn't. Well, the board's nr_irq should have included all the possible IRQs used on that specific board.
Taking into account of expansion at run-time (e.g. insertion into a baseboard dynamically), he's still able to do that with
irq_to_desc_alloc_node()
instead of irq_to_desc()
explicitly when adding elements to irq_desc[].