diff options
author | Ingo Molnar <mingo@elte.hu> | 2006-07-03 00:24:27 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-07-03 15:27:00 -0700 |
commit | d7e9629de051bb4b1d104588cd97673ad770809e (patch) | |
tree | 8d9f8fd16910ef959d39cb6264a3e5da9b8d7bec /include/linux/interrupt.h | |
parent | c01d403b2e3e3f231b18ebd07ad64ecbe6a258a5 (diff) | |
download | lwn-d7e9629de051bb4b1d104588cd97673ad770809e.tar.gz lwn-d7e9629de051bb4b1d104588cd97673ad770809e.zip |
[PATCH] lockdep: add local_irq_enable_in_hardirq() API
Introduce local_irq_enable_in_hardirq() API. It is currently aliased to
local_irq_enable(), hence has no functional effects.
This API will be used by lockdep, but even without lockdep this will better
document places in the kernel where a hardirq context enables hardirqs.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/interrupt.h')
-rw-r--r-- | include/linux/interrupt.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h index 2c5452c1d7bb..73463fbb38e4 100644 --- a/include/linux/interrupt.h +++ b/include/linux/interrupt.h @@ -80,6 +80,23 @@ extern int request_irq(unsigned int, unsigned long, const char *, void *); extern void free_irq(unsigned int, void *); +/* + * On lockdep we dont want to enable hardirqs in hardirq + * context. Use local_irq_enable_in_hardirq() to annotate + * kernel code that has to do this nevertheless (pretty much + * the only valid case is for old/broken hardware that is + * insanely slow). + * + * NOTE: in theory this might break fragile code that relies + * on hardirq delivery - in practice we dont seem to have such + * places left. So the only effect should be slightly increased + * irqs-off latencies. + */ +#ifdef CONFIG_LOCKDEP +# define local_irq_enable_in_hardirq() do { } while (0) +#else +# define local_irq_enable_in_hardirq() local_irq_enable() +#endif #ifdef CONFIG_GENERIC_HARDIRQS extern void disable_irq_nosync(unsigned int irq); |