4 #ifndef _ASM_IRQFLAGS_H
5 #define _ASM_IRQFLAGS_H
9 * Get definitions for arch_local_save_flags(x), etc.
11 #include <asm/hw_irq.h>
14 #ifdef CONFIG_TRACE_IRQFLAGS
15 #ifdef CONFIG_IRQSOFF_TRACER
17 * Since the ftrace irqsoff latency trace checks CALLER_ADDR1,
18 * which is the stack frame here, we need to force a stack frame
19 * in case we came from user space.
21 #define TRACE_WITH_FRAME_BUFFER(func) \
30 #define TRACE_WITH_FRAME_BUFFER(func) \
35 * Most of the CPU's IRQ-state tracing is done from assembly code; we
36 * have to call a C function so call a wrapper that saves all the
37 * C-clobbered registers.
39 #define TRACE_ENABLE_INTS TRACE_WITH_FRAME_BUFFER(.trace_hardirqs_on)
40 #define TRACE_DISABLE_INTS TRACE_WITH_FRAME_BUFFER(.trace_hardirqs_off)
42 #define TRACE_AND_RESTORE_IRQ_PARTIAL(en,skip) \
45 stb en,PACASOFTIRQEN(r13); \
46 TRACE_WITH_FRAME_BUFFER(.trace_hardirqs_off) \
48 95: TRACE_WITH_FRAME_BUFFER(.trace_hardirqs_on) \
50 #define TRACE_AND_RESTORE_IRQ(en) \
51 TRACE_AND_RESTORE_IRQ_PARTIAL(en,96f); \
52 stb en,PACASOFTIRQEN(r13); \
55 #define TRACE_ENABLE_INTS
56 #define TRACE_DISABLE_INTS
57 #define TRACE_AND_RESTORE_IRQ_PARTIAL(en,skip)
58 #define TRACE_AND_RESTORE_IRQ(en) \
59 stb en,PACASOFTIRQEN(r13)