aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips')
-rw-r--r--arch/mips/cavium-octeon/octeon-irq.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/arch/mips/cavium-octeon/octeon-irq.c b/arch/mips/cavium-octeon/octeon-irq.c
index 384f1842bfb1..0bda5c5db150 100644
--- a/arch/mips/cavium-octeon/octeon-irq.c
+++ b/arch/mips/cavium-octeon/octeon-irq.c
@@ -182,9 +182,10 @@ static void octeon_irq_ciu0_disable(unsigned int irq)
182static int octeon_irq_ciu0_set_affinity(unsigned int irq, const struct cpumask *dest) 182static int octeon_irq_ciu0_set_affinity(unsigned int irq, const struct cpumask *dest)
183{ 183{
184 int cpu; 184 int cpu;
185 unsigned long flags;
185 int bit = irq - OCTEON_IRQ_WORKQ0; /* Bit 0-63 of EN0 */ 186 int bit = irq - OCTEON_IRQ_WORKQ0; /* Bit 0-63 of EN0 */
186 187
187 write_lock(&octeon_irq_ciu0_rwlock); 188 write_lock_irqsave(&octeon_irq_ciu0_rwlock, flags);
188 for_each_online_cpu(cpu) { 189 for_each_online_cpu(cpu) {
189 int coreid = cpu_logical_map(cpu); 190 int coreid = cpu_logical_map(cpu);
190 uint64_t en0 = 191 uint64_t en0 =
@@ -200,7 +201,7 @@ static int octeon_irq_ciu0_set_affinity(unsigned int irq, const struct cpumask *
200 * of them are done. 201 * of them are done.
201 */ 202 */
202 cvmx_read_csr(CVMX_CIU_INTX_EN0(cvmx_get_core_num() * 2)); 203 cvmx_read_csr(CVMX_CIU_INTX_EN0(cvmx_get_core_num() * 2));
203 write_unlock(&octeon_irq_ciu0_rwlock); 204 write_unlock_irqrestore(&octeon_irq_ciu0_rwlock, flags);
204 205
205 return 0; 206 return 0;
206} 207}
@@ -299,9 +300,10 @@ static void octeon_irq_ciu1_disable(unsigned int irq)
299static int octeon_irq_ciu1_set_affinity(unsigned int irq, const struct cpumask *dest) 300static int octeon_irq_ciu1_set_affinity(unsigned int irq, const struct cpumask *dest)
300{ 301{
301 int cpu; 302 int cpu;
303 unsigned long flags;
302 int bit = irq - OCTEON_IRQ_WDOG0; /* Bit 0-63 of EN1 */ 304 int bit = irq - OCTEON_IRQ_WDOG0; /* Bit 0-63 of EN1 */
303 305
304 write_lock(&octeon_irq_ciu1_rwlock); 306 write_lock_irqsave(&octeon_irq_ciu1_rwlock, flags);
305 for_each_online_cpu(cpu) { 307 for_each_online_cpu(cpu) {
306 int coreid = cpu_logical_map(cpu); 308 int coreid = cpu_logical_map(cpu);
307 uint64_t en1 = 309 uint64_t en1 =
@@ -318,7 +320,7 @@ static int octeon_irq_ciu1_set_affinity(unsigned int irq, const struct cpumask *
318 * of them are done. 320 * of them are done.
319 */ 321 */
320 cvmx_read_csr(CVMX_CIU_INTX_EN1(cvmx_get_core_num() * 2 + 1)); 322 cvmx_read_csr(CVMX_CIU_INTX_EN1(cvmx_get_core_num() * 2 + 1));
321 write_unlock(&octeon_irq_ciu1_rwlock); 323 write_unlock_irqrestore(&octeon_irq_ciu1_rwlock, flags);
322 324
323 return 0; 325 return 0;
324} 326}