Running work in hardware interrupt context
The first step is to fill in an irq_work structure:
#include <linux/irq_work.h>
struct irq_work my_work;
init_irq_work(struct irq_work *entry, void (*func)(struct irq_work *func));
There is then a fairly familiar pair of functions for running the work indicated by this structure:
bool irq_work_queue(struct irq_work *entry);
void irq_work_sync(struct irq_work *entry);
The intended area of use is apparently code running from non-maskable
interrupts which needs to be able to interact with the rest of the system.
One should assume that just about any other use of this feature is likely
to be scrutinized closely.
