diff --git a/drivers/staging/android/fiq_debugger/fiq_debugger.c b/drivers/staging/android/fiq_debugger/fiq_debugger.c index a18b703a0d92..c2be15258525 100644 --- a/drivers/staging/android/fiq_debugger/fiq_debugger.c +++ b/drivers/staging/android/fiq_debugger/fiq_debugger.c @@ -646,7 +646,7 @@ static bool fiq_debugger_handle_uart_interrupt(struct fiq_debugger_state *state, int count = 0; bool signal_helper = false; - if (this_cpu != state->current_cpu) { + if ((this_cpu != state->current_cpu) && (cpu_online(state->current_cpu))) { if (state->in_fiq) return false; @@ -664,6 +664,9 @@ static bool fiq_debugger_handle_uart_interrupt(struct fiq_debugger_state *state, return false; } + if (this_cpu != state->current_cpu) + state->current_cpu = this_cpu; + state->in_fiq = true; while ((c = fiq_debugger_getc(state)) != FIQ_DEBUGGER_NO_CHAR) {