diff options
Diffstat (limited to 'include/linux/interrupt.h')
-rw-r--r-- | include/linux/interrupt.h | 44 |
1 files changed, 29 insertions, 15 deletions
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h index 838cf5a5bd7..f7b01b9a35b 100644 --- a/include/linux/interrupt.h +++ b/include/linux/interrupt.h @@ -44,6 +44,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 @@ -52,22 +55,29 @@ #define IRQF_TIMER 0x00000200 #define IRQF_PERCPU 0x00000400 #define IRQF_NOBALANCING 0x00000800 +#define IRQF_IRQPOLL 0x00001000 /* - * Migration helpers. Scheduled for removal in 1/2007 + * Migration helpers. Scheduled for removal in 9/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 +static inline +unsigned long __deprecated deprecated_irq_flag(unsigned long flag) +{ + return flag; +} + +#define SA_INTERRUPT deprecated_irq_flag(IRQF_DISABLED) +#define SA_SAMPLE_RANDOM deprecated_irq_flag(IRQF_SAMPLE_RANDOM) +#define SA_SHIRQ deprecated_irq_flag(IRQF_SHARED) +#define SA_PROBEIRQ deprecated_irq_flag(IRQF_PROBE_SHARED) +#define SA_PERCPU deprecated_irq_flag(IRQF_PERCPU) + +#define SA_TRIGGER_LOW deprecated_irq_flag(IRQF_TRIGGER_LOW) +#define SA_TRIGGER_HIGH deprecated_irq_flag(IRQF_TRIGGER_HIGH) +#define SA_TRIGGER_FALLING deprecated_irq_flag(IRQF_TRIGGER_FALLING) +#define SA_TRIGGER_RISING deprecated_irq_flag(IRQF_TRIGGER_RISING) +#define SA_TRIGGER_MASK deprecated_irq_flag(IRQF_TRIGGER_MASK) typedef irqreturn_t (*irq_handler_t)(int, void *); @@ -83,11 +93,11 @@ 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, +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); @@ -185,10 +195,14 @@ static inline int disable_irq_wake(unsigned int irq) * validator need to define the methods below in their asm/irq.h * files, under an #ifdef CONFIG_LOCKDEP section. */ -# ifndef CONFIG_LOCKDEP +#ifndef CONFIG_LOCKDEP # define disable_irq_nosync_lockdep(irq) disable_irq_nosync(irq) +# define disable_irq_nosync_lockdep_irqsave(irq, flags) \ + disable_irq_nosync(irq) # define disable_irq_lockdep(irq) disable_irq(irq) # define enable_irq_lockdep(irq) enable_irq(irq) +# define enable_irq_lockdep_irqrestore(irq, flags) \ + enable_irq(irq) # endif #endif /* CONFIG_GENERIC_HARDIRQS */ |