diff options
Diffstat (limited to 'include/linux/irq_work.h')
| -rw-r--r-- | include/linux/irq_work.h | 8 | 
1 files changed, 8 insertions, 0 deletions
| diff --git a/include/linux/irq_work.h b/include/linux/irq_work.h index ec2a47a81e42..8cd11a223260 100644 --- a/include/linux/irq_work.h +++ b/include/linux/irq_work.h @@ -3,6 +3,7 @@  #define _LINUX_IRQ_WORK_H  #include <linux/smp_types.h> +#include <linux/rcuwait.h>  /*   * An entry can be in one of four states: @@ -16,11 +17,13 @@  struct irq_work {  	struct __call_single_node node;  	void (*func)(struct irq_work *); +	struct rcuwait irqwait;  };  #define __IRQ_WORK_INIT(_func, _flags) (struct irq_work){	\  	.node = { .u_flags = (_flags), },			\  	.func = (_func),					\ +	.irqwait = __RCUWAIT_INITIALIZER(irqwait),		\  }  #define IRQ_WORK_INIT(_func) __IRQ_WORK_INIT(_func, 0) @@ -46,6 +49,11 @@ static inline bool irq_work_is_busy(struct irq_work *work)  	return atomic_read(&work->node.a_flags) & IRQ_WORK_BUSY;  } +static inline bool irq_work_is_hard(struct irq_work *work) +{ +	return atomic_read(&work->node.a_flags) & IRQ_WORK_HARD_IRQ; +} +  bool irq_work_queue(struct irq_work *work);  bool irq_work_queue_on(struct irq_work *work, int cpu); |