Loading include/linux/irq.h +13 −0 Original line number Diff line number Diff line Loading @@ -191,10 +191,23 @@ struct irq_desc { } ____cacheline_internodealigned_in_smp; extern struct irq_desc *irq_to_desc(unsigned int irq); extern struct irq_desc *__irq_to_desc(unsigned int irq); #ifndef CONFIG_HAVE_SPARSE_IRQ #ifndef CONFIG_HAVE_DYN_ARRAY /* could be removed if we get rid of all irq_desc reference */ extern struct irq_desc irq_desc[NR_IRQS]; #else extern struct irq_desc *irq_desc; #endif #else extern struct irq_desc *sparse_irqs; #endif #define kstat_irqs_this_cpu(DESC) \ ((DESC)->kstat_irqs[smp_processor_id()]) Loading kernel/irq/handle.c +24 −4 Original line number Diff line number Diff line Loading @@ -112,7 +112,6 @@ static void init_kstat_irqs(struct irq_desc *desc, int nr_desc, int nr) } } static void __init init_work(void *data) { struct dyn_array *da = data; Loading Loading @@ -149,9 +148,27 @@ static int __init parse_nr_irq_desc(char *arg) early_param("nr_irq_desc", parse_nr_irq_desc); static struct irq_desc *sparse_irqs; struct irq_desc *sparse_irqs; DEFINE_DYN_ARRAY(sparse_irqs, sizeof(struct irq_desc), nr_irq_desc, PAGE_SIZE, init_work); struct irq_desc *__irq_to_desc(unsigned int irq) { struct irq_desc *desc; BUG_ON(irq == -1U); desc = &sparse_irqs[0]; while (desc) { if (desc->irq == irq) return desc; if (desc->irq == -1U) return NULL; desc = desc->next; } return NULL; } struct irq_desc *irq_to_desc(unsigned int irq) { struct irq_desc *desc, *desc_pri; Loading Loading @@ -208,8 +225,7 @@ struct irq_desc *irq_to_desc(unsigned int irq) return desc; } #else static struct irq_desc *irq_desc; struct irq_desc *irq_desc; DEFINE_DYN_ARRAY(irq_desc, sizeof(struct irq_desc), nr_irqs, PAGE_SIZE, init_work); #endif Loading Loading @@ -239,6 +255,10 @@ struct irq_desc *irq_to_desc(unsigned int irq) return NULL; } struct irq_desc *__irq_to_desc(unsigned int irq) { return irq_to_desc(irq); } #endif /* Loading Loading
include/linux/irq.h +13 −0 Original line number Diff line number Diff line Loading @@ -191,10 +191,23 @@ struct irq_desc { } ____cacheline_internodealigned_in_smp; extern struct irq_desc *irq_to_desc(unsigned int irq); extern struct irq_desc *__irq_to_desc(unsigned int irq); #ifndef CONFIG_HAVE_SPARSE_IRQ #ifndef CONFIG_HAVE_DYN_ARRAY /* could be removed if we get rid of all irq_desc reference */ extern struct irq_desc irq_desc[NR_IRQS]; #else extern struct irq_desc *irq_desc; #endif #else extern struct irq_desc *sparse_irqs; #endif #define kstat_irqs_this_cpu(DESC) \ ((DESC)->kstat_irqs[smp_processor_id()]) Loading
kernel/irq/handle.c +24 −4 Original line number Diff line number Diff line Loading @@ -112,7 +112,6 @@ static void init_kstat_irqs(struct irq_desc *desc, int nr_desc, int nr) } } static void __init init_work(void *data) { struct dyn_array *da = data; Loading Loading @@ -149,9 +148,27 @@ static int __init parse_nr_irq_desc(char *arg) early_param("nr_irq_desc", parse_nr_irq_desc); static struct irq_desc *sparse_irqs; struct irq_desc *sparse_irqs; DEFINE_DYN_ARRAY(sparse_irqs, sizeof(struct irq_desc), nr_irq_desc, PAGE_SIZE, init_work); struct irq_desc *__irq_to_desc(unsigned int irq) { struct irq_desc *desc; BUG_ON(irq == -1U); desc = &sparse_irqs[0]; while (desc) { if (desc->irq == irq) return desc; if (desc->irq == -1U) return NULL; desc = desc->next; } return NULL; } struct irq_desc *irq_to_desc(unsigned int irq) { struct irq_desc *desc, *desc_pri; Loading Loading @@ -208,8 +225,7 @@ struct irq_desc *irq_to_desc(unsigned int irq) return desc; } #else static struct irq_desc *irq_desc; struct irq_desc *irq_desc; DEFINE_DYN_ARRAY(irq_desc, sizeof(struct irq_desc), nr_irqs, PAGE_SIZE, init_work); #endif Loading Loading @@ -239,6 +255,10 @@ struct irq_desc *irq_to_desc(unsigned int irq) return NULL; } struct irq_desc *__irq_to_desc(unsigned int irq) { return irq_to_desc(irq); } #endif /* Loading