[PATCH] lockdep: irqtrace subsystem, core
Accurate hard-IRQ-flags and softirq-flags state tracing. This allows us to attach extra functionality to IRQ flags on/off events (such as trace-on/off). Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:

committed by
Linus Torvalds

parent
5bdc9b447c
commit
de30a2b355
@@ -86,9 +86,6 @@ extern void synchronize_irq(unsigned int irq);
|
||||
# define synchronize_irq(irq) barrier()
|
||||
#endif
|
||||
|
||||
#define nmi_enter() irq_enter()
|
||||
#define nmi_exit() sub_preempt_count(HARDIRQ_OFFSET)
|
||||
|
||||
struct task_struct;
|
||||
|
||||
#ifndef CONFIG_VIRT_CPU_ACCOUNTING
|
||||
@@ -97,12 +94,35 @@ static inline void account_system_vtime(struct task_struct *tsk)
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* It is safe to do non-atomic ops on ->hardirq_context,
|
||||
* because NMI handlers may not preempt and the ops are
|
||||
* always balanced, so the interrupted value of ->hardirq_context
|
||||
* will always be restored.
|
||||
*/
|
||||
#define irq_enter() \
|
||||
do { \
|
||||
account_system_vtime(current); \
|
||||
add_preempt_count(HARDIRQ_OFFSET); \
|
||||
trace_hardirq_enter(); \
|
||||
} while (0)
|
||||
|
||||
/*
|
||||
* Exit irq context without processing softirqs:
|
||||
*/
|
||||
#define __irq_exit() \
|
||||
do { \
|
||||
trace_hardirq_exit(); \
|
||||
account_system_vtime(current); \
|
||||
sub_preempt_count(HARDIRQ_OFFSET); \
|
||||
} while (0)
|
||||
|
||||
/*
|
||||
* Exit irq context and process softirqs if needed:
|
||||
*/
|
||||
extern void irq_exit(void);
|
||||
|
||||
#define nmi_enter() irq_enter()
|
||||
#define nmi_exit() __irq_exit()
|
||||
|
||||
#endif /* LINUX_HARDIRQ_H */
|
||||
|
Reference in New Issue
Block a user