Commit | Line | Data |
---|---|---|
de30a2b3 | 1 | /* |
de30a2b3 | 2 | * IRQ flags handling |
de30a2b3 IM |
3 | */ |
4 | #ifndef _ASM_IRQFLAGS_H | |
5 | #define _ASM_IRQFLAGS_H | |
6 | ||
945feb17 | 7 | #ifndef __ASSEMBLY__ |
de30a2b3 IM |
8 | /* |
9 | * Get definitions for raw_local_save_flags(x), etc. | |
10 | */ | |
b8b572e1 | 11 | #include <asm/hw_irq.h> |
de30a2b3 | 12 | |
945feb17 BH |
13 | #else |
14 | #ifdef CONFIG_TRACE_IRQFLAGS | |
de30a2b3 | 15 | /* |
945feb17 BH |
16 | * Most of the CPU's IRQ-state tracing is done from assembly code; we |
17 | * have to call a C function so call a wrapper that saves all the | |
18 | * C-clobbered registers. | |
de30a2b3 | 19 | */ |
945feb17 BH |
20 | #define TRACE_ENABLE_INTS bl .trace_hardirqs_on |
21 | #define TRACE_DISABLE_INTS bl .trace_hardirqs_off | |
22 | #define TRACE_AND_RESTORE_IRQ_PARTIAL(en,skip) \ | |
22b8f9ee | 23 | cmpdi en,0; \ |
945feb17 BH |
24 | bne 95f; \ |
25 | stb en,PACASOFTIRQEN(r13); \ | |
26 | bl .trace_hardirqs_off; \ | |
27 | b skip; \ | |
28 | 95: bl .trace_hardirqs_on; \ | |
29 | li en,1; | |
30 | #define TRACE_AND_RESTORE_IRQ(en) \ | |
31 | TRACE_AND_RESTORE_IRQ_PARTIAL(en,96f); \ | |
22b8f9ee BH |
32 | stb en,PACASOFTIRQEN(r13); \ |
33 | 96: | |
de30a2b3 | 34 | #else |
945feb17 BH |
35 | #define TRACE_ENABLE_INTS |
36 | #define TRACE_DISABLE_INTS | |
37 | #define TRACE_AND_RESTORE_IRQ_PARTIAL(en,skip) | |
38 | #define TRACE_AND_RESTORE_IRQ(en) \ | |
39 | stb en,PACASOFTIRQEN(r13) | |
40 | #endif | |
de30a2b3 IM |
41 | #endif |
42 | ||
43 | #endif |