irqflags.h (020abf03cd659388f94cb328e1e1df0656e0d7ff) | irqflags.h (7230c5644188cd9e3fb380cc97dde00c464a3ba7) |
---|---|
1/* 2 * IRQ flags handling 3 */ 4#ifndef _ASM_IRQFLAGS_H 5#define _ASM_IRQFLAGS_H 6 7#ifndef __ASSEMBLY__ 8/* --- 25 unchanged lines hidden (view full) --- 34/* 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. 38 */ 39#define TRACE_ENABLE_INTS TRACE_WITH_FRAME_BUFFER(.trace_hardirqs_on) 40#define TRACE_DISABLE_INTS TRACE_WITH_FRAME_BUFFER(.trace_hardirqs_off) 41 | 1/* 2 * IRQ flags handling 3 */ 4#ifndef _ASM_IRQFLAGS_H 5#define _ASM_IRQFLAGS_H 6 7#ifndef __ASSEMBLY__ 8/* --- 25 unchanged lines hidden (view full) --- 34/* 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. 38 */ 39#define TRACE_ENABLE_INTS TRACE_WITH_FRAME_BUFFER(.trace_hardirqs_on) 40#define TRACE_DISABLE_INTS TRACE_WITH_FRAME_BUFFER(.trace_hardirqs_off) 41 |
42#define TRACE_AND_RESTORE_IRQ_PARTIAL(en,skip) \ 43 cmpdi en,0; \ 44 bne 95f; \ 45 stb en,PACASOFTIRQEN(r13); \ 46 TRACE_WITH_FRAME_BUFFER(.trace_hardirqs_off) \ 47 b skip; \ 4895: TRACE_WITH_FRAME_BUFFER(.trace_hardirqs_on) \ 49 li en,1; 50#define TRACE_AND_RESTORE_IRQ(en) \ 51 TRACE_AND_RESTORE_IRQ_PARTIAL(en,96f); \ 52 stb en,PACASOFTIRQEN(r13); \ 5396: | 42/* 43 * This is used by assembly code to soft-disable interrupts 44 */ 45#define SOFT_DISABLE_INTS(__rA, __rB) \ 46 lbz __rA,PACASOFTIRQEN(r13); \ 47 lbz __rB,PACAIRQHAPPENED(r13); \ 48 cmpwi cr0,__rA,0; \ 49 li __rA,0; \ 50 ori __rB,__rB,PACA_IRQ_HARD_DIS; \ 51 stb __rB,PACAIRQHAPPENED(r13); \ 52 beq 44f; \ 53 stb __rA,PACASOFTIRQEN(r13); \ 54 TRACE_DISABLE_INTS; \ 5544: 56 |
54#else 55#define TRACE_ENABLE_INTS 56#define TRACE_DISABLE_INTS | 57#else 58#define TRACE_ENABLE_INTS 59#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) | 60 61#define SOFT_DISABLE_INTS(__rA, __rB) \ 62 lbz __rA,PACAIRQHAPPENED(r13); \ 63 li __rB,0; \ 64 ori __rA,__rA,PACA_IRQ_HARD_DIS; \ 65 stb __rB,PACASOFTIRQEN(r13); \ 66 stb __rA,PACAIRQHAPPENED(r13) |
60#endif 61#endif 62 63#endif | 67#endif 68#endif 69 70#endif |