]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/interrupt.h
Merge git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched
[linux-2.6-omap-h63xx.git] / include / linux / interrupt.h
index 0319f665dd3f565158548c8ec20b6a281482e42a..2306920fa38811bf1bdae40343217e8c497362d5 100644 (file)
@@ -11,8 +11,6 @@
 #include <linux/hardirq.h>
 #include <linux/sched.h>
 #include <linux/irqflags.h>
-#include <linux/bottom_half.h>
-#include <linux/device.h>
 #include <asm/atomic.h>
 #include <asm/ptrace.h>
 #include <asm/system.h>
@@ -44,6 +42,9 @@
  * IRQF_TIMER - Flag to mark this interrupt as timer interrupt
  * IRQF_PERCPU - Interrupt is per cpu
  * IRQF_NOBALANCING - Flag to exclude this interrupt from irq balancing
+ * IRQF_IRQPOLL - Interrupt is used for polling (only the interrupt that is
+ *                registered first in an shared interrupt is considered for
+ *                performance reasons)
  */
 #define IRQF_DISABLED          0x00000020
 #define IRQF_SAMPLE_RANDOM     0x00000040
 #define IRQF_TIMER             0x00000200
 #define IRQF_PERCPU            0x00000400
 #define IRQF_NOBALANCING       0x00000800
-
-/*
- * Migration helpers. Scheduled for removal in 1/2007
- * Do not use for new code !
- */
-#define SA_INTERRUPT           IRQF_DISABLED
-#define SA_SAMPLE_RANDOM       IRQF_SAMPLE_RANDOM
-#define SA_SHIRQ               IRQF_SHARED
-#define SA_PROBEIRQ            IRQF_PROBE_SHARED
-#define SA_PERCPU              IRQF_PERCPU
-
-#define SA_TRIGGER_LOW         IRQF_TRIGGER_LOW
-#define SA_TRIGGER_HIGH                IRQF_TRIGGER_HIGH
-#define SA_TRIGGER_FALLING     IRQF_TRIGGER_FALLING
-#define SA_TRIGGER_RISING      IRQF_TRIGGER_RISING
-#define SA_TRIGGER_MASK                IRQF_TRIGGER_MASK
+#define IRQF_IRQPOLL           0x00001000
 
 typedef irqreturn_t (*irq_handler_t)(int, void *);
 
@@ -83,11 +69,13 @@ struct irqaction {
 };
 
 extern irqreturn_t no_action(int cpl, void *dev_id);
-extern int request_irq(unsigned int, irq_handler_t handler,
+extern int __must_check request_irq(unsigned int, irq_handler_t handler,
                       unsigned long, const char *, void *);
 extern void free_irq(unsigned int, void *);
 
-extern int devm_request_irq(struct device *dev, unsigned int irq,
+struct device;
+
+extern int __must_check devm_request_irq(struct device *dev, unsigned int irq,
                            irq_handler_t handler, unsigned long irqflags,
                            const char *devname, void *dev_id);
 extern void devm_free_irq(struct device *dev, unsigned int irq, void *dev_id);
@@ -110,11 +98,11 @@ extern void devm_free_irq(struct device *dev, unsigned int irq, void *dev_id);
 # define local_irq_enable_in_hardirq() local_irq_enable()
 #endif
 
-#ifdef CONFIG_GENERIC_HARDIRQS
 extern void disable_irq_nosync(unsigned int irq);
 extern void disable_irq(unsigned int irq);
 extern void enable_irq(unsigned int irq);
 
+#ifdef CONFIG_GENERIC_HARDIRQS
 /*
  * Special lockdep variants of irq disabling/enabling.
  * These should be used for locking constructs that
@@ -195,6 +183,15 @@ static inline int disable_irq_wake(unsigned int irq)
                                                enable_irq(irq)
 # endif
 
+static inline int enable_irq_wake(unsigned int irq)
+{
+       return 0;
+}
+
+static inline int disable_irq_wake(unsigned int irq)
+{
+       return 0;
+}
 #endif /* CONFIG_GENERIC_HARDIRQS */
 
 #ifndef __ARCH_SET_SOFTIRQ_PENDING
@@ -231,6 +228,16 @@ static inline void __deprecated save_and_cli(unsigned long *x)
 #define save_and_cli(x)        save_and_cli(&x)
 #endif /* CONFIG_SMP */
 
+/* Some architectures might implement lazy enabling/disabling of
+ * interrupts. In some cases, such as stop_machine, we might want
+ * to ensure that after a local_irq_disable(), interrupts have
+ * really been disabled in hardware. Such architectures need to
+ * implement the following hook.
+ */
+#ifndef hard_irq_disable
+#define hard_irq_disable()     do { } while(0)
+#endif
+
 /* PLEASE, avoid to allocate new softirqs, if you need not _really_ high
    frequency threaded job scheduling. For almost all the purposes
    tasklets are more than enough. F.e. all serial device BHs et