diff options
Diffstat (limited to 'include/asm-mips/irqflags.h')
| -rw-r--r-- | include/asm-mips/irqflags.h | 26 | 
1 files changed, 23 insertions, 3 deletions
| diff --git a/include/asm-mips/irqflags.h b/include/asm-mips/irqflags.h index 881e8866501d..701ec0ba8fa9 100644 --- a/include/asm-mips/irqflags.h +++ b/include/asm-mips/irqflags.h | |||
| @@ -38,8 +38,17 @@ __asm__( | |||
| 38 | " .set pop \n" | 38 | " .set pop \n" | 
| 39 | " .endm"); | 39 | " .endm"); | 
| 40 | 40 | ||
| 41 | extern void smtc_ipi_replay(void); | ||
| 42 | |||
| 41 | static inline void raw_local_irq_enable(void) | 43 | static inline void raw_local_irq_enable(void) | 
| 42 | { | 44 | { | 
| 45 | #ifdef CONFIG_MIPS_MT_SMTC | ||
| 46 | /* | ||
| 47 | * SMTC kernel needs to do a software replay of queued | ||
| 48 | * IPIs, at the cost of call overhead on each local_irq_enable() | ||
| 49 | */ | ||
| 50 | smtc_ipi_replay(); | ||
| 51 | #endif | ||
| 43 | __asm__ __volatile__( | 52 | __asm__ __volatile__( | 
| 44 | "raw_local_irq_enable" | 53 | "raw_local_irq_enable" | 
| 45 | : /* no outputs */ | 54 | : /* no outputs */ | 
| @@ -47,6 +56,7 @@ static inline void raw_local_irq_enable(void) | |||
| 47 | : "memory"); | 56 | : "memory"); | 
| 48 | } | 57 | } | 
| 49 | 58 | ||
| 59 | |||
| 50 | /* | 60 | /* | 
| 51 | * For cli() we have to insert nops to make sure that the new value | 61 | * For cli() we have to insert nops to make sure that the new value | 
| 52 | * has actually arrived in the status register before the end of this | 62 | * has actually arrived in the status register before the end of this | 
| @@ -185,15 +195,14 @@ __asm__( | |||
| 185 | " .set pop \n" | 195 | " .set pop \n" | 
| 186 | " .endm \n"); | 196 | " .endm \n"); | 
| 187 | 197 | ||
| 188 | extern void smtc_ipi_replay(void); | ||
| 189 | 198 | ||
| 190 | static inline void raw_local_irq_restore(unsigned long flags) | 199 | static inline void raw_local_irq_restore(unsigned long flags) | 
| 191 | { | 200 | { | 
| 192 | unsigned long __tmp1; | 201 | unsigned long __tmp1; | 
| 193 | 202 | ||
| 194 | #ifdef CONFIG_MIPS_MT_SMTC_INSTANT_REPLAY | 203 | #ifdef CONFIG_MIPS_MT_SMTC | 
| 195 | /* | 204 | /* | 
| 196 | * CONFIG_MIPS_MT_SMTC_INSTANT_REPLAY does prompt replay of deferred | 205 | * SMTC kernel needs to do a software replay of queued | 
| 197 | * IPIs, at the cost of branch and call overhead on each | 206 | * IPIs, at the cost of branch and call overhead on each | 
| 198 | * local_irq_restore() | 207 | * local_irq_restore() | 
| 199 | */ | 208 | */ | 
| @@ -208,6 +217,17 @@ static inline void raw_local_irq_restore(unsigned long flags) | |||
| 208 | : "memory"); | 217 | : "memory"); | 
| 209 | } | 218 | } | 
| 210 | 219 | ||
| 220 | static inline void __raw_local_irq_restore(unsigned long flags) | ||
| 221 | { | ||
| 222 | unsigned long __tmp1; | ||
| 223 | |||
| 224 | __asm__ __volatile__( | ||
| 225 | "raw_local_irq_restore\t%0" | ||
| 226 | : "=r" (__tmp1) | ||
| 227 | : "0" (flags) | ||
| 228 | : "memory"); | ||
| 229 | } | ||
| 230 | |||
| 211 | static inline int raw_irqs_disabled_flags(unsigned long flags) | 231 | static inline int raw_irqs_disabled_flags(unsigned long flags) | 
| 212 | { | 232 | { | 
| 213 | #ifdef CONFIG_MIPS_MT_SMTC | 233 | #ifdef CONFIG_MIPS_MT_SMTC | 
