hc
2023-12-11 6778948f9de86c3cfaf36725a7c87dcff9ba247f
kernel/arch/mips/include/asm/irqflags.h
....@@ -18,7 +18,7 @@
1818 #include <asm/compiler.h>
1919 #include <asm/hazards.h>
2020
21
-#if defined(CONFIG_CPU_MIPSR2) || defined (CONFIG_CPU_MIPSR6)
21
+#if defined(CONFIG_CPU_HAS_DIEI)
2222
2323 static inline void arch_local_irq_disable(void)
2424 {
....@@ -41,7 +41,7 @@
4141 " .set push \n"
4242 " .set reorder \n"
4343 " .set noat \n"
44
-#if defined(CONFIG_CPU_LOONGSON3)
44
+#if defined(CONFIG_CPU_LOONGSON64) || defined(CONFIG_CPU_LOONGSON32)
4545 " mfc0 %[flags], $12 \n"
4646 " di \n"
4747 #else
....@@ -94,7 +94,7 @@
9494 void arch_local_irq_disable(void);
9595 unsigned long arch_local_irq_save(void);
9696 void arch_local_irq_restore(unsigned long flags);
97
-#endif /* CONFIG_CPU_MIPSR2 || CONFIG_CPU_MIPSR6 */
97
+#endif /* CONFIG_CPU_HAS_DIEI */
9898
9999 static inline void arch_local_irq_enable(void)
100100 {
....@@ -102,7 +102,7 @@
102102 " .set push \n"
103103 " .set reorder \n"
104104 " .set noat \n"
105
-#if defined(CONFIG_CPU_MIPSR2) || defined(CONFIG_CPU_MIPSR6)
105
+#if defined(CONFIG_CPU_HAS_DIEI)
106106 " ei \n"
107107 #else
108108 " mfc0 $1,$12 \n"
....@@ -137,6 +137,11 @@
137137 return !(flags & 1);
138138 }
139139
140
+static inline int arch_irqs_disabled(void)
141
+{
142
+ return arch_irqs_disabled_flags(arch_local_save_flags());
143
+}
144
+
140145 #endif /* #ifndef __ASSEMBLY__ */
141146
142147 /*