aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/irq_work.h
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2013-02-21 16:16:55 +0100
committerRalf Baechle <ralf@linux-mips.org>2013-02-22 10:07:30 +0100
commitedb15d83a875a1f4b1576188844db5c330c3267d (patch)
tree74d54eab401b6ccf2a6ad4821227108a8d160f03 /include/linux/irq_work.h
parentMerge branch 'mips-next-3.9' of git://git.linux-mips.org/pub/scm/john/linux-john into mips-for-linux-next (diff)
parentMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next (diff)
downloadlinux-dev-edb15d83a875a1f4b1576188844db5c330c3267d.tar.xz
linux-dev-edb15d83a875a1f4b1576188844db5c330c3267d.zip
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux into mips-for-linux-next
Conflicts: include/linux/ssb/ssb_driver_gige.h Also resolves a logical merge conflict in drivers/net/ethernet/broadcom/- bgmac.c due to change of an API.
Diffstat (limited to 'include/linux/irq_work.h')
-rw-r--r--include/linux/irq_work.h22
1 files changed, 21 insertions, 1 deletions
diff --git a/include/linux/irq_work.h b/include/linux/irq_work.h
index 6a9e8f5399e2..f5dbce50466e 100644
--- a/include/linux/irq_work.h
+++ b/include/linux/irq_work.h
@@ -3,6 +3,20 @@
#include <linux/llist.h>
+/*
+ * An entry can be in one of four states:
+ *
+ * free NULL, 0 -> {claimed} : free to be used
+ * claimed NULL, 3 -> {pending} : claimed to be enqueued
+ * pending next, 3 -> {busy} : queued, pending callback
+ * busy NULL, 2 -> {free, claimed} : callback in progress, can be claimed
+ */
+
+#define IRQ_WORK_PENDING 1UL
+#define IRQ_WORK_BUSY 2UL
+#define IRQ_WORK_FLAGS 3UL
+#define IRQ_WORK_LAZY 4UL /* Doesn't want IPI, wait for tick */
+
struct irq_work {
unsigned long flags;
struct llist_node llnode;
@@ -16,8 +30,14 @@ void init_irq_work(struct irq_work *work, void (*func)(struct irq_work *))
work->func = func;
}
-bool irq_work_queue(struct irq_work *work);
+void irq_work_queue(struct irq_work *work);
void irq_work_run(void);
void irq_work_sync(struct irq_work *work);
+#ifdef CONFIG_IRQ_WORK
+bool irq_work_needs_cpu(void);
+#else
+static bool irq_work_needs_cpu(void) { return false; }
+#endif
+
#endif /* _LINUX_IRQ_WORK_H */