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) \
23 stdu r1, -STACK_FRAME_OVERHEAD(r1); \
25 stdu r1, -STACK_FRAME_OVERHEAD(r1); \
30 #define TRACE_WITH_FRAME_BUFFER(func) \
35 * These are calls to C code, so the caller must be prepared for volatiles to
38 #define TRACE_ENABLE_INTS TRACE_WITH_FRAME_BUFFER(trace_hardirqs_on)
39 #define TRACE_DISABLE_INTS TRACE_WITH_FRAME_BUFFER(trace_hardirqs_off)
42 * This is used by assembly code to soft-disable interrupts first and
43 * reconcile irq state.
45 * NB: This may call C code, so the caller must be prepared for volatiles to
48 #define RECONCILE_IRQ_STATE(__rA, __rB) \
49 lbz __rA,PACASOFTIRQEN(r13); \
50 lbz __rB,PACAIRQHAPPENED(r13); \
53 ori __rB,__rB,PACA_IRQ_HARD_DIS; \
54 stb __rB,PACAIRQHAPPENED(r13); \
56 stb __rA,PACASOFTIRQEN(r13); \
61 #define TRACE_ENABLE_INTS
62 #define TRACE_DISABLE_INTS
64 #define RECONCILE_IRQ_STATE(__rA, __rB) \
65 lbz __rA,PACAIRQHAPPENED(r13); \
67 ori __rA,__rA,PACA_IRQ_HARD_DIS; \
68 stb __rB,PACASOFTIRQEN(r13); \
69 stb __rA,PACAIRQHAPPENED(r13)