| .. | .. |
|---|
| 18 | 18 | #include <asm/compiler.h> |
|---|
| 19 | 19 | #include <asm/hazards.h> |
|---|
| 20 | 20 | |
|---|
| 21 | | -#if defined(CONFIG_CPU_MIPSR2) || defined (CONFIG_CPU_MIPSR6) |
|---|
| 21 | +#if defined(CONFIG_CPU_HAS_DIEI) |
|---|
| 22 | 22 | |
|---|
| 23 | 23 | static inline void arch_local_irq_disable(void) |
|---|
| 24 | 24 | { |
|---|
| .. | .. |
|---|
| 41 | 41 | " .set push \n" |
|---|
| 42 | 42 | " .set reorder \n" |
|---|
| 43 | 43 | " .set noat \n" |
|---|
| 44 | | -#if defined(CONFIG_CPU_LOONGSON3) |
|---|
| 44 | +#if defined(CONFIG_CPU_LOONGSON64) || defined(CONFIG_CPU_LOONGSON32) |
|---|
| 45 | 45 | " mfc0 %[flags], $12 \n" |
|---|
| 46 | 46 | " di \n" |
|---|
| 47 | 47 | #else |
|---|
| .. | .. |
|---|
| 94 | 94 | void arch_local_irq_disable(void); |
|---|
| 95 | 95 | unsigned long arch_local_irq_save(void); |
|---|
| 96 | 96 | void arch_local_irq_restore(unsigned long flags); |
|---|
| 97 | | -#endif /* CONFIG_CPU_MIPSR2 || CONFIG_CPU_MIPSR6 */ |
|---|
| 97 | +#endif /* CONFIG_CPU_HAS_DIEI */ |
|---|
| 98 | 98 | |
|---|
| 99 | 99 | static inline void arch_local_irq_enable(void) |
|---|
| 100 | 100 | { |
|---|
| .. | .. |
|---|
| 102 | 102 | " .set push \n" |
|---|
| 103 | 103 | " .set reorder \n" |
|---|
| 104 | 104 | " .set noat \n" |
|---|
| 105 | | -#if defined(CONFIG_CPU_MIPSR2) || defined(CONFIG_CPU_MIPSR6) |
|---|
| 105 | +#if defined(CONFIG_CPU_HAS_DIEI) |
|---|
| 106 | 106 | " ei \n" |
|---|
| 107 | 107 | #else |
|---|
| 108 | 108 | " mfc0 $1,$12 \n" |
|---|
| .. | .. |
|---|
| 137 | 137 | return !(flags & 1); |
|---|
| 138 | 138 | } |
|---|
| 139 | 139 | |
|---|
| 140 | +static inline int arch_irqs_disabled(void) |
|---|
| 141 | +{ |
|---|
| 142 | + return arch_irqs_disabled_flags(arch_local_save_flags()); |
|---|
| 143 | +} |
|---|
| 144 | + |
|---|
| 140 | 145 | #endif /* #ifndef __ASSEMBLY__ */ |
|---|
| 141 | 146 | |
|---|
| 142 | 147 | /* |
|---|