Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

sh: intc: remove dependency on NR_IRQS

SH intc has a compile time dependency on NR_IRQS. Make this dependency a
local define so that shmobile (and ARM in general) can have run-time
NR_IRQS setting.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>

+10 -4
+1 -1
drivers/sh/intc/balancing.c
··· 9 9 */ 10 10 #include "internals.h" 11 11 12 - static unsigned long dist_handle[NR_IRQS]; 12 + static unsigned long dist_handle[INTC_NR_IRQS]; 13 13 14 14 void intc_balancing_enable(unsigned int irq) 15 15 {
+1 -1
drivers/sh/intc/core.c
··· 42 42 * - this needs to be at least 2 for 5-bit priorities on 7780 43 43 */ 44 44 static unsigned int default_prio_level = 2; /* 2 - 16 */ 45 - static unsigned int intc_prio_level[NR_IRQS]; /* for now */ 45 + static unsigned int intc_prio_level[INTC_NR_IRQS]; /* for now */ 46 46 47 47 unsigned int intc_get_dfl_prio_level(void) 48 48 {
+1 -1
drivers/sh/intc/handle.c
··· 13 13 #include <linux/spinlock.h> 14 14 #include "internals.h" 15 15 16 - static unsigned long ack_handle[NR_IRQS]; 16 + static unsigned long ack_handle[INTC_NR_IRQS]; 17 17 18 18 static intc_enum __init intc_grp_id(struct intc_desc *desc, 19 19 intc_enum enum_id)
+1 -1
drivers/sh/intc/virq.c
··· 17 17 #include <linux/export.h> 18 18 #include "internals.h" 19 19 20 - static struct intc_map_entry intc_irq_xlate[NR_IRQS]; 20 + static struct intc_map_entry intc_irq_xlate[INTC_NR_IRQS]; 21 21 22 22 struct intc_virq_list { 23 23 unsigned int irq;
+6
include/linux/sh_intc.h
··· 3 3 4 4 #include <linux/ioport.h> 5 5 6 + #ifdef CONFIG_SUPERH 7 + #define INTC_NR_IRQS 512 8 + #else 9 + #define INTC_NR_IRQS 1024 10 + #endif 11 + 6 12 /* 7 13 * Convert back and forth between INTEVT and IRQ values. 8 14 */