diff options
author | Peter Zijlstra <peterz@infradead.org> | 2014-02-03 18:11:08 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2014-02-09 13:17:21 +0100 |
commit | 6a02ad66b2c44155d529f430d4fa5c6c66321077 (patch) | |
tree | f6a4d0ac8618aab3ea0154429c2ffc569474aa4a /include/linux/irq_work.h | |
parent | 3c3d7cb1db4af176dab843f22ea092a4ef1eb989 (diff) | |
download | op-kernel-dev-6a02ad66b2c44155d529f430d4fa5c6c66321077.zip op-kernel-dev-6a02ad66b2c44155d529f430d4fa5c6c66321077.tar.gz |
perf/x86: Push the duration-logging printk() to IRQ context
Calling printk() from NMI context is bad (TM), so move it to IRQ
context.
This also avoids the problem where the printk() time is measured by
the generic NMI duration goo and triggers a second warning.
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Link: http://lkml.kernel.org/n/tip-75dv35xf6dhhmeb7nq6fua31@git.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'include/linux/irq_work.h')
-rw-r--r-- | include/linux/irq_work.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/irq_work.h b/include/linux/irq_work.h index 6601702..add13c8 100644 --- a/include/linux/irq_work.h +++ b/include/linux/irq_work.h @@ -30,6 +30,8 @@ void init_irq_work(struct irq_work *work, void (*func)(struct irq_work *)) work->func = func; } +#define DEFINE_IRQ_WORK(name, _f) struct irq_work name = { .func = (_f), } + void irq_work_queue(struct irq_work *work); void irq_work_run(void); void irq_work_sync(struct irq_work *work); |