diff options
Diffstat (limited to 'arch/mips/lib/mips-atomic.c')
-rw-r--r-- | arch/mips/lib/mips-atomic.c | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/arch/mips/lib/mips-atomic.c b/arch/mips/lib/mips-atomic.c index 57bcdaf1f1c8..be777d9a3f85 100644 --- a/arch/mips/lib/mips-atomic.c +++ b/arch/mips/lib/mips-atomic.c | |||
@@ -42,15 +42,11 @@ notrace void arch_local_irq_disable(void) | |||
42 | __asm__ __volatile__( | 42 | __asm__ __volatile__( |
43 | " .set push \n" | 43 | " .set push \n" |
44 | " .set noat \n" | 44 | " .set noat \n" |
45 | #if defined(CONFIG_CPU_MIPSR2) | ||
46 | /* see irqflags.h for inline function */ | ||
47 | #else | ||
48 | " mfc0 $1,$12 \n" | 45 | " mfc0 $1,$12 \n" |
49 | " ori $1,0x1f \n" | 46 | " ori $1,0x1f \n" |
50 | " xori $1,0x1f \n" | 47 | " xori $1,0x1f \n" |
51 | " .set noreorder \n" | 48 | " .set noreorder \n" |
52 | " mtc0 $1,$12 \n" | 49 | " mtc0 $1,$12 \n" |
53 | #endif | ||
54 | " " __stringify(__irq_disable_hazard) " \n" | 50 | " " __stringify(__irq_disable_hazard) " \n" |
55 | " .set pop \n" | 51 | " .set pop \n" |
56 | : /* no outputs */ | 52 | : /* no outputs */ |
@@ -72,15 +68,11 @@ notrace unsigned long arch_local_irq_save(void) | |||
72 | " .set push \n" | 68 | " .set push \n" |
73 | " .set reorder \n" | 69 | " .set reorder \n" |
74 | " .set noat \n" | 70 | " .set noat \n" |
75 | #if defined(CONFIG_CPU_MIPSR2) | ||
76 | /* see irqflags.h for inline function */ | ||
77 | #else | ||
78 | " mfc0 %[flags], $12 \n" | 71 | " mfc0 %[flags], $12 \n" |
79 | " ori $1, %[flags], 0x1f \n" | 72 | " ori $1, %[flags], 0x1f \n" |
80 | " xori $1, 0x1f \n" | 73 | " xori $1, 0x1f \n" |
81 | " .set noreorder \n" | 74 | " .set noreorder \n" |
82 | " mtc0 $1, $12 \n" | 75 | " mtc0 $1, $12 \n" |
83 | #endif | ||
84 | " " __stringify(__irq_disable_hazard) " \n" | 76 | " " __stringify(__irq_disable_hazard) " \n" |
85 | " .set pop \n" | 77 | " .set pop \n" |
86 | : [flags] "=r" (flags) | 78 | : [flags] "=r" (flags) |
@@ -103,18 +95,12 @@ notrace void arch_local_irq_restore(unsigned long flags) | |||
103 | " .set push \n" | 95 | " .set push \n" |
104 | " .set noreorder \n" | 96 | " .set noreorder \n" |
105 | " .set noat \n" | 97 | " .set noat \n" |
106 | #if defined(CONFIG_CPU_MIPSR2) && defined(CONFIG_IRQ_CPU) | ||
107 | /* see irqflags.h for inline function */ | ||
108 | #elif defined(CONFIG_CPU_MIPSR2) | ||
109 | /* see irqflags.h for inline function */ | ||
110 | #else | ||
111 | " mfc0 $1, $12 \n" | 98 | " mfc0 $1, $12 \n" |
112 | " andi %[flags], 1 \n" | 99 | " andi %[flags], 1 \n" |
113 | " ori $1, 0x1f \n" | 100 | " ori $1, 0x1f \n" |
114 | " xori $1, 0x1f \n" | 101 | " xori $1, 0x1f \n" |
115 | " or %[flags], $1 \n" | 102 | " or %[flags], $1 \n" |
116 | " mtc0 %[flags], $12 \n" | 103 | " mtc0 %[flags], $12 \n" |
117 | #endif | ||
118 | " " __stringify(__irq_disable_hazard) " \n" | 104 | " " __stringify(__irq_disable_hazard) " \n" |
119 | " .set pop \n" | 105 | " .set pop \n" |
120 | : [flags] "=r" (__tmp1) | 106 | : [flags] "=r" (__tmp1) |
@@ -136,18 +122,12 @@ notrace void __arch_local_irq_restore(unsigned long flags) | |||
136 | " .set push \n" | 122 | " .set push \n" |
137 | " .set noreorder \n" | 123 | " .set noreorder \n" |
138 | " .set noat \n" | 124 | " .set noat \n" |
139 | #if defined(CONFIG_CPU_MIPSR2) && defined(CONFIG_IRQ_CPU) | ||
140 | /* see irqflags.h for inline function */ | ||
141 | #elif defined(CONFIG_CPU_MIPSR2) | ||
142 | /* see irqflags.h for inline function */ | ||
143 | #else | ||
144 | " mfc0 $1, $12 \n" | 125 | " mfc0 $1, $12 \n" |
145 | " andi %[flags], 1 \n" | 126 | " andi %[flags], 1 \n" |
146 | " ori $1, 0x1f \n" | 127 | " ori $1, 0x1f \n" |
147 | " xori $1, 0x1f \n" | 128 | " xori $1, 0x1f \n" |
148 | " or %[flags], $1 \n" | 129 | " or %[flags], $1 \n" |
149 | " mtc0 %[flags], $12 \n" | 130 | " mtc0 %[flags], $12 \n" |
150 | #endif | ||
151 | " " __stringify(__irq_disable_hazard) " \n" | 131 | " " __stringify(__irq_disable_hazard) " \n" |
152 | " .set pop \n" | 132 | " .set pop \n" |
153 | : [flags] "=r" (__tmp1) | 133 | : [flags] "=r" (__tmp1) |