#include <linux/smp.h>
-#ifndef CONFIG_GENERIC_HARDIRQS
-# define nr_irqs NR_IRQS
-
-# define for_each_irq_desc(irq, desc) \
- for (irq = 0; irq < nr_irqs; irq++)
-#else
-extern int nr_irqs;
-
-# define for_each_irq_desc(irq, desc) \
- for (irq = 0, desc = irq_desc; irq < nr_irqs; irq++, desc++)
-#endif
-
#ifndef CONFIG_S390
#include <linux/linkage.h>
#include <linux/spinlock.h>
#include <linux/cpumask.h>
#include <linux/irqreturn.h>
+#include <linux/irqnr.h>
#include <linux/errno.h>
#include <asm/irq.h>
const char *typename;
};
-struct timer_rand_state;
-struct irq_2_iommu;
/**
* struct irq_desc - interrupt descriptor
*
*/
struct irq_desc {
unsigned int irq;
-#ifdef CONFIG_HAVE_DYN_ARRAY
- unsigned int *kstat_irqs;
-#endif
irq_flow_handler_t handle_irq;
struct irq_chip *chip;
struct msi_desc *msi_desc;
} ____cacheline_internodealigned_in_smp;
-#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
static inline struct irq_desc *irq_to_desc(unsigned int irq)
{
return (irq < nr_irqs) ? irq_desc + irq : NULL;
}
-static inline struct irq_desc *irq_to_desc_alloc(unsigned int irq)
-{
- return irq_to_desc(irq);
-}
-
-#ifdef CONFIG_HAVE_DYN_ARRAY
-#define kstat_irqs_this_cpu(DESC) \
- ((DESC)->kstat_irqs[smp_processor_id()])
-#endif
-
/*
* Migration helpers for obsolete names, they will go away:
*/