diff options
Diffstat (limited to 'include/asm-mips')
-rw-r--r-- | include/asm-mips/irqflags.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/include/asm-mips/irqflags.h b/include/asm-mips/irqflags.h index 46bf5de5ac72..af3b07dfad4b 100644 --- a/include/asm-mips/irqflags.h +++ b/include/asm-mips/irqflags.h | |||
@@ -15,6 +15,27 @@ | |||
15 | 15 | ||
16 | #include <asm/hazards.h> | 16 | #include <asm/hazards.h> |
17 | 17 | ||
18 | /* | ||
19 | * CONFIG_MIPS_MT_SMTC_INSTANT_REPLAY does prompt replay of deferred IPIs, | ||
20 | * at the cost of branch and call overhead on each local_irq_restore() | ||
21 | */ | ||
22 | |||
23 | #ifdef CONFIG_MIPS_MT_SMTC_INSTANT_REPLAY | ||
24 | |||
25 | extern void smtc_ipi_replay(void); | ||
26 | |||
27 | #define irq_restore_epilog(flags) \ | ||
28 | do { \ | ||
29 | if (!(flags & 0x0400)) \ | ||
30 | smtc_ipi_replay(); \ | ||
31 | } while (0) | ||
32 | |||
33 | #else | ||
34 | |||
35 | #define irq_restore_epilog(ignore) do { } while (0) | ||
36 | |||
37 | #endif /* CONFIG_MIPS_MT_SMTC_INSTANT_REPLAY */ | ||
38 | |||
18 | __asm__ ( | 39 | __asm__ ( |
19 | " .macro raw_local_irq_enable \n" | 40 | " .macro raw_local_irq_enable \n" |
20 | " .set push \n" | 41 | " .set push \n" |
@@ -193,6 +214,7 @@ do { \ | |||
193 | : "=r" (__tmp1) \ | 214 | : "=r" (__tmp1) \ |
194 | : "0" (flags) \ | 215 | : "0" (flags) \ |
195 | : "memory"); \ | 216 | : "memory"); \ |
217 | irq_restore_epilog(flags); \ | ||
196 | } while(0) | 218 | } while(0) |
197 | 219 | ||
198 | static inline int raw_irqs_disabled_flags(unsigned long flags) | 220 | static inline int raw_irqs_disabled_flags(unsigned long flags) |