octeon_cpu_disable() will unconditionally enable interrupts when called
with interrupts disabled. Fix that.
Reported-by: Hemmo Nieminen <hemmo.nieminen@xxxxxx>
Signed-off-by: Aaro Koskinen <aaro.koskinen@xxxxxx>
Cc: stable@xxxxxxxxxxxxxxx
---
arch/mips/cavium-octeon/smp.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/mips/cavium-octeon/smp.c b/arch/mips/cavium-octeon/smp.c
index ecd903d..9673c5b 100644
--- a/arch/mips/cavium-octeon/smp.c
+++ b/arch/mips/cavium-octeon/smp.c
@@ -231,6 +231,7 @@ DEFINE_PER_CPU(int, cpu_state);
static int octeon_cpu_disable(void)
{
unsigned int cpu = smp_processor_id();
+ unsigned long flags;
if (cpu == 0)
return -EBUSY;
@@ -240,9 +241,9 @@ static int octeon_cpu_disable(void)
set_cpu_online(cpu, false);
cpu_clear(cpu, cpu_callin_map);
- local_irq_disable();
+ local_irq_save(flags);
octeon_fixup_irqs();
- local_irq_enable();
+ local_irq_restore(flags);
flush_cache_all();
local_flush_tlb_all();