patch-2.3.48 linux/include/linux/irq.h
Next file: linux/include/linux/isdn.h
Previous file: linux/include/linux/ide.h
Back to the patch index
Back to the overall index
- Lines: 58
- Date:
Sat Feb 26 20:45:58 2000
- Orig file:
v2.3.47/linux/include/linux/irq.h
- Orig date:
Sun Feb 20 21:12:40 2000
diff -u --recursive --new-file v2.3.47/linux/include/linux/irq.h linux/include/linux/irq.h
@@ -12,6 +12,7 @@
#define IRQ_AUTODETECT 16 /* IRQ is being autodetected */
#define IRQ_WAITING 32 /* IRQ not yet seen - for autodetection */
#define IRQ_LEVEL 64 /* IRQ level triggered */
+#define IRQ_MASKED 128 /* IRQ masked - shouldn't be seen again */
/*
* Interrupt controller descriptor. This is all we need
@@ -25,6 +26,7 @@
void (*disable)(unsigned int irq);
void (*ack)(unsigned int irq);
void (*end)(unsigned int irq);
+ void (*set_affinity)(unsigned int irq, unsigned int mask);
};
typedef struct hw_interrupt_type hw_irq_controller;
@@ -37,17 +39,33 @@
* Pad this out to 32 bytes for cache and indexing reasons.
*/
typedef struct {
- unsigned int status; /* IRQ status
- - IRQ_INPROGRESS, IRQ_DISABLED */
- hw_irq_controller *handler; /* never derefed in arch
- independent code */
- struct irqaction *action; /* IRQ action list */
- unsigned int depth; /* Disable depth for nested irq disables */
+ unsigned int status; /* IRQ status */
+ hw_irq_controller *handler;
+ struct irqaction *action; /* IRQ action list */
+ unsigned int depth; /* nested irq disables */
+ spinlock_t lock;
+ unsigned int __pad[3];
} ____cacheline_aligned irq_desc_t;
-#include <asm/hw_irq.h> /* the arch dependent stuff */
+extern irq_desc_t irq_desc [NR_IRQS];
+
+typedef struct {
+ unsigned int __local_irq_count;
+ unsigned int __local_bh_count;
+ atomic_t __nmi_counter;
+ unsigned int __pad[5];
+} ____cacheline_aligned irq_cpustat_t;
+
+extern irq_cpustat_t irq_stat [NR_CPUS];
-extern irq_desc_t irq_desc[NR_IRQS];
+/*
+ * Simple wrappers reducing source bloat
+ */
+#define local_irq_count(cpu) (irq_stat[(cpu)].__local_irq_count)
+#define local_bh_count(cpu) (irq_stat[(cpu)].__local_bh_count)
+#define nmi_counter(cpu) (irq_stat[(cpu)].__nmi_counter)
+
+#include <asm/hw_irq.h> /* the arch dependent stuff */
extern int handle_IRQ_event(unsigned int, struct pt_regs *, struct irqaction *);
extern spinlock_t irq_controller_lock;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)