asm-generic: Raise default NR_IRQS when using sparse IRQs
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 22 lines · Mark Brown
Rather than have each platform using sparse IRQs pick a suitably large
NR_IRQSfor use with sparse IRQs make the default high when they are enabled. We pick 64k as there is still a bitmap of IRQs that is allocated statically, and as we all know 64k should be enough for anyone.Signed-off-by Mark Brown <[email protected]>--- include/asm-generic/irq.h | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)include/asm-generic/irq.h +1
-1@@ -4,11 +4,15 @@/* * NR_IRQS is the upper bound of how many interrupts can be handled * in the platform. It is used to size the static irq_map array, -* so don't make it too big. +* so don't make it too big unless we're using sparse IRQs. */
include/asm-generic/irq.h line 18
Quoted 10 lines
include/asm-generic/irq.h +4
-0#ifndef NR_IRQS +#ifdef CONFIG_SPARSE_IRQ +#define NR_IRQS 0xffff +#else #define NR_IRQS 64#endif +#endif static inline int irq_canonicalize (int irq) {
May be
#define NR_IRQS 15*NR_CPUS
Quoted 10 lines · Pavel Vasilyev
Quoted 5 lines · Mark Brown
Rather than have each platform using sparse IRQs pick a suitably large
NR_IRQSfor use with sparse IRQs make the default high when they are enabled. We pick 64k as there is still a bitmap of IRQs that is allocated statically, and as we all know 64k should be enough for anyone.May be
#define NR_IRQS 15*NR_CPUS
No, this is missing the point - that's way too low for many systems (most except x86 I guess). The idea is that since we're using sparse IRQs we've much less reason to restrict the number of IRQs than we do when we've got a statically allocated table so we can have a higher default, meaning less need for platforms to individually select a higher number.